Update baremetal playbook to use quickstart-extras
Playbook changes should match: https://review.openstack.org/#/c/397700/ The env setup has been split into a separate playbook so that the baremetal and OVB playbooks can be unified. Related-To: https://review.openstack.org/400997 Change-Id: I65f380729cc2bcba6b1437cc678e7c12f24be001
This commit is contained in:
parent
bdada2eca5
commit
7d68f2152e
8
playbooks/baremetal-full-deploy.yml
Normal file
8
playbooks/baremetal-full-deploy.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- include: baremetal-prep-virthost.yml
|
||||
when: undercloud_type == 'virt' and environment_type is defined
|
||||
|
||||
- include: ovb-create-stack.yml
|
||||
when: undercloud_type == 'ovb'
|
||||
|
||||
- include: baremetal-quickstart-extras.yml
|
58
playbooks/baremetal-prep-virthost.yml
Normal file
58
playbooks/baremetal-prep-virthost.yml
Normal file
@ -0,0 +1,58 @@
|
||||
---
|
||||
# Add the virthost to the in-memory inventory. The inventory is not
|
||||
# wirtten out to disk unless you call the `rebuild-inventory` role.
|
||||
- name: Add the virthost to the inventory
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: Add virthost
|
||||
add_host:
|
||||
name: "{{virthost}}"
|
||||
groups: "virthost"
|
||||
ansible_fqdn: "{{ virthost }}"
|
||||
ansible_user: "root"
|
||||
ansible_host: "{{ virthost }}"
|
||||
|
||||
- include: teardown-provision.yml
|
||||
|
||||
# The `provision.yml` playbook is responsible for
|
||||
# creating an inventory entry for our `virthost` and for creating an
|
||||
# unprivileged user on that host for use by our virtual environment.
|
||||
- include: provision.yml
|
||||
|
||||
# These teardown tasks only make sense after running provision.yml,
|
||||
# because they assume they are connecting as the `stack` user rather
|
||||
# than `root`.
|
||||
- include: teardown-nodes.yml
|
||||
- include: teardown-environment.yml
|
||||
|
||||
# The `environment/setup` role performs any tasks that require `root`
|
||||
# access on the target host.
|
||||
- name: Install libvirt packages and configure networks
|
||||
hosts: virthost
|
||||
tags:
|
||||
- environment
|
||||
roles:
|
||||
- environment/setup
|
||||
|
||||
- name: Setup undercloud and baremetal vms and networks in libvirt
|
||||
hosts: virthost
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- libvirt/setup
|
||||
|
||||
# Add the undercloud node to the generated
|
||||
# inventory.
|
||||
- name: Inventory the undercloud
|
||||
hosts: localhost
|
||||
gather_facts: yes
|
||||
vars:
|
||||
inventory: undercloud
|
||||
roles:
|
||||
- tripleo-inventory
|
||||
|
||||
- name: Prepare the host for PXE forwarding
|
||||
hosts: virthost
|
||||
gather_facts: no
|
||||
roles:
|
||||
- baremetal-prep-virthost
|
||||
|
@ -1,61 +1,4 @@
|
||||
---
|
||||
# Add the virthost to the in-memory inventory. The inventory is not
|
||||
# wirtten out to disk unless you call the `rebuild-inventory` role.
|
||||
- name: Add the virthost to the inventory
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: Add virthost
|
||||
add_host:
|
||||
name: "{{virthost}}"
|
||||
groups: "virthost"
|
||||
ansible_fqdn: "{{ virthost }}"
|
||||
ansible_user: "root"
|
||||
ansible_host: "{{ virthost }}"
|
||||
|
||||
- include: teardown-provision.yml
|
||||
|
||||
# The `provision.yml` playbook is responsible for
|
||||
# creating an inventory entry for our `virthost` and for creating an
|
||||
# unprivileged user on that host for use by our virtual environment.
|
||||
- include: provision.yml
|
||||
|
||||
# These teardown tasks only make sense after running provision.yml,
|
||||
# because they assume they are connecting as the `stack` user rather
|
||||
# than `root`.
|
||||
- include: teardown-nodes.yml
|
||||
- include: teardown-environment.yml
|
||||
|
||||
# The `environment/setup` role performs any tasks that require `root`
|
||||
# access on the target host.
|
||||
- name: Install libvirt packages and configure networks
|
||||
hosts: virthost
|
||||
tags:
|
||||
- environment
|
||||
roles:
|
||||
- environment/setup
|
||||
|
||||
- name: Setup undercloud and baremetal vms and networks in libvirt
|
||||
hosts: virthost
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- libvirt/setup
|
||||
|
||||
# Add the undercloud node to the generated
|
||||
# inventory.
|
||||
- name: Inventory the undercloud
|
||||
hosts: localhost
|
||||
gather_facts: yes
|
||||
vars:
|
||||
inventory: undercloud
|
||||
roles:
|
||||
- tripleo-inventory
|
||||
|
||||
- name: Prepare the host for PXE forwarding
|
||||
hosts: virthost
|
||||
gather_facts: no
|
||||
roles:
|
||||
- baremetal-prep-virthost
|
||||
|
||||
- name: Validate IPMI and instackenv.json
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
@ -78,7 +21,7 @@
|
||||
hosts: undercloud
|
||||
gather_facts: yes
|
||||
roles:
|
||||
- overcloud-prep-baremetal
|
||||
- baremetal-prep-overcloud
|
||||
|
||||
- name: Prepare the overcloud images for deployment
|
||||
hosts: undercloud
|
||||
@ -102,7 +45,7 @@
|
||||
hosts: undercloud
|
||||
gather_facts: no
|
||||
roles:
|
||||
- tripleo-overcloud
|
||||
- overcloud-deploy
|
||||
|
||||
# Add the overcloud nodes to the generated inventory.
|
||||
- name: Inventory the overcloud
|
||||
@ -128,10 +71,20 @@
|
||||
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
|
||||
- { role: validate-simple, when: test_ping|bool }
|
||||
|
||||
# Execute tempest against the overcloud deployment
|
||||
- name: Execute tempest against the overcloud
|
||||
hosts: undercloud
|
||||
tags:
|
||||
- overcloud-validate
|
||||
gather_facts: no
|
||||
roles:
|
||||
- { role: validate-tempest, when: run_tempest|bool }
|
Loading…
x
Reference in New Issue
Block a user