Skip to content

Commit ba69c65

Browse files
xekvakwetu
authored andcommitted
Implement passing over an additional env file
Enable passing an additional heat environment file to the standalone or tripleo deploy scripts. Simplified a bit by alee. We take the extra env file defined by ADDITIONAL_ENV_FILE, and copy it to the standalone/tripleo node to /tmp/additional_env_file.yaml. This path is fixed. We then look for this fixed path in the relevant scripts executed on the node.
1 parent 6e78112 commit ba69c65

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

devsetup/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ edpm_deploy_instance: ## Spin a instance on edpm node
492492
.PHONY: tripleo_deploy
493493
tripleo_deploy: export CLOUD_DOMAIN=${DNS_DOMAIN}
494494
tripleo_deploy: export TLSE_ENABLED=${TLS_ENABLED}
495+
tripleo_deploy: export TRIPLEO_ADDITIONAL_ENV=${ADDITIONAL_ENV_FILE}
495496
tripleo_deploy: export INTERFACE_MTU=${NETWORK_MTU}
496497
tripleo_deploy: export COMPUTE_CELLS=${EDPM_COMPUTE_CELLS}
497498
tripleo_deploy: export REGISTRY_USER ?= ${RH_REGISTRY_USER}
@@ -524,6 +525,7 @@ standalone_deploy: export MANILA_ENABLED=${MANILA_SERVICE_ENABLED}
524525
standalone_deploy: export HEAT_ENABLED=${HEAT_SERVICE_ENABLED}
525526
standalone_deploy: export CLOUD_DOMAIN=${DNS_DOMAIN}
526527
standalone_deploy: export COMPUTE_CEPH_ENABLED=${EDPM_COMPUTE_CEPH_ENABLED}
528+
standalone_deploy: export STANDALONE_ADDITIONAL_ENV=${ADDITIONAL_ENV_FILE}
527529
standalone_deploy: export CONFIGURE_HUGEPAGES=${EDPM_CONFIGURE_HUGEPAGES}
528530
standalone_deploy: export COMPUTE_CEPH_NOVA=${EDPM_COMPUTE_CEPH_NOVA}
529531
standalone_deploy: export COMPUTE_SRIOV_ENABLED=${EDPM_COMPUTE_SRIOV_ENABLED}

devsetup/scripts/standalone.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ scp $SSH_OPT ${SCRIPTPATH}/../standalone/hugepages.yaml root@$IP:hugepages.yaml
238238
[[ "$EDPM_COMPUTE_CEPH_ENABLED" == "true" ]] && scp $SSH_OPT standalone/ceph.sh root@$IP:/tmp/ceph.sh
239239
scp $SSH_OPT standalone/openstack.sh root@$IP:/tmp/openstack.sh
240240
scp $SSH_OPT standalone/post_config/ironic.sh root@$IP:/tmp/ironic_post.sh
241+
[ -f "${STANDALONE_ADDITIONAL_ENV}" ] && scp $SSH_OPT "${STANDALONE_ADDITIONAL_ENV}" root@$IP:/tmp/additional_env_file.yaml || true
241242
[ -f $HOME/.ssh/id_ecdsa.pub ] || \
242243
ssh-keygen -t ecdsa -f $HOME/.ssh/id_ecdsa -q -N ""
243244
scp $SSH_OPT $HOME/.ssh/id_ecdsa.pub root@$IP:/root/.ssh/id_ecdsa.pub

devsetup/scripts/tripleo.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ else
268268
fi
269269
scp $SSH_OPT ${SCRIPTPATH}/../tripleo/overcloud_roles.yaml zuul@$IP:overcloud_roles.yaml
270270
scp $SSH_OPT ${SCRIPTPATH}/../tripleo/ansible_config.cfg zuul@$IP:ansible_config.cfg
271+
[ -n "${TRIPLEO_ADDITIONAL_ENV}" ] && [ -f "${TRIPLEO_ADDITIONAL_ENV}" ] && scp $SSH_OPT "${TRIPLEO_ADDITIONAL_ENV}" zuul@$IP:/tmp/additional_env_file.yaml || true
271272
if [[ "$EDPM_COMPUTE_CEPH_ENABLED" == "true" ]]; then
272273
scp $SSH_OPT ${SCRIPTPATH}/../tripleo/ceph.sh root@$IP:/tmp/ceph.sh
273274
scp $SSH_OPT ${SCRIPTPATH}/../tripleo/generate_ceph_inventory.py root@$IP:/tmp/generate_ceph_inventory.py

devsetup/standalone/openstack.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,8 @@ if [ "$EDPM_COMPUTE_DHCP_AGENT_ENABLED" = "true" ] ; then
207207
ENV_ARGS+=" -e $HOME/dhcp_agent_template.yaml"
208208
fi
209209

210+
if [ -f "/tmp/additional_env_file.yaml" ]; then
211+
ENV_ARGS+=" -e /tmp/additional_env_file.yaml"
212+
fi
213+
210214
sudo ${CMD} ${CMD_ARGS} ${ENV_ARGS}

devsetup/tripleo/tripleo_install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ if [ "$EDPM_CONFIGURE_HUGEPAGES" = "true" ] && [ "$TLSE_ENABLED" != "true" ] ; t
181181
ENV_ARGS+=" -e $HOME/hugepages.yaml"
182182
fi
183183

184+
if [ -f "/tmp/additional_env_file.yaml" ]; then
185+
ENV_ARGS+=" -e /tmp/additional_env_file.yaml"
186+
fi
187+
184188
if [ "$TLSE_ENABLED" = "true" ]; then
185189
ENV_ARGS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/ssl/tls-everywhere-endpoints-dns.yaml"
186190
ENV_ARGS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/services/haproxy-public-tls-certmonger.yaml"

0 commit comments

Comments
 (0)