Baremetal undecloud role playbook fixes

This commit refers to the baremetal undercloud role:

- Fix baremetal undercloud playbooks to support new extra roles names;
- Define the repos as a list which can be overridden;
- Removes the restart of libvirt before the customization of the
overcloud image. This was initially included because it seemed to be
necessary for virt-customize to work, but further tests confirmed it is
not needed anymore;

Change-Id: I52b1a82f260fa1a14d32216f3300888cb10f0244
This commit is contained in:
Raoul Scarazzini 2016-12-15 08:58:53 -05:00
parent 9c833fa675
commit f44d75eba3
5 changed files with 66 additions and 42 deletions

View File

@ -1,9 +1,9 @@
---
# Provision and initial undercloud setup
- name: Baremetal undercloud install
- name: Baremetal undercloud install
hosts: localhost
roles:
- tripleo-baremetal-undercloud
- baremetal-undercloud
tags:
- undercloud-bm-install
@ -11,78 +11,86 @@
- name: Add the undercloud node to the generated inventory
hosts: localhost
gather_facts: yes
tags:
- undercloud-scripts
roles:
- tripleo-inventory
tags:
- undercloud-inventory
# Deploy the undercloud
- name: Install undercloud
- name: Install undercloud
hosts: undercloud
gather_facts: no
tags:
- undercloud-install
roles:
- tripleo/undercloud
tags:
- undercloud-install
# Baremetal preparation (with workarounds)
- name: Prepare baremetal for the overcloud deployment
- name: Prepare baremetal for the overcloud deployment
hosts: undercloud
roles:
- overcloud-prep-baremetal
- baremetal-prep-overcloud
tags:
- overcloud-prep-baremetal
- baremetal-prep-overcloud
# Prepare any additional configuration files required by the overcloud
- name: Prepare configuration files for the overcloud deployment
- name: Prepare configuration files for the overcloud deployment
hosts: undercloud
gather_facts: no
roles:
- overcloud-prep-config
tags:
- overcloud-prep-config
# Prepare the overcloud images for deployment
- name: Prepare the overcloud images for deployment
- name: Prepare the overcloud images for deployment
hosts: undercloud
gather_facts: no
roles:
- overcloud-prep-images
tags:
- overcloud-prep-images
# Prepare the overcloud flavor configuration
- name: Prepare overcloud flavors
- name: Prepare overcloud flavors
hosts: undercloud
gather_facts: no
roles:
- overcloud-prep-flavors
tags:
- overcloud-prep-flavors
# Prepare the undercloud networks for the overcloud deployment
- name: 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
tags:
- overcloud-prep-network
# Deploy the overcloud
- name: Deploy the overcloud
- name: Deploy the overcloud
hosts: undercloud
gather_facts: yes
roles:
- tripleo-overcloud
- overcloud-deploy
tags:
- overcloud-deploy
- name: Add the overcloud nodes to the generated inventory
hosts: undercloud
gather_facts: yes
tags:
- overcloud-deploy
vars:
inventory: all
roles:
- tripleo-inventory
tags:
- overcloud-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"
@ -91,12 +99,14 @@
- name: did the deployment pass or fail?
debug: var=overcloud_deploy_result
failed_when: overcloud_deploy_result == "failed"
tags:
- overcloud-deploy-check
# HA Validation
- name: Validate the overcloud using HA tests
hosts: undercloud
gather_facts: no
roles:
- tripleo-overcloud-validate-ha
- validate-ha
tags:
- overcloud-validate-ha

View File

@ -3,7 +3,7 @@
- name: Baremetal undercloud install
hosts: localhost
roles:
- tripleo-baremetal-undercloud
- baremetal-undercloud
tags:
- undercloud-bm-install
@ -11,27 +11,27 @@
- name: Add the undercloud node to the generated inventory
hosts: localhost
gather_facts: yes
tags:
- undercloud-scripts
roles:
- tripleo-inventory
tags:
- undercloud-inventory
# Deploy the undercloud
- name: Install undercloud
hosts: undercloud
gather_facts: no
tags:
- undercloud-install
roles:
- tripleo/undercloud
tags:
- undercloud-install
# Baremetal preparation (with workarounds)
- name: Prepare baremetal for the overcloud deployment
hosts: undercloud
roles:
- overcloud-prep-baremetal
- baremetal-prep-overcloud
tags:
- overcloud-prep-baremetal
- baremetal-prep-overcloud
# Prepare any additional configuration files required by the overcloud
- name: Prepare configuration files for the overcloud deployment
@ -39,6 +39,8 @@
gather_facts: no
roles:
- overcloud-prep-config
tags:
- overcloud-prep-config
# Prepare the overcloud images for deployment
- name: Prepare the overcloud images for deployment
@ -46,6 +48,8 @@
gather_facts: no
roles:
- overcloud-prep-images
tags:
- overcloud-prep-images
# Prepare the overcloud flavor configuration
- name: Prepare overcloud flavors
@ -53,6 +57,8 @@
gather_facts: no
roles:
- overcloud-prep-flavors
tags:
- overcloud-prep-flavors
# Prepare the undercloud networks for the overcloud deployment
- name: Prepare the undercloud networks for the overcloud deployment
@ -60,29 +66,31 @@
gather_facts: no
roles:
- overcloud-prep-network
tags:
- overcloud-prep-network
# Deploy the overcloud
- name: Deploy the overcloud
hosts: undercloud
gather_facts: yes
roles:
- tripleo-overcloud
- overcloud-deploy
tags:
- overcloud-deploy
- name: Add the overcloud nodes to the generated inventory
hosts: undercloud
gather_facts: yes
tags:
- overcloud-deploy
vars:
inventory: all
roles:
- tripleo-inventory
tags:
- overcloud-deploy-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"
@ -91,11 +99,14 @@
- name: did the deployment pass or fail?
debug: var=overcloud_deploy_result
failed_when: overcloud_deploy_result == "failed"
tags:
- overcloud-deploy-check
# Validate the deployment
- name: Validate the overcloud
hosts: undercloud
gather_facts: no
roles:
- tripleo-overcloud-validate
- { role: validate-simple, when: test_ping|bool }
tags:
- overcloud-validate

View File

@ -18,3 +18,11 @@ step_provide_undercloud: true
step_prepare_undercloud: true
step_undercloud_repos: true
step_overcloud_images: true
repo_configure_list:
- delorean:
name: "delorean.repo"
location: "http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-{{ release }}-tested/delorean.repo"
- delorean-deps:
name: "delorean-deps.repo"
location: "http://trunk.rdoproject.org/centos7-{{ release }}/delorean-deps.repo"

View File

@ -18,11 +18,6 @@ for i in *.tar; do
tar xvfp $i
done
## * Ensure libvirtd is started (otherwise virt-customize won't work
## ::
sudo systemctl restart libvirtd
## * Change root password on the image
## ::

View File

@ -31,9 +31,9 @@ systemctl start ntpd
## * Configure repos.
## ::
#curl -o /etc/yum.repos.d/delorean.repo http://trunk.rdoproject.org/centos7-{{ release }}/current-passed-ci/delorean.repo
curl -o /etc/yum.repos.d/delorean.repo http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-{{ release }}-tested/delorean.repo
curl -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos7-{{ release }}/delorean-deps.repo
{% for repo in repo_configure_list %} # repo_configure_list defined in config/general_release
curl -o /etc/yum.repos.d/{{ repo["name"] }} {{ repo["location"] }}
{% endfor %}
{% if release == 'liberty' %}
# (trown) Install ironic-python-agent from mitaka delorean for LIO support.