Commit Graph

12 Commits

Author SHA1 Message Date
Rabi Mishra 0fa7b81196 Remove PrepareContainerImage* Actions
These actions and not used anymore.

Change-Id: I1fedbf0a58acd6326aacdacf20534b92d6adefa1
2020-04-03 12:47:10 +05:30
Rabi Mishra 6b32a27835 Move PrepareContainerImageEnv functionality to utils
Change-Id: I79c1a77342dfde6ac8e6fa230956829a847596c4
2020-03-11 12:52:56 +05:30
Rabi Mishra c327dd1024 Move package_update worflow related functionality to utils
This moves the functionality to utils, however we'll still use
the mistral actions. Once we've new release of tripleo-common
we can switch to call them directly from python-tripleoclient.

Change-Id: I968e6d8c1c6bd87f9b5cb52cd83893367d5043b7
Depends-On: https://review.opendev.org/706170
Depends-On: https://review.opendev.org/708252
2020-02-26 08:21:08 +05:30
Rabi Mishra dc3a909f7d Remove container_image_prepare_default workflow
Remove the unused workflow and related action.

Task: 38677
Change-Id: I08fedb77fd8f546f989babacd8efff6613891ad9
2020-02-06 17:18:26 +05:30
Rabi Mishra ccefe28e4b Remove heat_capabilities action plugin
Moves the code for updating plan environment and parameter
caching related functionality to utils/plan.py.

Story: 2007212
Task: 38577
Task: 38578
Change-Id: I73407fdd6a1990e91ca2a8d8843901948ec256e3
2020-02-01 09:52:06 +05:30
Alex Schultz 550537acf4 Handle swift interactions are strings as necessary
To properly handle the differences between python2/python3 we need to
ensure that when we interact with swift and are dealing with string data
that we handle the types correctly. This change adds a swift utils
helper to call to get the string data from an object out of swift. For
example our json and yaml files are all strings so if we try to use
something like json.dumps() from data we pull from swift, it errors
because we're given a bytes like object in python3.

Change-Id: I7996cc08cdd3bddf3f4ba0fb2e48f926f944c0dd
Related-Blueprint: python3-support
2019-03-01 15:45:56 -07:00
Honza Pokorny 0923fca806 Add a way to update ContainerImagePrepare params
Closes-Bug: #1807154
Change-Id: I1e1cd3c2756c1cafe8096dd19cd572887917b853
2018-12-06 14:53:33 +01:00
Steve Baker 8b557554a4 Ensure all image parameters have a default set
Now that the PrepareContainerImageParameters action is part of the
deploy workflow, environments/containers-default-parameters.yaml is
overwritten with a dry-run prepare. The output of this prepare is
filtered to *only* those images required for deployment.

However heat requires all image parameters to be populated, regardless
of whether they're required, so this change will ensure that a value
is set for all image parameters by sharing the logic from the
PrepareContainerImageEnv image (which runs during the plan creation
workflow).

Change-Id: Ia2f013714dafac91075456576ec421fbddd822ae
Closes-Bug: #1787268
2018-08-17 12:33:43 +12:00
Steve Baker 2dcf24e060 Action to perform container image prepare
This action will be called in the deployment workflow just after
validation. It does the following:

- Fetches the plan, environment files and role data
- Builds a merged environment from the fetched plans
- If a ContainerImagePrepare parameter is defined, do a dry-run
  prepare to determine the image parameters for when the actual prepare
  is run during the deployment.
- Write the resulting image parameters to
  environments/containers-default-parameters.yaml and insert that file
  into the environments file list in the plan

This dry-run prepare is the same approach used for containerized
undercloud deployment. Doing a dry-run is fast compared to a full
deploy because there are no image transfers or build performed, only
inspect calls to image registries. The actual prepare will be done
during the deployment when change
I8b0c5e630e63ef6a2e6f70f1eb00fd02f4cfd1c0 lands.

Blueprint: container-prepare-workflow
Change-Id: Id5a4bec2d82e69ef53e7809984b4adba67deef3e
2018-08-01 11:40:04 +12:00
John Trowbridge 27ec819523 Revert "Action to perform container image prepare"
Need to understand what is causing 1783586, but for now safest action is
to revert.

Related-Bug: 1783586


This reverts commit 49c169a144.

Change-Id: I9d7ec0ebdb0f54328395ead06adab5ccff8b1997
2018-07-25 20:13:57 +00:00
Steve Baker 49c169a144 Action to perform container image prepare
This action runs in the deployment workflow just after validation. It
does the following:

- Fetches the plan, environment files and role data
- Builds a merged environment from the fetched plans
- If a ContainerImagePrepare parameter is defined, do a dry-run
  prepare to determine the image parameters for when the actual prepare
  is run during the deployment.
- Write the resulting image parameters to
  environments/containers-default-parameters.yaml and insert that file
  into the environments file list in the plan

If no ContainerImagePrepare parameter, this action has no effect, so
it can be inserted into the deployment workflow now without affecting
any existing image prepare.

This dry-run prepare is the same approach used for containerized
undercloud deployment. Doing a dry-run is fast compared to a full
deploy because there are no image transfers or build performed, only
inspect calls to image registries. The actual prepare will be done
during the deployment when change
I8b0c5e630e63ef6a2e6f70f1eb00fd02f4cfd1c0 lands.

Change-Id: Ifb1f81d4f7db3efd2799beca8705957e29ba16bd
Blueprint: container-prepare-workflow
2018-07-23 15:27:58 +12:00
Steve Baker b7ddde426a Action to always populate container image parameters
Currently the UI cannot deploy with containers because the mandatory
container parameters are not set. Also a CLI will not deploy unless
passed an environment generated by the "images prepare" call.

This change adds an action in the create_deployment_plan and
update_deployment_plan workflows which does a container prepare with
the default options, so that the mandatory image parameters are always
populated with values which will work.

Change-Id: Ibce7658468c1b3689a7481deb94dd43e1f3ead52
Closes-Bug: #1716778
2017-10-12 20:35:12 +00:00