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
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
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
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
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
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
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
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