Speed up the install by parallelizing OpenStack and XOS setup
Change-Id: I51657c92400cf7dc5cddf5ade3e906d4cf28e29b
diff --git a/roles/juju-setup/tasks/main.yml b/roles/juju-setup/tasks/main.yml
index b29cbdf..a1883dd 100644
--- a/roles/juju-setup/tasks/main.yml
+++ b/roles/juju-setup/tasks/main.yml
@@ -23,6 +23,10 @@
# Code for this is in library/juju_facts.py
- name: Obtain Juju Facts for creating machines
juju_facts:
+ register: result
+ until: result | success
+ retries: 3
+ delay: 15
- name: Pause to let Juju settle before adding machines
pause:
@@ -41,6 +45,10 @@
# run this again, so machines will be in the juju_machines list
- name: Obtain Juju Facts after machine creation
juju_facts:
+ register: result
+ until: result | success
+ retries: 3
+ delay: 15
- name: Deploy services that are hosted in their own VM
when: "{{ lxd_service_list | difference( juju_services.keys() ) | length }}"
@@ -61,52 +69,3 @@
- relations
tags:
- skip_ansible_lint # benign to do this more than once, hard to check for
-
-# run another time, so services will be in juju_services list
-- name: Obtain Juju Facts after service creation
- juju_facts:
-
-# 1800s = 30m. Usually takes 10-12m on cloudlab for relations to come up
-# Only checks for first port in list
-- name: Wait for juju services to have open ports
- wait_for:
- host={{ item.name }}
- port={{ item.forwarded_ports[0].int }}
- timeout=1800
- with_items: "{{ head_lxd_list | selectattr('forwarded_ports', 'defined') | list }}"
-
-# secondary wait, as waiting on ports isn't enough. Probably only need one of these...
-# 160*15s = 2400s = 40m max wait
-- name: Wait for juju services to start
- command: juju status --format=summary
- register: juju_summary
- until: juju_summary.stdout.find("pending:") == -1
- retries: 160
- delay: 15
- tags:
- - skip_ansible_lint # checking/waiting on a system to be up
-
-- name: Create admin-openrc.sh credentials file
- template:
- src=admin-openrc.sh.j2
- dest={{ ansible_user_dir }}/admin-openrc.sh
-
-- name: Copy nova-cloud-controller CA certificate to head
- command: juju scp {{ juju_services['nova-cloud-controller']['units'].keys()[0] }}:/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt {{ ansible_user_dir }}
- register: result
- until: result | success
- retries: 40
- delay: 15
- tags:
- - skip_ansible_lint # checking/waiting on file availibilty
-
-- name: Copy cert to system location
- become: yes
- copy:
- src: "{{ ansible_user_dir }}/keystone_juju_ca_cert.crt"
- dest: "/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt"
- remote_src: true
- notify:
- - update-ca-certificates
- - Move cert to all service VMs
- - update-ca-certificates in service VMs