diff --git a/roles/collect-logs/defaults/main.yml b/roles/collect-logs/defaults/main.yml index 5dc0df240..834ee715d 100644 --- a/roles/collect-logs/defaults/main.yml +++ b/roles/collect-logs/defaults/main.yml @@ -96,6 +96,7 @@ artcl_collect_list: - /home/*/gating_repo.tar.gz - /home/*/browbeat/ - /usr/share/openstack-tripleo-heat-templates/ + - /home/*/tripleo-heat-templates/ - /tmp/tripleoclient* # The next 2 items are temporary until config-download is executed # from a Mistral workflow (WIP in Queens) @@ -172,6 +173,7 @@ artcl_logstash_files: - /home/*/repo_setup.sh.*.log - /home/*/undercloud_install.log - /home/*/undercloud_reinstall.log + - /home/*/undercloud_custom_tht_script.log - /home/*/upgrade-undercloud-repo.sh.log - /home/*/validate-overcloud-ipmi-connection.log - /home/*/vxlan_networking.sh.log diff --git a/roles/overcloud-prep-config/defaults/main.yml b/roles/overcloud-prep-config/defaults/main.yml index 27783d0f5..09bbb5b34 100644 --- a/roles/overcloud-prep-config/defaults/main.yml +++ b/roles/overcloud-prep-config/defaults/main.yml @@ -32,7 +32,7 @@ undercloud_type: virtual baremetal_instackenv: "{{ working_dir }}/instackenv.json" baremetal_network_environment: "{{ working_dir }}/network-isolation.yml" -overcloud_custom_tht_script: overcloud-custom-tht-script.sh.j2 +overcloud_custom_tht_script: custom-tht-script.sh.j2 overcloud_custom_tht_log: overcloud_custom_tht_script.log bond_with_vlans_copy_nic_configs_script: bond-with-vlans-copy-nic-configs.sh.j2 diff --git a/roles/overcloud-prep-config/tasks/custom_tht.yml b/roles/overcloud-prep-config/tasks/custom_tht.yml deleted file mode 100644 index cb328f2c4..000000000 --- a/roles/overcloud-prep-config/tasks/custom_tht.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Create overcloud custom tht script - template: - src: "{{ overcloud_custom_tht_script }}" - dest: "{{ working_dir }}/overcloud-custom-tht-script.sh" - mode: 0755 - -- name: Checkout custom tht heat templates from src - shell: > - set -o pipefail && - {{ working_dir }}/overcloud-custom-tht-script.sh 2>&1 {{ timestamper_cmd }} > - {{ overcloud_custom_tht_log }} diff --git a/roles/overcloud-prep-config/tasks/main.yml b/roles/overcloud-prep-config/tasks/main.yml index e79b99564..c897b8df7 100644 --- a/roles/overcloud-prep-config/tasks/main.yml +++ b/roles/overcloud-prep-config/tasks/main.yml @@ -57,7 +57,17 @@ when: baremetal_nic_configs is defined - name: Prepare custom t-h-t for overcloud deployment - import_tasks: custom_tht.yml + include_role: + name: tht-prep-config + vars: + custom_tht_log: "{{ overcloud_custom_tht_log }}" + custom_tht_script: "{{ overcloud_custom_tht_script }}" + tht_templates_repo: "{{ overcloud_templates_repo|default('') }}" + tht_templates_refspec: "{{ overcloud_templates_refspec|default('') }}" + tht_templates_branch: "{{ overcloud_templates_branch|default('') }}" + tht_templates_path: "{{ overcloud_templates_path }}" + download_templates_rpm: "{{ download_overcloud_templates_rpm|default('') }}" + prep_post_hook_script: "{{ overcloud_prep_post_hook_script|default('') }}" when: - overcloud_templates_refspec is defined or overcloud_templates_branch is defined - overcloud_templates_repo is defined diff --git a/roles/overcloud-prep-config/templates/overcloud-custom-tht-script.sh.j2 b/roles/overcloud-prep-config/templates/overcloud-custom-tht-script.sh.j2 deleted file mode 100644 index 85890928a..000000000 --- a/roles/overcloud-prep-config/templates/overcloud-custom-tht-script.sh.j2 +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -set -eux - -### --start_docs -## -------------------------------------------------- -## Checkout custom tripleo heat templates -## -------------------------------------------------- - -## ######################## -## Prepare Your Environment -## ######################## - -{% if overcloud_templates_repo is defined and overcloud_templates_path is defined %} -## * Clone the t-h-t templates if needed. -## :: - -sudo rm -rf {{ overcloud_templates_path }} -chmod 755 $HOME -rm -rf {{ working_dir }}/tripleo-heat-templates -git clone {% if overcloud_templates_branch is defined %}-b {{ overcloud_templates_branch }} \ - --single-branch{% endif %} {{ overcloud_templates_repo }} {{ working_dir }}/tripleo-heat-templates -sudo ln -s {{ working_dir }}/tripleo-heat-templates {{ overcloud_templates_path }} - -{% if overcloud_templates_refspec is defined %} -## * Checkout an open t-h-t review if specified -## (this will stomp on the overcloud_templates_branch, so only one should be used). -## :: - -pushd {{ working_dir }}/tripleo-heat-templates -git fetch {{ overcloud_templates_repo }} {{ overcloud_templates_refspec }} && git checkout FETCH_HEAD -popd -{% endif %} - -{% if not composable_scenario|trim == '' %} -## * If desired composable scenario isn't present in the checked-out -## code, but is present in RPM, copy the scenario from RPM location. -## :: -if [ ! -e "{{ overcloud_templates_path }}/ci/environments/{{ composable_scenario }}" \ - -a -e "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ composable_scenario }}" ]; then - cp "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ composable_scenario }}" \ - "{{ overcloud_templates_path }}/ci/environments/{{ composable_scenario }}" -fi -{% endif %} -{% if not upgrade_composable_scenario|trim == '' %} -if [ ! -e "{{ overcloud_templates_path }}/ci/environments/{{ upgrade_composable_scenario }}" \ - -a -e "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ upgrade_composable_scenario }}" ]; then - cp "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ upgrade_composable_scenario }}" \ - "{{ overcloud_templates_path }}/ci/environments/{{ upgrade_composable_scenario }}" -fi -{% endif %} - -{% endif %} - -{% if download_overcloud_templates_rpm is defined and overcloud_templates_path is defined %} -## * Download the t-h-t package. -## :: -rm -rf downloaded-tht-rpm -rm -rf {{ overcloud_templates_path }} -mkdir {{ working_dir }}/downloaded-tht-rpm -pushd {{ working_dir }}/downloaded-tht-rpm - -tht_rpm_name=$(curl {{ tht_rpm_url }} | grep "openstack-tripleo-heat-templates" | grep "noarch.rpm" | grep -v "tripleo-heat-templates-compat" | sed "s/^.*>openstack-tripleo-heat-templates/openstack-tripleo-heat-templates/" | cut -d "<" -f1) -curl -o {{ working_dir }}/downloaded-tht-rpm/$tht_rpm_name {{ tht_rpm_url }}/$tht_rpm_name - -## * Unpack tht sources -## :: - -rpm2cpio $(ls -1 *.rpm | grep $tht_rpm_name) | cpio -ivdm -cp -R usr/share/openstack-tripleo-heat-templates {{ overcloud_templates_path }} -popd -{% endif %} - -{{overcloud_prep_post_hook_script}} - -### --stop_docs diff --git a/roles/tht-prep-config/README.md b/roles/tht-prep-config/README.md new file mode 100644 index 000000000..b87425e83 --- /dev/null +++ b/roles/tht-prep-config/README.md @@ -0,0 +1,70 @@ +ansible-role-tripleo-tht-prep-config +========================================== + +An Ansible "meta" role (do not use it on its own, its for imports only) to +prepare TripleO Heat Templates for TripleO deployments with Heat and Ansible. + +Requirements +------------ + +No requirements. The role should only be used via include/import_roles with +tasks_from. + +Role Variables +-------------- + +- `working_dir`: -- the working dir to contain the cloned and checked-out t-h-t. Defined + in roles/extras-common +- `download_templates_rpm`: if set to true, allow the user to + download a tripleo-heat-templates rpm package from a url defined by the + variable `tht_rpm_url` +- `tht_templates_path`: -- the destination path inside of the working dir to clone + and checkout t-h-t from the given ``tht_templates_repo/_branch/_refspec``. +- `prep_post_hook_script`: if set to a non-empty string, it should be the content + of a bash script that will be run at the end of the t-h-t preparation configuration step. + This should only be use in rare case. +- `composable_scenario`: -- controls specific steps for the composable deployments. +- `upgrade_composable_scenario`: -- controls specific steps for the composable updates/upgrades. + +Dependencies +------------ + +None + +Example Playbook +---------------- + +Here is an example tasks snippet for a playbook (omitted the remaining parts): + +```yaml + vars: + my_custom_tht_script: clone_tht_script.j2.sh + my_custom_tht_log: clone_tht_script.log + tasks: + - name: Prepare custom t-h-t for my super deployment + include_role: + name: tht-prep-config + vars: + custom_tht_log: "{{ my_custom_tht_log }}" + custom_tht_script: "{{ my_custom_tht_script }}" + tht_templates_repo: "{{ my_templates_repo|default('') }}" + tht_templates_refspec: "{{ my_templates_refspec|default('') }}" + tht_templates_branch: "{{ my_templates_branch|default('') }}" + tht_templates_path: "{{ my_templates_path }}" + download_templates_rpm: "{{ download_my_templates_rpm|default('') }}" + prep_post_hook_script: "{{ my_prep_post_hook_script|default('') }}" +``` + +This puts into the current directory `clone-tht-script.sh` j2 rendered from +`clone_tht_script.j2.sh` (it should be placed under `tht-prep-config/templates`), +then executes the script and logs results into `clone_tht_script.log`. + +License +------- + +Apache 2.0 + +Author Information +------------------ + +RDO-CI and Tripleo Deployment Framework teams diff --git a/roles/tht-prep-config/defaults/main.yaml b/roles/tht-prep-config/defaults/main.yaml new file mode 100644 index 000000000..b702ba23b --- /dev/null +++ b/roles/tht-prep-config/defaults/main.yaml @@ -0,0 +1,9 @@ +--- +custom_tht_log: custom-tht-script.log +custom_tht_script: custom-tht-script.sh.j2 +tht_templates_repo: "" +tht_templates_refspec: "" +tht_templates_branch: "" +tht_templates_path: "" +download_templates_rpm: "" +prep_post_hook_script: "" diff --git a/roles/tht-prep-config/meta/main.yml b/roles/tht-prep-config/meta/main.yml new file mode 100644 index 000000000..819da26a3 --- /dev/null +++ b/roles/tht-prep-config/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - extras-common diff --git a/roles/tht-prep-config/tasks/main.yaml b/roles/tht-prep-config/tasks/main.yaml new file mode 100644 index 000000000..41f5e0234 --- /dev/null +++ b/roles/tht-prep-config/tasks/main.yaml @@ -0,0 +1,17 @@ +--- +- name: Evaluate the custom tht script name + set_fact: + script_name: "{{ custom_tht_log|replace('_', '-')|replace('.log', '.sh') }}" + +- name: Create custom tht script + template: + src: "{{ custom_tht_script }}" + dest: "{{ working_dir }}/{{ script_name }}" + mode: 0755 + +- name: Checkout custom tht heat templates from src + shell: > + set -o pipefail && + {{ working_dir }}/{{ script_name }} 2>&1 {{ timestamper_cmd }} > + {{ custom_tht_log }} + become: true diff --git a/roles/tht-prep-config/templates/custom-tht-script.sh.j2 b/roles/tht-prep-config/templates/custom-tht-script.sh.j2 new file mode 100644 index 000000000..5f4179c18 --- /dev/null +++ b/roles/tht-prep-config/templates/custom-tht-script.sh.j2 @@ -0,0 +1,73 @@ +#!/bin/bash + +set -eux + +### --start_docs +## -------------------------------------------------- +## Checkout custom tripleo heat templates +## -------------------------------------------------- + +## ######################## +## Prepare Your Environment +## ######################## + +{% if tht_templates_repo|trim and tht_templates_path not in ['', '/'] %} +## * Clone the t-h-t templates if needed. +## :: + +rm -rf {{ tht_templates_path }} +chmod 755 $HOME +git clone --depth 1 {% if tht_templates_branch|trim %}-b {{ tht_templates_branch }} \ + --single-branch{% endif %} {{ tht_templates_repo }} {{ tht_templates_path }} + +{% if tht_templates_refspec|trim %} +## * Checkout an open t-h-t review if specified +## (this will stomp on the tht_templates_branch, so only one should be used). +## :: + +pushd {{ tht_templates_path }} +git fetch {{ tht_templates_repo }} {{ tht_templates_refspec }} && git checkout FETCH_HEAD +popd +{% endif %} + +{% if not composable_scenario|trim == '' %} +## * If desired composable scenario isn't present in the checked-out +## code, but is present in RPM, copy the scenario from RPM location. +## :: +if [ ! -e "{{ tht_templates_path }}/ci/environments/{{ composable_scenario }}" \ + -a -e "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ composable_scenario }}" ]; then + cp "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ composable_scenario }}" \ + "{{ tht_templates_path }}/ci/environments/{{ composable_scenario }}" +fi +{% endif %} +{% if not upgrade_composable_scenario|trim == '' %} +if [ ! -e "{{ tht_templates_path }}/ci/environments/{{ upgrade_composable_scenario }}" \ + -a -e "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ upgrade_composable_scenario }}" ]; then + cp "/usr/share/openstack-tripleo-heat-templates/ci/environments/{{ upgrade_composable_scenario }}" \ + "{{ tht_templates_path }}/ci/environments/{{ upgrade_composable_scenario }}" +fi +{% endif %} + +{% endif %} + +{% if download_templates_rpm and tht_templates_path|trim %} +## * Download the t-h-t package. +## :: +rm -rf {{ tht_templates_path }} +mkdir -p {{ working_dir }}/{{ tht_templates_path }}/downloaded-tht-rpm +pushd {{ working_dir }}/{{ tht_templates_path }}/downloaded-tht-rpm + +tht_rpm_name=$(curl {{ tht_rpm_url }} | grep "openstack-tripleo-heat-templates" | grep "noarch.rpm" | grep -v "tripleo-heat-templates-compat" | sed "s/^.*>openstack-tripleo-heat-templates/openstack-tripleo-heat-templates/" | cut -d "<" -f1) +curl -o {{ working_dir }}/{{ tht_templates_path }}/downloaded-tht-rpm/$tht_rpm_name {{ tht_rpm_url }}/$tht_rpm_name + +## * Unpack tht sources +## :: + +rpm2cpio $(ls -1 *.rpm | grep $tht_rpm_name) | cpio -ivdm +cp -R usr/share/openstack-tripleo-heat-templates {{ tht_templates_path }} +popd +{% endif %} + +{{ prep_post_hook_script }} + +### --stop_docs diff --git a/roles/undercloud-deploy/README.md b/roles/undercloud-deploy/README.md index f96a54b71..a1f0f4e55 100644 --- a/roles/undercloud-deploy/README.md +++ b/roles/undercloud-deploy/README.md @@ -11,6 +11,8 @@ This requires a running host to deploy the undercloud. Role Variables -------------- +- `undercloud_templates_path`: <'/usr/share/openstack-tripleo-heat-templates'> -- +a path to git clone and check-out t-h-t templates from the corresponding repo/branch/ref paths. - `undercloud_config_file`: <'undercloud.conf.j2'> -- the name of the jinja template used as the base for the undercloud.conf - `undercloud_install_script`: <'undercloud-install.j2'> -- the name of the jinja template @@ -89,10 +91,10 @@ https://docs.openstack.org/tripleo-quickstart/latest/accessing-libvirt.html downloaded ansible configs and processed heat templates for heat installer - `undercloud_undercloud_cleanup`: -- controls tear down of the processed heat templates - `undercloud_upgrade_cleanup`: -- controls post upgrade cleanup after we containerize the undercloud. -- update_containers: -- whether to update containers from the local registry. +- `update_containers`: -- whether to update containers from the local registry. - `undercloud_enable_tempest`: -- The tempest container will be available on the undercloud. -- `undercloud_roles_data`: -- A custom t-h-t roles file (the path must be relative to - ``overcloud_templates_path``). +- `undercloud_roles_data`: -- A custom t-h-t roles file. Consumed from ``undercloud_templates_path`` + or an alternative location as well. - `undercloud_selinux_enabled`: <'true'> -- Enabled for RHEL by default, Disabled for CentOS by default Role Network Variables @@ -168,6 +170,21 @@ Note, the containerized undercloud is a hacking mode for developers, that allows to test containerized components undercloud, with custom, like very minimal, setup layouts. Please do not expect more than that when using it. +To diverge TripleO Heat Templates installation scripts used to deploy/upgrade +undercloud from the similar overcloud cases, use the following variables: + +```yaml + undercloud_composable_scenario: < similarly to composable_scenario for OC > + undercloud_upgrade_composable_scenario: < similarly to upgrade_composable_scenario for OC > + undercloud_prep_post_hook_script: < similarly to overcloud_prep_post_hook_script > + download_undercloud_templates_rpm: < similarly to download_overcloud_templates_rpm > + undercloud_tht_rpm_url: < similarly to tht_rpm_url for OC > + undercloud_templates_path: < similarly to overcloud_templates_path > + undercloud_templates_repo: < similarly to overcloud_templates_repo > + undercloud_templates_branch: < similarly to overcloud_templates_branch > + undercloud_templates_refspec: < similarly to overcloud_templates_refspec > +``` + Example Playbook ---------------- @@ -240,12 +257,12 @@ the ephemeral undercloud heat agent running for debug purposes: ```yaml undercloud_custom_env_files: >- - {{overcloud_templates_path}}/environments/disable-telemetry.yaml - {{overcloud_templates_path}}/environments/docker-minimal.yaml - {{overcloud_templates_path}}/environments/services/etcd.yaml - {{overcloud_templates_path}}/environments/services/octavia.yaml - {{overcloud_templates_path}}/environments/debug.yaml - {{overcloud_templates_path}}/environments/config-debug.yaml + {{undercloud_templates_path}}/environments/disable-telemetry.yaml + {{undercloud_templates_path}}/environments/docker-minimal.yaml + {{undercloud_templates_path}}/environments/services/etcd.yaml + {{undercloud_templates_path}}/environments/services/octavia.yaml + {{undercloud_templates_path}}/environments/debug.yaml + {{undercloud_templates_path}}/environments/config-debug.yaml undercloud_extra_args: >- --timeout 60 ``` @@ -275,7 +292,7 @@ undercloud installation script template omits those services and the `environments/docker.yaml` defaults. You may also override ``undercloud_roles_data`` with a custom roles file -(the path must be relative to the t-h-t templates ``overcloud_templates_path``). +(the path must be relative to the t-h-t templates ``undercloud_templates_path``). For the example above, custom undercloud roles may look like: ``` @@ -307,12 +324,12 @@ And an example playbook to call the role is: overcloud_templates_repo: https://github.com/johndoe/tripleo-heat-templates overcloud_templates_branch: dev undercloud_custom_env_files: >- - {{overcloud_templates_path}}/environments/disable-telemetry.yaml - {{overcloud_templates_path}}/environments/docker-minimal.yaml - {{overcloud_templates_path}}/environments/services/etcd.yaml - {{overcloud_templates_path}}/environments/services/octavia.yaml - {{overcloud_templates_path}}/environments/debug.yaml - {{overcloud_templates_path}}/environments/config-debug.yaml + {{undercloud_templates_path}}/environments/disable-telemetry.yaml + {{undercloud_templates_path}}/environments/docker-minimal.yaml + {{undercloud_templates_path}}/environments/services/etcd.yaml + {{undercloud_templates_path}}/environments/services/octavia.yaml + {{undercloud_templates_path}}/environments/debug.yaml + {{undercloud_templates_path}}/environments/config-debug.yaml undercloud_extra_args: >- --timeout 60 roles: diff --git a/roles/undercloud-deploy/defaults/main.yml b/roles/undercloud-deploy/defaults/main.yml index a88b2c5bb..6c9e34c86 100644 --- a/roles/undercloud-deploy/defaults/main.yml +++ b/roles/undercloud-deploy/defaults/main.yml @@ -66,9 +66,12 @@ undercloud_enable_swift_encryption: false undercloud_undercloud_debug: true +# Path to tripleo-heat-templates to be cloned from given repo/branch/refscpec +undercloud_templates_path: /usr/share/openstack-tripleo-heat-templates + # Use to populate the resource registry for nic configs and networking setup undercloud_resource_registry_args: - OS::TripleO::Undercloud::Net::SoftwareConfig: "{{overcloud_templates_path}}/net-config-noop.yaml" + OS::TripleO::Undercloud::Net::SoftwareConfig: "{{ undercloud_templates_path }}/net-config-noop.yaml" undercloud_network_environment_args: {} ctlplane_masquerade: false @@ -76,7 +79,7 @@ ctlplane_masquerade: false update_containers: false undercloud_enable_routed_networks: false -default_undercloud_roles_data_path: "{{ overcloud_templates_path }}/roles_data_undercloud.yaml" +default_undercloud_roles_data_path: "{{ undercloud_templates_path }}/roles_data_undercloud.yaml" # We disable selinux when running under CentOS. It's enabled for RHEL undercloud_selinux_enabled: >- @@ -85,3 +88,17 @@ undercloud_selinux_enabled: >- {%- else -%} true {%- endif -%} + +# Define a custom t-h-t installation for UC +undercloud_custom_tht_script: custom-tht-script.sh.j2 +undercloud_custom_tht_log: undercloud_custom_tht_script.log + +# FIXME(bogdando) adapt these for real UC upgrade/deploy cases. +# As the tht prep config templates converged with the overcloud upgrade/deploy cases, +# these are yet meaningless for undercloud installations so the defaults +# are set only to disable the controlled code blocks. +undercloud_composable_scenario: "" +undercloud_upgrade_composable_scenario: "" +undercloud_prep_post_hook_script: "" +undercloud_tht_rpm_url: "" +download_undercloud_templates_rpm: false diff --git a/roles/undercloud-deploy/tasks/create-scripts.yml b/roles/undercloud-deploy/tasks/create-scripts.yml index 6c57a443c..833b03666 100644 --- a/roles/undercloud-deploy/tasks/create-scripts.yml +++ b/roles/undercloud-deploy/tasks/create-scripts.yml @@ -72,14 +72,25 @@ dest: "{{ working_dir }}/undercloud-install.sh" mode: 0755 -- name: Prepare custom t-h-t branch/refspec +- name: Prepare undercloud custom t-h-t branch/refspec include_role: - name: overcloud-prep-config - tasks_from: custom_tht + name: tht-prep-config + vars: + custom_tht_log: "{{ undercloud_custom_tht_log }}" + custom_tht_script: "{{ undercloud_custom_tht_script }}" + tht_templates_repo: "{{ undercloud_templates_repo|default('') }}" + tht_templates_refspec: "{{ undercloud_templates_refspec|default('') }}" + tht_templates_branch: "{{ undercloud_templates_branch|default('') }}" + tht_templates_path: "{{ undercloud_templates_path }}" + composable_scenario: "{{ undercloud_composable_scenario }}" + upgrade_composable_scenario: "{{ undercloud_upgrade_composable_scenario }}" + prep_post_hook_script: "{{ undercloud_prep_post_hook_script }}" + download_templates_rpm: "{{ download_undercloud_templates_rpm }}" + tht_rpm_url: "{{ undercloud_tht_rpm_url }}" when: - - overcloud_templates_branch is defined or overcloud_templates_refspec is defined - - overcloud_templates_repo is defined - - overcloud_templates_path is defined + - undercloud_templates_branch is defined or undercloud_templates_refspec is defined + - undercloud_templates_repo is defined + - undercloud_templates_path is defined static: no - name: Noop resource_registry when using net_config_override diff --git a/roles/undercloud-deploy/templates/undercloud-deploy.sh.j2 b/roles/undercloud-deploy/templates/undercloud-deploy.sh.j2 index beebee5a0..469fdcddf 100644 --- a/roles/undercloud-deploy/templates/undercloud-deploy.sh.j2 +++ b/roles/undercloud-deploy/templates/undercloud-deploy.sh.j2 @@ -36,38 +36,38 @@ undercloud_local_ip={{ hostvars['undercloud'].undercloud_ip }} sudo openstack undercloud deploy \ --heat-native \ - --templates={{overcloud_templates_path}} \ + --templates={{ undercloud_templates_path }} \ --local-ip=$undercloud_local_ip \ {% if undercloud_cloud_domain is defined %} --local-domain={{ undercloud_cloud_domain }} \ {% endif %} {% if containerized_undercloud|bool %} {% if undercloud_enable_mistral|bool %} - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/mistral.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/mistral.yaml \ {% endif %} {% if undercloud_enable_tempest|bool %} - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/tempest.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/tempest.yaml \ {% endif %} {% if undercloud_enable_ironic|bool %} - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/ironic.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/ironic.yaml \ {% endif %} {% if undercloud_enable_ironic_inspector|bool %} - -e /usr/share/openstack-tripleo-heat-templates/environments/{{env_files_path}}/ironic-inspector.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/ironic-inspector.yaml \ {% endif %} {% if undercloud_enable_zaqar|bool %} - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/zaqar.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/zaqar.yaml \ {% endif %} {% if undercloud_generate_service_certificate is defined %} - -e /usr/share/openstack-tripleo-heat-templates/environments/{{env_files_path}}/undercloud-haproxy.yaml \ - -e /usr/share/openstack-tripleo-heat-templates/environments/{{env_files_path}}/undercloud-keepalived.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/undercloud-haproxy.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/undercloud-keepalived.yaml \ {% endif %} {% if undercloud_enable_telemetry|bool %} - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/undercloud-gnocchi.yaml \ - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/undercloud-aodh.yaml \ - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/undercloud-panko.yaml \ - -e {{overcloud_templates_path}}/environments/{{env_files_path}}/undercloud-ceilometer.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/undercloud-gnocchi.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/undercloud-aodh.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/undercloud-panko.yaml \ + -e {{ undercloud_templates_path }}/environments/{{ env_files_path }}/undercloud-ceilometer.yaml \ {% endif %} - -e {{overcloud_templates_path}}/environments/docker.yaml \ + -e {{ undercloud_templates_path }}/environments/docker.yaml \ -e {{ working_dir }}/undercloud-containers-default-parameters.yaml \ -e {{ working_dir }}/undercloud-parameter-defaults.yaml \ {% endif %} diff --git a/roles/undercloud-deploy/templates/undercloud.conf.j2 b/roles/undercloud-deploy/templates/undercloud.conf.j2 index 47c86a04a..9a4a05dbe 100644 --- a/roles/undercloud-deploy/templates/undercloud.conf.j2 +++ b/roles/undercloud-deploy/templates/undercloud.conf.j2 @@ -317,7 +317,7 @@ upgrade_cleanup = {{undercloud_upgrade_cleanup}} {% endif %} # Heat templates directory -templates = {{overcloud_templates_path}} +templates = {{ undercloud_templates_path }} # Extra config elements. {% if undercloud_conf_extra != "" %}