Bug 1501268

Summary: overcloud container image prepare should support --env-dir
Product: Red Hat OpenStack Reporter: jliberma <jliberma>
Component: python-tripleoclientAssignee: Martin André <m.andre>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: medium Docs Contact:
Priority: medium    
Version: 12.0 (Pike)CC: dprince, emacchi, hbrock, jjoyce, jslagle, m.andre, mburns, ohochman, rhel-osp-director-maint
Target Milestone: rcKeywords: Triaged
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-7.3.3-4.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-13 22:13:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jliberma@redhat.com 2017-10-12 09:59:46 UTC
Description of problem:

Downstream tracker for https://bugs.launchpad.net/tripleo/+bug/1723057

Version-Release number of selected component (if applicable):

OpenStack Pike upstream

The comand 'openstack overcloud container image prepare' does not support the --env-dir parameter. This parameter is used by the overcloud deploy command to manage deployments with many environment files.

For example:
openstack overcloud deploy \
   -e /home/stack/templates/node-info.yaml \
   -r /home/stack/templates/roles_data.yaml \
   --environment-directory /home/stack/templates/environments/

ls /home/stack/templates/environments/
20-network-environment.yaml
30-compute-settings.yaml
60-ceph-ansible.yaml

Add this option to reduce the length and complexity of the command, and allow the same directory to be re-used for both commands.

Also the order of inclusion is important for both commands, and this would ensure consistency between them.

For example:

openstack overcloud container image prepare \
--namespace 172.16.0.1:8787/rhosp12 \
--env-file=/home/stack/templates/overcloud_images.yaml \
--prefix=openstack- \
--suffix=-docker \
--tag 20171004.1 \
--set ceph_namespace=172.16.0.1:8787/ceph \
--set ceph_image=rhceph-2-rhel7 \
--set ceph_tag=latest \
-e /home/stack/templates/environments/20-network-environment.yaml \
-e /home/stack/templates/environments/30-compute-settings.yaml \
-e /home/stack/templates/environments/60-ceph-ansible.yaml \
-r /usr/share/openstack-tripleo-heat-templates/roles_data.yaml

Would become:

openstack overcloud container image prepare \
--namespace 172.16.0.1:8787/rhosp12 \
--env-file=/home/stack/templates/overcloud_images.yaml \
--prefix=openstack- \
--suffix=-docker \
--tag 20171004.1 \
--set ceph_namespace=172.16.0.1:8787/ceph \
--set ceph_image=rhceph-2-rhel7 \
--set ceph_tag=latest \
--env-dir /home/stack/templates/environments
-r /usr/share/openstack-tripleo-heat-templates/roles_data.yaml

Openstack Pike

Comment 8 Alexander Chuzhoy 2017-11-22 20:47:34 UTC
Verified.


Environment:
python-tripleoclient-7.3.3-4.el7ost


The argument is  "--environment-directory"

Verified by comparing the resulting yamls from:

openstack overcloud container image prepare --namespace=192.168.24.1:8787/rhosp12 --env-file=/home/stack/dd/sasha1 --prefix=openstack- --tag=12.0-20171116.1 --set ceph_namespace=192.168.24.1:8787/ceph --set ceph_image=rhceph-2-rhel7 --set ceph_tag=latest -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible.yaml -e /home/stack/virt/network/network-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/ssl/enable-tls.yaml -e /home/stack/virt/public_vip.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/ssl/tls-endpoints-public-ip.yaml


and
Copied all the "-e <filename.yaml>" from above to  /home/stack/test/templates 

openstack overcloud container image prepare --namespace=192.168.24.1:8787/rhosp12 --env-file=/home/stack/dd/sasha2 --prefix=openstack- --tag=12.0-20171116.1 --set ceph_namespace=192.168.24.1:8787/ceph --set ceph_image=rhceph-2-rhel7 --set ceph_tag=latest --environment-directory /home/stack/test/templates



no difference.

Comment 11 errata-xmlrpc 2017-12-13 22:13:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3462