Automate waiting for services to be ready
diff --git a/cloudlab-compute.yml b/cloudlab-compute.yml
index 856996a..35006b0 100644
--- a/cloudlab-compute.yml
+++ b/cloudlab-compute.yml
@@ -10,12 +10,11 @@
- name: Make sure we're using KVM
shell: juju set nova-compute virt-type=kvm
- - pause: "Wait until services have started"
-
- name: Add nova-compute relations
script: scripts/juju-compute-relations.py
- - pause: "Wait until relations are added"
+ - name: Wait until relations are added
+ script: scripts/wait-for-services.sh
# Play: set up ansible-pull for OpenCloud-specific files on nova-compute nodes
- hosts: cloudlab-compute
diff --git a/cloudlab-setup.yml b/cloudlab-setup.yml
index ea89e3b..09839e7 100644
--- a/cloudlab-setup.yml
+++ b/cloudlab-setup.yml
@@ -122,8 +122,6 @@
shell: juju bootstrap
creates={{ ansible_env['PWD'] }}/.juju/environments/manual.jenv
- # - pause: Break here and try rebooting Juju VM
-
- name: Copy openstack.cfg for Juju
sudo: yes
copy: src=files/openstack.cfg
@@ -141,7 +139,8 @@
- name: Add all Juju relations between services
script: scripts/juju-relations.py
- - pause: prompt="Wait for relations to be fully added"
+ - name: Wait for relations to be fully added
+ script: scripts/wait-for-services.sh
# Play: Use libvirt hooks to set up iptables
- hosts: cloudlab-head
@@ -206,9 +205,8 @@
register: sshkey
- name: Copy CA certificate
- shell: juju scp nova-cloud-controller/0:/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt /usr/local/share/ca-certificates
+ shell: sudo juju scp nova-cloud-controller/0:/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt /usr/local/share/ca-certificates
creates=/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt
- sudo: yes
- name: Update CA ca-certificates
shell: update-ca-certificates