Add configurable cloud and update to nodepool role

For reproducing jobs we use nodepool-setup role to mimic nodepool
image on bare CentOS. Let's make cloud configurable instead of
hardcoding it to rdo-cloud. Also add configurable option to update
VMs after deploy or not.
Use list of packages for faster installation.

Change-Id: Iaf47568d3106979942cffebe5b62a866035b8711
This commit is contained in:
Sagi Shnaidman 2018-04-22 10:14:19 +03:00
parent da6810a2d9
commit f535c3f590
3 changed files with 29 additions and 24 deletions

View File

@ -10,3 +10,12 @@ repos:
- https://git.openstack.org/openstack-infra/devstack-gate
zuul_changes: "{{ lookup('env', 'ZUUL_CHANGES') }}"
subnode_swap_size: 8388608 # 8GB
update_subnodes: true
rdo_cloud_provider: true
packages_list:
- git
- unbound
- screen
- vim
- wget
- iptables-services

View File

@ -28,7 +28,7 @@
- name: Create /etc/nodepool/provider
copy:
content: |
NODEPOOL_PROVIDER=rdo-cloud-tripleo
NODEPOOL_PROVIDER={% if rdo_cloud_provider|bool %}rdo-cloud-tripleo{% else %}fake-cloud{% endif %}
NODEPOOL_CLOUD=fake-cloud
NODEPOOL_REGION=FAKE
NODEPOOL_AZ=

View File

@ -35,15 +35,8 @@
- name: Install packages
yum:
name: "{{ item }}"
name: "{{ packages_list }}"
state: latest
with_items:
- git
- unbound
- screen
- vim
- wget
- iptables-services
become: true
- include: clone-ci-repos.yml
@ -112,21 +105,24 @@
- "EXTRA_VARS=' --extra-vars vxlan_mtu=1400'"
become: true
- name: Update packages
yum:
name: '*'
state: latest
become: true
- when: update_subnodes|bool
block:
- name: Reboot hosts
shell: sleep 2 && shutdown -r now
async: 1
poll: 0
ignore_errors: true
become: true
- name: Update packages
yum:
name: '*'
state: latest
become: true
- name: Wait a little
pause: seconds=30
- name: Reboot hosts
shell: sleep 2 && shutdown -r now
async: 1
poll: 0
ignore_errors: true
become: true
- name: Wait for provisioned hosts to become reachable
local_action: wait_for host="{{ hostvars[inventory_hostname].subnode_public_ip }}" port=22 delay=5 state=started connect_timeout=10 timeout=180
- name: Wait a little
pause: seconds=30
- name: Wait for provisioned hosts to become reachable
local_action: wait_for host="{{ hostvars[inventory_hostname].subnode_public_ip }}" port=22 delay=5 state=started connect_timeout=10 timeout=180