[Rdo-list] New ansible-role-tripleo-baremetal-undercloud role review
Raoul Scarazzini
rasca at redhat.com
Fri May 6 16:14:10 UTC 2016
Hi guys,
I'm posting this here looking for some reviews about this new role and
understand how it can be improved to cover the most of the baremetal
setups that we're working on.
Everything starts from our need to create a CI process to check OSP-HA
which aims to be similar to all the actual used from the CI team.
The role is here [1] and it's going to be used in combination with the
others 4 roles built starting from tripleo-quickstart / C.A.T..
This role omits all the parts related to the virtual, treats virthost
and undercloud as the same machine and does these tasks:
- Prepare the undercloud, which must be at this time already provided
(I'm working on making the user pass a provision script);
- Copy the generated undercloud.conf and execute the pre installation
script;
- Install the undercloud;
A typical playbook that would use this role will be declared as follows:
### playbooks/baremetal.yml:
- name: Baremetal undercloud install
hosts: localhost
gather_facts: no
roles:
- ansible-role-tripleo-baremetal-undercloud
tags:
- undercloud-bm-install
- name: Inventory the undercloud
hosts: virthost
gather_facts: no
roles:
- ansible-role-tripleo-inventory
tags:
- undercloud-inventory
- name: Post undercloud install steps
hosts: undercloud
gather_facts: no
roles:
- ansible-role-tripleo-undercloud-post
tags:
- undercloud-post-install
- name: Deploy the overcloud
hosts: undercloud
gather_facts: no
roles:
- ansible-role-tripleo-overcloud
tags:
- overcloud-deploy
- name: Inventory the undercloud
hosts: undercloud
gather_facts: no
roles:
- ansible-role-tripleo-inventory
tags:
- overcloud-inventory
###
The only pre requisite at the moment is that the baremetal
machine/virthost/undercloud is a CentOS 7 provided and clean (in terms
of installed repos) machine.
In the future the provisioning itself will be part of the role.
Since the main focus of this is to deploy HA on the baremetal, the
config file should be similar to this:
### config/ha.yml:
control_memory: 6144
compute_memory: 6144
undercloud_memory: 8192
undercloud_vcpu: 2
flavor_map:
control: baremetal
compute: baremetal
overcloud_nodes:
- name: control_0
flavor: baremetal
- name: control_1
flavor: baremetal
- name: control_2
flavor: baremetal
- name: compute_0
flavor: baremetal
- name: compute_1
flavor: baremetal
step_introspect: true
libvirt_type: kvm
extra_args: "--ntp-server 10.5.26.10 --control-scale 3 --compute-scale 2
--ceph-storage-scale 0 --block-storage-scale 0 --swift-storage-scale 0
--templates -e
/usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml
-e
/usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml
-e
/usr/share/openstack-tripleo-heat-templates/environments/net-single-nic-with-vlans.yaml
-e /home/stack/network-environment.yaml --neutron-bridge-mappings
datacentre:br-floating"
tempest: false
###
Putting all together can be done starting from ci-ansible-tripleo's
deploy.sh script [2], passing useful parameters, like this:
### deploy.sh:
...
...
VIRTHOST=<YOUR-UNDERCLOUD/VIRTHOST-IP>
VIRTUAL_ENV=$WORKDIR/.cat
OPT_CONFIG=$WORKDIR/config/ha.yml
...
...
export
ANSIBLE_ROLES_PATH=/usr/lib/python2.7/site-packages/tripleo-quickstart/playbooks/roles:<PATH-TO-LOCAL-PATCHED-ROLES>:$VIRTUAL_ENV/usr/local/share/tripleo-quickstart/playbooks/roles:$VIRTUAL_ENV/usr/local/share
...
...
BM_INSTACKENV=/my/local/path/to/instackenv.json
BM_NETWORKENV=/my/local/path/to/network-environment.yaml
BM_NICCONFIGS=/my/local/path/to/nic-configs
ansible-playbook -vvvv playbooks/baremetal.yml -e @$OPT_CONFIG -e
local_working_dir=$OPT_WORKDIR -e
ansible_python_interpreter=/usr/bin/python -e virthost=$VIRTHOST -e
undercloud_setup=baremetal -e baremetal_instackenv=$BM_INSTACKENV -e
baremetal_network_environment=$BM_NETWORKENV -e
baremetal_nic_configs=$BM_NICCONFIGS
###
Note the undercloud_setup=baremetal setting that is checked inside all
the other involved roles, which of course must be patched for baremetal
support:
- ansible-role-tripleo-inventory [3]
- ansible-role-tripleo-undercloud-post [4]
- ansible-role-tripleo-overcloud [5]
- ansible-role-tripleo-inventory [6]
That's all, any help/thoughts/critics with this will be strongly
appreciated.
Many thanks.
[1] https://review.gerrithub.io/#/c/275338/
[2] https://github.com/redhat-openstack/ci-ansible-tripleo
[3] https://review.gerrithub.io/#/c/274491/
[4] https://review.gerrithub.io/#/c/275333/
[5] https://review.gerrithub.io/#/c/275011/
[6] https://review.gerrithub.io/#/c/274491/
--
Raoul Scarazzini
rasca at redhat.com
More information about the dev
mailing list