diff --git a/ci-scripts/cleanup-stack-image-ovb.sh b/ci-scripts/cleanup-stack-image-ovb.sh index 7b9abefe1..ed7e34de3 100755 --- a/ci-scripts/cleanup-stack-image-ovb.sh +++ b/ci-scripts/cleanup-stack-image-ovb.sh @@ -34,7 +34,7 @@ bash quickstart.sh \ --ansible-debug \ --bootstrap \ --working-dir $WORKSPACE/ \ ---requirements quickstart-role-requirements.txt \ +--requirements quickstart-extras-requirements.txt \ --requirements $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/requirements_files/$REQUIREMENTS_FILE \ --release $RELEASE \ --extra-vars prefix=$PREFIX \ diff --git a/ci-scripts/collect-logs.sh b/ci-scripts/collect-logs.sh index 5a5e08b97..749fe9e14 100644 --- a/ci-scripts/collect-logs.sh +++ b/ci-scripts/collect-logs.sh @@ -23,7 +23,7 @@ bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ --no-clone \ --bootstrap \ --retain-inventory \ - --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \ + --requirements $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt \ --config $WORKSPACE/config/general_config/$CONFIG.yml \ --playbook collect-logs.yml \ --extra-vars @$WORKSPACE/config/general_config/centosci-logs.yml \ diff --git a/ci-scripts/devmode_tempest.sh b/ci-scripts/devmode_tempest.sh index 3e45c0004..c28524787 100644 --- a/ci-scripts/devmode_tempest.sh +++ b/ci-scripts/devmode_tempest.sh @@ -24,6 +24,7 @@ bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ --extra-vars @$WORKSPACE/config/general_config/devmode.yml \ --release "${RELEASE}-tripleo" \ --extra-vars test_ping=False \ + --playbook quickstart-extras.yml \ $VIRTHOST bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ @@ -32,10 +33,11 @@ bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ --no-clone \ --bootstrap \ --retain-inventory \ - --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \ + --requirements $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt \ --playbook tempest.yml \ --extra-vars tempest_source=rdo \ --extra-vars tempest_format=venv \ + --playbook quickstart-extras.yml \ $VIRTHOST popd diff --git a/ci-scripts/feature-scale-deploy.sh b/ci-scripts/feature-scale-deploy.sh index 132b6a81b..e5becf583 100644 --- a/ci-scripts/feature-scale-deploy.sh +++ b/ci-scripts/feature-scale-deploy.sh @@ -35,7 +35,7 @@ bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ --working-dir $WORKSPACE/ \ --bootstrap \ --no-clone \ - --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \ + --requirements $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt \ -e deploy_timeout=75 \ --config $WORKSPACE/config/general_config/$CONFIG.yml \ --tags all \ diff --git a/ci-scripts/full-deploy-baremetal.sh b/ci-scripts/full-deploy-baremetal.sh index 2f77fcb8b..ba2183de9 100644 --- a/ci-scripts/full-deploy-baremetal.sh +++ b/ci-scripts/full-deploy-baremetal.sh @@ -30,7 +30,7 @@ bash quickstart.sh \ --tags all \ --no-clone \ --teardown all \ - --requirements quickstart-role-requirements.txt \ + --requirements quickstart-extras-requirements.txt \ --requirements $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/requirements_files/$REQUIREMENTS_FILE \ --config $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/config_files/$CONFIG_FILE \ --extra-vars @$WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/env_settings.yml \ diff --git a/ci-scripts/full-deploy-ovb.sh b/ci-scripts/full-deploy-ovb.sh index 864da9d4f..e159eb394 100644 --- a/ci-scripts/full-deploy-ovb.sh +++ b/ci-scripts/full-deploy-ovb.sh @@ -33,7 +33,7 @@ bash quickstart.sh \ --working-dir $WORKSPACE/ \ --tags all \ --no-clone \ - --requirements quickstart-role-requirements.txt \ + --requirements quickstart-extras-requirements.txt \ --requirements $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/requirements_files/$REQUIREMENTS_FILE \ --config $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/config_files/$CONFIG_FILE \ --extra-vars @$OVB_SETTINGS_FILE \ diff --git a/ci-scripts/full-deploy.sh b/ci-scripts/full-deploy.sh index 06daeb48b..72a857e22 100644 --- a/ci-scripts/full-deploy.sh +++ b/ci-scripts/full-deploy.sh @@ -33,5 +33,8 @@ bash quickstart.sh \ --working-dir $WORKSPACE/ \ --no-clone \ --release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \ + --bootstrap \ + --requirements quickstart-extras-requirements.txt \ + --playbook quickstart-extras.yml \ $VIRTHOST popd diff --git a/ci-scripts/ovb-image-upload.sh b/ci-scripts/ovb-image-upload.sh index 966bf0692..76dc2c345 100755 --- a/ci-scripts/ovb-image-upload.sh +++ b/ci-scripts/ovb-image-upload.sh @@ -25,7 +25,7 @@ bash quickstart.sh \ --ansible-debug \ --bootstrap \ --working-dir $WORKSPACE/ \ ---requirements quickstart-role-requirements.txt \ +--requirements quickstart-extras-requirements.txt \ --requirements $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/requirements_files/$REQUIREMENTS_FILE \ --release $RELEASE \ --extra-vars @$OVB_CREDS_FILE \ diff --git a/ci-scripts/roles-deploy.sh b/ci-scripts/roles-deploy.sh index bb4c2a95a..e48155884 100644 --- a/ci-scripts/roles-deploy.sh +++ b/ci-scripts/roles-deploy.sh @@ -34,7 +34,7 @@ if [ "$JOB_TYPE" = "gate" ]; then --working-dir $WORKSPACE/ \ --no-clone \ --bootstrap \ - --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \ + --requirements $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt \ --playbook gate-roles.yml \ --release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \ $VIRTHOST @@ -44,7 +44,7 @@ if [ "$JOB_TYPE" = "gate" ]; then --working-dir $WORKSPACE/ \ --no-clone \ --bootstrap \ - --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \ + --requirements $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt \ --playbook gate-roles.yml \ --release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \ $VIRTHOST @@ -57,7 +57,7 @@ if [ "$JOB_TYPE" = "dlrn-gate" ] || [ "$JOB_TYPE" = "dlrn-gate-testing" ]; then --no-clone \ --bootstrap \ --extra-vars artg_compressed_gating_repo="/home/stack/gating_repo.tar.gz" \ - --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \ + --requirements $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt \ --playbook dlrn-gate.yml \ --tags all \ --teardown all \ @@ -70,8 +70,8 @@ if [ "$JOB_TYPE" = "dlrn-gate" ] || [ "$JOB_TYPE" = "dlrn-gate-testing" ]; then --retain-inventory \ --extra-vars compressed_gating_repo="/home/stack/gating_repo.tar.gz" \ --config $WORKSPACE/config/general_config/$CONFIG.yml \ - --playbook tripleo-roles.yml \ - --skip-tags provision,undercloud-post-install \ + --playbook quickstart-extras.yml \ + --skip-tags provision \ --tags all \ --teardown none \ --release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \ @@ -82,10 +82,9 @@ else --working-dir $WORKSPACE/ \ --no-clone \ --bootstrap \ - --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \ + --requirements $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt \ --config $WORKSPACE/config/general_config/$CONFIG.yml \ - --playbook tripleo-roles.yml \ - --skip-tags undercloud-post-install \ + --playbook quickstart-extras.yml \ --tags all \ --release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \ $VIRTHOST diff --git a/playbooks/quickstart-extras.yml b/playbooks/quickstart-extras.yml new file mode 100644 index 000000000..c57090d9f --- /dev/null +++ b/playbooks/quickstart-extras.yml @@ -0,0 +1,71 @@ +# This is the playbook used by the `quickstart.sh` script. + +- include: quickstart.yml + +# Prepare any additional configuration files required by the overcloud +- name: Prepare configuration files for the overcloud deployment + hosts: undercloud + gather_facts: no + roles: + - overcloud-prep-config + +# Prepare the overcloud images for deployment +- name: Prepare the overcloud images for deployment + hosts: undercloud + gather_facts: no + roles: + - overcloud-prep-images + +# Prepare the overcloud flavor configuration +- name: Prepare overcloud flavors + hosts: undercloud + gather_facts: no + roles: + - overcloud-prep-flavors + +# Prepare the undercloud networks for the overcloud deployment +- name: Prepare the undercloud networks for the overcloud deployment + hosts: undercloud + gather_facts: no + roles: + - overcloud-prep-network + +# Deploy the overcloud +- name: Deploy the overcloud + hosts: undercloud + gather_facts: no + roles: + - tripleo-overcloud + +- name: Add the overcloud nodes to the generated inventory + hosts: undercloud + gather_facts: yes + tags: + - overcloud-deploy + vars: + inventory: all + roles: + - tripleo-inventory + +# Check the results of the deployment, note after inventory has executed +- name: Check the result of the deployment + hosts: localhost + tags: + - overcloud-deploy + tasks: + - name: ensure the deployment result has been read into memory + include_vars: "{{ local_working_dir }}/overcloud_deployment_result.json" + + # overcloud_deploy_result = ["failed", "passed"] + - name: did the deployment pass or fail? + debug: var=overcloud_deploy_result + failed_when: overcloud_deploy_result == "failed" + +# Validate the deployment +- name: validate the overcloud + hosts: undercloud + tags: + - overcloud-validate + gather_facts: no + roles: + - tripleo-overcloud-validate diff --git a/playbooks/quickstart.yml b/playbooks/quickstart.yml index 5dff4d79d..24d9d8ccb 100644 --- a/playbooks/quickstart.yml +++ b/playbooks/quickstart.yml @@ -53,48 +53,8 @@ - tripleo-inventory # Deploy the undercloud -- name: Install undercloud and deploy overcloud +- name: Install undercloud hosts: undercloud gather_facts: no roles: - tripleo/undercloud - -# Deploy the overcloud -- name: Deploy the overcloud - hosts: undercloud - gather_facts: no - roles: - - tripleo/overcloud - -- name: Add the overcloud nodes to the generated inventory - hosts: undercloud - gather_facts: yes - tags: - - overcloud-deploy - vars: - inventory: all - roles: - - tripleo-inventory - -# Check the results of the deployment, note after inventory has executed -- name: Check the result of the deployment - hosts: localhost - tags: - - overcloud-deploy - tasks: - - name: ensure the deployment result has been read into memory - include_vars: "{{ local_working_dir }}/overcloud_deployment_result.json" - - # overcloud_deploy_result = ["failed", "passed"] - - name: did the deployment pass or fail? - debug: var=overcloud_deploy_result - failed_when: overcloud_deploy_result == "failed" - -# Validate the deployment -- name: validate the overcloud - hosts: undercloud - tags: - - overcloud-validate - gather_facts: no - roles: - - tripleo/validate diff --git a/quickstart-extras-requirements.txt b/quickstart-extras-requirements.txt new file mode 100644 index 000000000..b506d9b71 --- /dev/null +++ b/quickstart-extras-requirements.txt @@ -0,0 +1,23 @@ +# Roles + +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-prep-config.git/#egg=ansible-role-tripleo-overcloud-prep-config +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-prep-flavors.git/#egg=ansible-role-tripleo-overcloud-prep-flavors +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-prep-images.git/#egg=ansible-role-tripleo-overcloud-prep-images +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-prep-network.git/#egg=ansible-role-tripleo-overcloud-prep-network +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud.git/#egg=ansible-role-tripleo-overcloud +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-validate.git/#egg=ansible-role-tripleo-overcloud-validate +git+https://github.com/redhat-openstack/ansible-role-tripleo-cleanup-nfo.git/#egg=ansible-role-tripleo-cleanup-nfo +git+https://github.com/redhat-openstack/ansible-role-tripleo-collect-logs.git/#egg=ansible-role-tripleo-collect-logs +git+https://github.com/redhat-openstack/ansible-role-tripleo-gate.git#egg=ansible-role-tripleo-gate +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-upgrade.git#egg=ansible-role-tripleo-overcloud-upgrade +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-scale-nodes.git#egg=ansible-role-tripleo-overcloud-scale-nodes +git+https://github.com/redhat-openstack/ansible-role-tripleo-tempest.git#egg=ansible-role-tripleo-tempest +git+https://github.com/redhat-openstack/ansible-role-tripleo-baremetal-prep-virthost.git#egg=ansible-role-tripleo-baremetal-prep-virthost +git+https://github.com/redhat-openstack/ansible-role-tripleo-overcloud-prep-baremetal.git#egg=ansible-role-tripleo-overcloud-prep-baremetal +git+https://github.com/redhat-openstack/ansible-role-tripleo-provision-heat.git#egg=ansible-role-tripleo-provision-heat +git+https://github.com/redhat-openstack/ansible-role-tripleo-validate-ipmi.git#egg=ansible-role-tripleo-validate-ipmi + + +# To pull in local development changes +#file:////ansible-role-foo/#egg=ansible-role-foo + diff --git a/quickstart.sh b/quickstart.sh index 07b020e32..8882cf866 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -432,16 +432,9 @@ Access the undercloud by: ssh -F $OPT_WORKDIR/ssh.config.ansible undercloud -There are scripts in the home directory to continue the deploy: +Follow the documentation in the link below to complete your deployment. - overcloud-deploy.sh will deploy the overcloud - overcloud-deploy-post.sh will do any post-deploy configuration - overcloud-validate.sh will run post-deploy validation - -Alternatively, you can ignore these scripts and follow the upstream docs, -starting from the overcloud deploy section: - - http://ow.ly/1Vc1301iBlb + http://ow.ly/c44w304begR ################################## Virtual Environment Setup Complete diff --git a/roles/tripleo/overcloud/defaults/main.yml b/roles/tripleo/overcloud/defaults/main.yml deleted file mode 100644 index e896baf23..000000000 --- a/roles/tripleo/overcloud/defaults/main.yml +++ /dev/null @@ -1,73 +0,0 @@ -# Script and log locations used during the deploy process. -deploy_script: overcloud-deploy.sh.j2 -deploy_log: "{{ working_dir }}/overcloud_deploy.log" -post_deploy_script: overcloud-deploy-post.sh.j2 -post_deploy_log: "{{ working_dir }}/overcloud_deploy_post.log" -validate_script: overcloud-validate.sh.j2 - -# `floating_ip_cidr` controls the address range used in the network -# created for tempest tests. We use Ansible's [ipaddr][] filter to -# calculate addresses within this range so that you can provide a -# different value for `floating_ip_cidr` and in many cases not need to -# change any of the related variables. -# -# [ipaddr]: http://docs.ansible.com/ansible/playbooks_filters_ipaddr.html -floating_ip_cidr: "{{ undercloud_network_cidr|default('192.0.2.0/24') }}" -floating_ip_start: "{{ floating_ip_cidr|nthhost(100) }}" -floating_ip_end: "{{ floating_ip_cidr|nthhost(120) }}" -external_network_gateway: "{{ floating_ip_cidr|nthhost(1) }}" - -# Minutes to wait before giving up on the deploy. -deploy_timeout: 90 -extra_args: "" -libvirt_args: "--libvirt-type qemu" - -# we generally assume that the argument to --control-flavor will -# always be the `oooq_control` that we create from the flavors: key. -# If the deployer needs to use a different name, she can configure a -# `flavor_map` key that will map overcloud roles to specific flavor -# names, like: -# -# flavor_map: -# control: my_special_control_flavor -# -# This is to avoid having to replace the flavor_args key wholesale for -# a single change. -# -flavor_args: >- - --control-flavor {{flavor_map.control - if flavor_map is defined and 'control' in flavor_map else 'oooq_control'}} - --compute-flavor {{flavor_map.compute - if flavor_map is defined and 'compute' in flavor_map else 'oooq_compute'}} - --ceph-storage-flavor {{flavor_map.ceph - if flavor_map is defined and 'ceph' in flavor_map else 'oooq_ceph'}} - -timeout_args: "--timeout {{deploy_timeout}}" - -network_args: "" -pacemaker_args: "" - -deploy_args: >- - {{ libvirt_args }} - {{ flavor_args }} - {{ timeout_args }} - {{ network_args }} - {{ pacemaker_args }} - {{ extra_args }} - -step_deploy_overcloud: true -step_validate_overcloud: true -prepare_tempest: false - -# If `test_tempest` is `true`, run tempests tests, otherwise do not -# run them. -test_tempest: false -tempest_regex: ".*smoke" -tempest_workers: 2 - -# If `test_ping` is `true`, run a simple ping test to validate the -# overcloud. -test_ping: true - -# Path to tripleo-heat-templates -overcloud_templates_path: /usr/share/openstack-tripleo-heat-templates diff --git a/roles/tripleo/overcloud/meta/main.yml b/roles/tripleo/overcloud/meta/main.yml deleted file mode 100644 index fcce55168..000000000 --- a/roles/tripleo/overcloud/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - tripleo diff --git a/roles/tripleo/overcloud/tasks/create-scripts.yml b/roles/tripleo/overcloud/tasks/create-scripts.yml deleted file mode 100644 index 71ffbc6ac..000000000 --- a/roles/tripleo/overcloud/tasks/create-scripts.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Generate a number of scripts from templates. These are scripts -# rather than additional ansible tasks so that they can be run -# manually from the undercloud host. -- name: Create overcloud deploy script - template: - src: "{{ deploy_script }}" - dest: "{{ working_dir }}/overcloud-deploy.sh" - mode: 0755 - -- name: Create overcloud validate script - template: - src: "{{ validate_script }}" - dest: "{{ working_dir }}/overcloud-validate.sh" - mode: 0755 - -- name: Create tempest skipfile - template: - src: skipfile.j2 - dest: "{{ working_dir }}/skipfile" - mode: 0644 - -- name: Create tempest run script - template: - src: run-tempest.sh.j2 - dest: "{{ working_dir }}/run-tempest.sh" - mode: 0755 - -- name: Create post-deploy script - template: - src: "{{ post_deploy_script }}" - dest: "{{ working_dir }}/overcloud-deploy-post.sh" - mode: 0755 diff --git a/roles/tripleo/overcloud/tasks/deploy-overcloud.yml b/roles/tripleo/overcloud/tasks/deploy-overcloud.yml deleted file mode 100644 index eda7a8165..000000000 --- a/roles/tripleo/overcloud/tasks/deploy-overcloud.yml +++ /dev/null @@ -1,4 +0,0 @@ -- name: Deploy the overcloud - shell: | - {{ working_dir }}/overcloud-deploy.sh > {{ deploy_log }} 2>&1 - when: step_deploy_overcloud diff --git a/roles/tripleo/overcloud/tasks/main.yml b/roles/tripleo/overcloud/tasks/main.yml deleted file mode 100644 index eb9bb4433..000000000 --- a/roles/tripleo/overcloud/tasks/main.yml +++ /dev/null @@ -1,20 +0,0 @@ -- include: pre-deploy.yml - tags: - - overcloud-scripts - -- include: create-scripts.yml - tags: - - overcloud-scripts - -- include: deploy-overcloud.yml - tags: - - overcloud-deploy - -- include: overcloud-status.yml - tags: - - overcloud-deploy - -- include: post-deploy.yml - tags: - - overcloud-post-deploy - when: overcloud_deploy_result == "passed" diff --git a/roles/tripleo/overcloud/tasks/overcloud-status.yml b/roles/tripleo/overcloud/tasks/overcloud-status.yml deleted file mode 100644 index 1000f0a87..000000000 --- a/roles/tripleo/overcloud/tasks/overcloud-status.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -# The overlcoud deployment has been known at times to not provide an -# accurate error code. -# If we don't get a useful error code from the previous script, so check -# the log for a CREATE_FAILED message. -# use ! to invert the error code so 1 = fail, 0 = pass -# don't use -q to allow stdout to be visible. - -# Other option to consider vs. grep -#/usr/bin/awk '/Stack overcloud CREATE_/ && /FAILED/{exit 1}' {{ deploy_log }} - -- name: Check overcloud deploy status - shell: > - ! /usr/bin/grep 'Stack overcloud CREATE_FAILED' {{ deploy_log }} - register: deploy_result - ignore_errors: true - -- name: write out overcloud status to a file on the localhost - shell: > - echo '{ "overcloud_deploy_result": "failed" }' > "{{ local_working_dir }}/overcloud_deployment_result.json" - delegate_to: localhost - when: deploy_result.rc != 0 - -- name: write out overcloud status to a file on the localhost - shell: > - echo '{ "overcloud_deploy_result": "passed" }' > "{{ local_working_dir }}/overcloud_deployment_result.json" - delegate_to: localhost - when: deploy_result.rc == 0 - -- name: import deployment status from file - include_vars: "{{ local_working_dir }}/overcloud_deployment_result.json" - -- name: echo deployment_status - debug: var=overcloud_deploy_result - - diff --git a/roles/tripleo/overcloud/tasks/post-deploy.yml b/roles/tripleo/overcloud/tasks/post-deploy.yml deleted file mode 100644 index c83f87c84..000000000 --- a/roles/tripleo/overcloud/tasks/post-deploy.yml +++ /dev/null @@ -1,15 +0,0 @@ -# This makes the overcloudrc file available locally. This file -# contains credentials for accessing OpenStack API services on the -# overcloud. -- name: Copy overcloudrc to ansible host - fetch: - flat: true - src: overcloudrc - dest: "{{ local_working_dir }}/overcloudrc" - -- name: Run post-deploy script - shell: | - {{ working_dir }}/overcloud-deploy-post.sh \ - > {{ post_deploy_log }} 2>&1 - -- include: updatessh.yml diff --git a/roles/tripleo/overcloud/tasks/pre-deploy.yml b/roles/tripleo/overcloud/tasks/pre-deploy.yml deleted file mode 100644 index 03ea6de0c..000000000 --- a/roles/tripleo/overcloud/tasks/pre-deploy.yml +++ /dev/null @@ -1,13 +0,0 @@ -- name: set network_args fact - set_fact: - network_args: >- - -e {{overcloud_templates_path}}/environments/network-isolation.yaml - -e {{overcloud_templates_path}}/environments/net-single-nic-with-vlans.yaml - -e $HOME/network-environment.yaml - when: network_isolation - -- name: enable pacemaker - set_fact: - pacemaker_args: >- - -e {{overcloud_templates_path}}/environments/puppet-pacemaker.yaml - when: enable_pacemaker diff --git a/roles/tripleo/overcloud/tasks/updatessh.yml b/roles/tripleo/overcloud/tasks/updatessh.yml deleted file mode 100644 index 449067ef8..000000000 --- a/roles/tripleo/overcloud/tasks/updatessh.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Update the ssh configuration on the undercloud to provide convenient -# access to the overcloud hosts. Creates an entry in `.ssh/config` -# for each overcloud hosts that will: -# -# - Ensure we connect as the `heat-admin` user -# - Avoid ssh hostkey checks, which can be a pain in rapidly changing -# development environments. -- name: Get list of overcloud servers - shell: | - . {{ working_dir }}/stackrc - openstack server list -f json - register: overcloud_servers_cmd - -- name: Set overcloud_servers fact - set_fact: - overcloud_servers: "{{ overcloud_servers_cmd.stdout }}" - -- name: Ensure .ssh directory exists - file: - path: .ssh - state: directory - mode: "0700" - -- name: Add ssh config for accessing overcloud servers - blockinfile: - dest: .ssh/config - create: true - mode: "0600" - block: | - Host {{ overcloud_servers | map(attribute='Name') | join(' ') }} - - User heat-admin - StrictHostkeyChecking no - UserKnownHostsFile /dev/null diff --git a/roles/tripleo/overcloud/templates/configure-tempest.sh.j2 b/roles/tripleo/overcloud/templates/configure-tempest.sh.j2 deleted file mode 100644 index e2f157f81..000000000 --- a/roles/tripleo/overcloud/templates/configure-tempest.sh.j2 +++ /dev/null @@ -1,70 +0,0 @@ -## Prepare tempest -## --------------- - -## * Source in the overcloud credentials. -## :: - -source {{ working_dir }}/overcloudrc - -## * Clean up the "nova" network if it exists from a previous run. -## :: - -neutron net-delete nova > /dev/null 2>&1 || true - -## * Create a network named "nova" for use when running tempest. -## :: - -neutron net-create nova --router:external=True \ - --provider:network_type flat \ - --provider:physical_network datacentre - -public_net_id=$(neutron net-show nova -f value -c id) - -neutron subnet-create --name ext-subnet \ - --allocation-pool \ - start={{ floating_ip_start }},end={{ floating_ip_end }} \ - --disable-dhcp \ - --gateway {{ external_network_gateway }} \ - nova {{ floating_ip_cidr }} - -## * Clean up from any previous tempest run. -## :: - -rm -rf {{ working_dir }}/tempest -mkdir {{ working_dir }}/tempest -cd {{ working_dir }}/tempest - -## .. note:: Workaround: clone missing packages: https://bugzilla.redhat.com/show_bug.cgi?id=1333884 -## when using that venv install, we need requirements.txt and test-requirements.txt -## as package does not provide it, curl from the origin and set on the right directory -## before venv install. -## :: - -curl https://raw.githubusercontent.com/redhat-openstack/tempest/master/requirements.txt -o requirements.txt -curl https://raw.githubusercontent.com/redhat-openstack/tempest/master/test-requirements.txt -o test-requirements.txt - -## * Generate a tempest configuration. -## :: - -sudo yum install -y libffi-devel openssl-devel python-virtualenv -/usr/share/openstack-tempest-*/tools/configure-tempest-directory -# TODO (sshnaidm): to move for packages when bug will be fixed: -# https://bugzilla.redhat.com/show_bug.cgi?id=1333884 -python ./tools/install_venv.py -./tools/with_venv.sh pip install junitxml httplib2 -./tools/with_venv.sh ./tools/config_tempest.py --out etc/tempest.conf \ - --network-id $public_net_id \ - --deployer-input ~/tempest-deployer-input.conf \ - --debug --create \ - identity.uri $OS_AUTH_URL \ - identity.admin_password $OS_PASSWORD \ - network.tenant_network_cidr 192.168.0.0/24 \ - object-storage.operator_role swiftoperator \ - compute.allow_tenant_isolation true \ - compute.build_timeout 500 \ - compute.image_ssh_user cirros \ - compute.ssh_user cirros \ - network.build_timeout 500 \ - volume.build_timeout 500 \ - scenario.ssh_user cirros \ - orchestration.stack_owner_role heat_stack_owner diff --git a/roles/tripleo/overcloud/templates/overcloud-deploy-post.sh.j2 b/roles/tripleo/overcloud/templates/overcloud-deploy-post.sh.j2 deleted file mode 100644 index a92525553..000000000 --- a/roles/tripleo/overcloud/templates/overcloud-deploy-post.sh.j2 +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -set -eux - -### --start_docs -## Post overcloud deployment steps -## =============================== - -## * Prepare Your Environment. -## :: - -HOSTFILE=/etc/hosts - -## * Source in the undercloud credentials. -## :: - -. {{ working_dir }}/stackrc - -## * Remove any old overcloud host entries from `/etc/hosts`. -## :: - -sudo sed -i '/^## BEGIN OVERCLOUD HOSTS/,/^## END OVERCLOUD HOSTS/ d' $HOSTFILE - -## * Add overcloud hosts to `/etc/hosts`. -## :: - -cat < /dev/null 2>&1; then - openstack role create heat_stack_owner - openstack role add --project admin --user admin heat_stack_owner -fi -### --stop_docs diff --git a/roles/tripleo/overcloud/templates/overcloud-deploy.sh.j2 b/roles/tripleo/overcloud/templates/overcloud-deploy.sh.j2 deleted file mode 100644 index 57cdd8e85..000000000 --- a/roles/tripleo/overcloud/templates/overcloud-deploy.sh.j2 +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -set -eux - -### --start_docs -## Deploying the overcloud -## ======================= - -## Prepare Your Environment -## ------------------------ - -## * Source in the undercloud credentials. -## :: - -source {{ working_dir }}/stackrc - -### --stop_docs -# Wait until there are hypervisors available. -while true; do - count=$(openstack hypervisor stats show -c count -f value) - if [ $count -gt 0 ]; then - break - fi -done - -### --start_docs - -{% if test_ping %} -## * Include configuration necessary for the ping test here if requested via the -## ansible `test_ping` variable. -## :: - -DEPLOY_ENV_YAML=/tmp/deploy_env.yaml - -## * Set most service workers to 1 to minimise memory usage on -## the deployed overcloud when using the pingtest. We use this -## test over tempest when we are memory constrained, ie the HA jobs. -## :: - -cat > $DEPLOY_ENV_YAML << EOENV -parameter_defaults: - controllerExtraConfig: -{% if release in ['mitaka','liberty'] %} - # In releases before Mitaka, HeatWorkers doesn't modify - # num_engine_workers, so handle via heat::config - heat::config::heat_config: - DEFAULT/num_engine_workers: - value: 1 -{% endif %} - heat::api_cloudwatch::enabled: false - heat::api_cfn::enabled: false - HeatWorkers: 1 - CeilometerWorkers: 1 - CinderWorkers: 1 - GlanceWorkers: 1 - KeystoneWorkers: 1 - NeutronWorkers: 1 - NovaWorkers: 1 - SwiftWorkers: 1 -EOENV -{% endif %} - -## * Deploy the overcloud! -## :: -openstack overcloud deploy \ - --templates {{overcloud_templates_path}} \ - {{ deploy_args }} \ - ${DEPLOY_ENV_YAML:+-e $DEPLOY_ENV_YAML} "$@" || true - -### --stop_docs -# We don't always get a useful error code from the openstack deploy command, -# so check `heat stack-list` for a CREATE_FAILED status. -if heat stack-list | grep -q 'CREATE_FAILED'; then -# get the failures list -openstack stack failures list overcloud > failed_deployment_list.log || true - -# get any puppet related errors -for failed in $(heat resource-list \ - --nested-depth 5 overcloud | grep FAILED | - grep 'StructuredDeployment ' | cut -d '|' -f3) -do - echo "heat deployment-show out put for deployment: $failed" >> failed_deployments.log - echo "######################################################" >> failed_deployments.log - heat deployment-show $failed >> failed_deployments.log - echo "######################################################" >> failed_deployments.log - echo "puppet standard error for deployment: $failed" >> failed_deployments.log - echo "######################################################" >> failed_deployments.log - # the sed part removes color codes from the text - heat deployment-show $failed | - jq -r .output_values.deploy_stderr | - sed -r "s:\x1B\[[0-9;]*[mK]::g" >> failed_deployments.log - echo "######################################################" >> failed_deployments.log -done -fi diff --git a/roles/tripleo/overcloud/templates/overcloud-validate.sh.j2 b/roles/tripleo/overcloud/templates/overcloud-validate.sh.j2 deleted file mode 100644 index 3a9d901b2..000000000 --- a/roles/tripleo/overcloud/templates/overcloud-validate.sh.j2 +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -set -eux - -### --start_docs -## Validate the overcloud deployment -## ================================= - -## Prepare Test Environment -## ------------------------ - -## * Translate some ansible variables into shell variables. -## (trown) the new lines in between these are needed so that -## after templating they variable assignments are on separate lines. -## :: - -TEST_PING={% if test_ping|bool %}1{% else %}0{% endif %} - -PREPARE_TEMPEST={% if prepare_tempest|bool %}1{% else %}0{% endif %} - -TEST_TEMPEST={% if test_tempest|bool %}1{% else %}0{% endif %} - -# Run the appropriate chunk of code if the corresponding variable was set. #nodocs - -if [ ${TEST_PING} == "1" ]; then #nodocs - -{% include 'tripleo-pingtest.sh.j2' %} - -fi #nodocs - -if [[ ${PREPARE_TEMPEST} == "1" || ${TEST_TEMPEST} == "1" ]]; then #nodocs - -{% include 'configure-tempest.sh.j2' %} - -fi #nodocs - -if [ ${TEST_TEMPEST} == "1" ]; then #nodocs - -{% include 'run-tempest.sh.j2' %} - -fi #nodocs -### --stop_docs diff --git a/roles/tripleo/overcloud/templates/run-tempest.sh.j2 b/roles/tripleo/overcloud/templates/run-tempest.sh.j2 deleted file mode 100644 index b669b2584..000000000 --- a/roles/tripleo/overcloud/templates/run-tempest.sh.j2 +++ /dev/null @@ -1,7 +0,0 @@ -## Run tempest tests -## ----------------- -## :: - -./tools/with_venv.sh ./tools/run-tests.sh {{tempest_regex}} --concurrency {{ tempest_workers }} --skip-file {{ working_dir }}/skipfile 2>&1 > ~/tempest_console.log && exitval=0 || exitval=$? -subunit2html $(find ~/tempest/.testrepository -name [0-9] | head -1) ~/tempest.html >> ~/tempest_console.log ||: -exit ${exitval} diff --git a/roles/tripleo/overcloud/templates/skipfile.j2 b/roles/tripleo/overcloud/templates/skipfile.j2 deleted file mode 100644 index 2feb93a8e..000000000 --- a/roles/tripleo/overcloud/templates/skipfile.j2 +++ /dev/null @@ -1,11 +0,0 @@ -# rhbz1304933 --tempest.api.telemetry.test_telemetry_notification_api -# old bug rhbz1272289 --tempest.scenario.test_volume_boot_pattern --tempest.api.volume.test_volumes_get -# rhbz1266947 --tempest.api.identity.*v3 -# rhbz1357667 --tempest.api.data_processing -# lpbug 1605654 --tempest.scenario.test_network_basic_ops.TestNetworkBasicOps diff --git a/roles/tripleo/overcloud/templates/tripleo-pingtest.sh.j2 b/roles/tripleo/overcloud/templates/tripleo-pingtest.sh.j2 deleted file mode 100644 index 35933e535..000000000 --- a/roles/tripleo/overcloud/templates/tripleo-pingtest.sh.j2 +++ /dev/null @@ -1,42 +0,0 @@ -## Ping test -## --------- -## :: - -PINGTEST_TEMPLATE=tenantvm_floatingip -EXTERNAL_NETWORK_GATEWAY={{ external_network_gateway }} -FLOATING_IP_CIDR={{ floating_ip_cidr }} -FLOATING_IP_START={{ floating_ip_start }} -FLOATING_IP_END={{ floating_ip_end }} -export PINGTEST_TEMPLATE -export EXTERNAL_NETWORK_GATEWAY FLOATING_IP_CIDR -export FLOATING_IP_START FLOATING_IP_END - -## * Clean up network if it exists from previous run. -## :: - -source {{ working_dir }}/overcloudrc -neutron net-delete nova > /dev/null 2>&1 || true - -## Clean up test images. -## :: - -glance image-list | - awk '/pingtest_image/ {print $2}' | - xargs --no-run-if-empty -n1 glance image-delete - -rm -rf tripleo-ci -git clone https://github.com/openstack-infra/tripleo-ci.git -pushd tripleo-ci - -## .. note:: We set STABLE_RELEASE unconditionally here, since it -## will not break anything, but gets us the correct behavior -## for liberty. Once we have https://review.openstack.org/#/c/308545/ -## we can change this to be release specific. -## :: - -STABLE_RELEASE=liberty - -## * Execute the ping test -## :: - -./scripts/tripleo.sh --overcloud-pingtest diff --git a/roles/tripleo/undercloud/tasks/create-scripts.yml b/roles/tripleo/undercloud/tasks/create-scripts.yml index dd5adddce..2c67c49d4 100644 --- a/roles/tripleo/undercloud/tasks/create-scripts.yml +++ b/roles/tripleo/undercloud/tasks/create-scripts.yml @@ -17,9 +17,3 @@ src: "{{ undercloud_install_script }}" dest: "{{ working_dir }}/undercloud-install.sh" mode: 0755 - -- name: Create undercloud post-install script - template: - src: "{{ undercloud_post_install_script }}" - dest: "{{ working_dir }}/undercloud-post-install.sh" - mode: 0755 diff --git a/roles/tripleo/undercloud/tasks/main.yml b/roles/tripleo/undercloud/tasks/main.yml index 0ca76e0ab..a908c0995 100644 --- a/roles/tripleo/undercloud/tasks/main.yml +++ b/roles/tripleo/undercloud/tasks/main.yml @@ -34,3 +34,4 @@ - include: post-install.yml tags: - undercloud-post-install + diff --git a/roles/tripleo/undercloud/tasks/post-install.yml b/roles/tripleo/undercloud/tasks/post-install.yml index 02acaaaef..2c05c3b77 100644 --- a/roles/tripleo/undercloud/tasks/post-install.yml +++ b/roles/tripleo/undercloud/tasks/post-install.yml @@ -24,16 +24,3 @@ line: "export OS_PASSWORD={{ undercloud_admin_password.stdout }}" regexp: "OS_PASSWORD" -- name: Prepare the undercloud for deploy - shell: | - {{ working_dir }}/undercloud-post-install.sh > \ - {{ undercloud_post_install_log }} 2>&1 - -- name: Create network environment file for network isolation - tags: - - undercloud-scripts - template: - src: "{{ network_environment_file }}" - dest: "{{ working_dir }}/network-environment.yaml" - mode: 0755 - when: network_isolation diff --git a/roles/tripleo/undercloud/templates/network-environment.yaml.j2 b/roles/tripleo/undercloud/templates/network-environment.yaml.j2 deleted file mode 100644 index f0c5cba2e..000000000 --- a/roles/tripleo/undercloud/templates/network-environment.yaml.j2 +++ /dev/null @@ -1,8 +0,0 @@ -{# -This takes advantage of the fact that valid JSON is also -valid YAML. The default to_nice_yaml filter doesn't quote strings, -which can cause unexpected implicit type conversion when the -resulting YAML is consumed, whereas with JSON all strings are quoted. -#} -{% set parameter_defaults = {'parameter_defaults': network_environment_args} %} -{{ parameter_defaults|to_nice_json }} diff --git a/roles/tripleo/undercloud/templates/undercloud-install-post.sh.j2 b/roles/tripleo/undercloud/templates/undercloud-install-post.sh.j2 deleted file mode 100644 index 8db0407a6..000000000 --- a/roles/tripleo/undercloud/templates/undercloud-install-post.sh.j2 +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash - -set -eux - -### --start_docs -## Prepare the undercloud for deploying the overcloud -## ================================================== - -## Prepare Your Environment -## ------------------------ - -## * Source in the undercloud credentials. -## :: - -source {{ working_dir }}/stackrc - -## * Upload images to glance. -## :: - -openstack overcloud image upload {% if bash_deploy_ramdisk %}--old-deploy-image{% endif %} - - -## * Register nodes with Ironic. -## :: - -openstack baremetal import --json instackenv.json -openstack baremetal configure boot - -{% if step_introspect %} - -## * Introspect hardware attributes of nodes. -## :: - -openstack baremetal introspection bulk start - -{% endif %} - -## Flavor Details -## -------------- - -## * Create flavor oooq_ for each flavor in the ansible `flavors` variable. - -{% for name, flavor in (flavors|default({})).items() if name != 'undercloud' %} - -## * Remove flavor before attempting to create. -## :: - -nova flavor-delete oooq_{{ name }} > /dev/null 2>&1 || true - -## * We subtract 1 from the total disk size here to resolve problems -## encountered in CI in which the available disk space on the virtual -## nodes was slightly less than what we requested. -## :: - -openstack flavor create --id auto \ - --ram {{flavor.memory}} \ - --disk $(( {{flavor.disk}} - 1)) \ - --vcpus {{flavor.vcpu}} \ - oooq_{{ name }} -openstack flavor set \ - --property "cpu_arch"="x86_64" \ - --property "capabilities:boot_option"="local" \ - --property "capabilities:profile"="{{ name }}" oooq_{{ name }} -{% for propname,propval in (flavor.properties|default({})).items() %} -openstack flavor set --property "{{propname}}={{propval}}" oooq_{{ name }} -{% endfor %} - -{% endfor %} - -{% if network_isolation == true and ipv6 == false %} - -## Setup Networking -## --------------- - -## * Enable NAT for "external" network. -## :: - -RULE="-s {{undercloud_external_network_cidr}} ! -d {{undercloud_external_network_cidr}} -j MASQUERADE" - -if ! sudo iptables -t nat -C BOOTSTACK_MASQ $RULE; then - sudo iptables -t nat -A BOOTSTACK_MASQ $RULE - sudo sh -c 'iptables-save > /etc/sysconfig/iptables' -fi - -{% for name, network in (undercloud_networks|default({})).items() if name == 'external' %} - -sudo bash -c 'cat < /etc/sysconfig/network-scripts/ifcfg-vlan{{ network.tag }} -DEVICE=vlan{{ network.tag }} -ONBOOT=yes -DEVICETYPE={{ network.device_type }} -TYPE={{ network.type }} -BOOTPROTO=static -IPADDR={{ network.address }} -NETMASK={{ network.netmask }} -OVS_BRIDGE={{ network.ovs_bridge }} -OVS_OPTIONS={{ network.ovs_options }} -EOF' - -sudo ifup ifcfg-vlan{{ network.tag }} -{% endfor %} -{%endif%} - -{% if overcloud_templates_repo is defined and overcloud_templates_path is defined %} -## * Clone the t-h-t templates if needed. -## :: - -rm -rf {{ overcloud_templates_path }} -git clone {% if overcloud_templates_branch is defined %}-b {{ overcloud_templates_branch }} \ - --single-branch{% endif %} {{ overcloud_templates_repo }} {{ 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 {{overcloud_templates_path}} -git fetch {{ overcloud_templates_repo }} {{ overcloud_templates_refspec }} && git checkout FETCH_HEAD -popd -{% endif %} -{% endif %} -### --stop_docs diff --git a/roles/tripleo/validate/defaults/main.yml b/roles/tripleo/validate/defaults/main.yml deleted file mode 100644 index 699fc3440..000000000 --- a/roles/tripleo/validate/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -working_dir: /home/stack -validate_log: "{{ working_dir }}/overcloud_validate.log" diff --git a/roles/tripleo/validate/tasks/main.yml b/roles/tripleo/validate/tasks/main.yml deleted file mode 100644 index 2dfcb7849..000000000 --- a/roles/tripleo/validate/tasks/main.yml +++ /dev/null @@ -1,3 +0,0 @@ -- include: validate.yml - tags: - - overcloud-validate diff --git a/roles/tripleo/validate/tasks/validate.yml b/roles/tripleo/validate/tasks/validate.yml deleted file mode 100644 index 0b697cfed..000000000 --- a/roles/tripleo/validate/tasks/validate.yml +++ /dev/null @@ -1,3 +0,0 @@ -- name: Validate the overcloud - shell: | - {{ working_dir }}/overcloud-validate.sh > {{ validate_log }} 2>&1