Multiple changes
- Added code to create default KVM storage pool and network if they
don't exits.
- Added a docker registry to the cluster.
- Added a a wait cycle for consul to start to avoid proxy thrashing when
voltah starts.
- Addition of the rmake developer tool to simplify the edit develop make
and install into cluster developer workflow.
Change-Id: Ie365948bc3cdb9064670560d32e685554bfca432
diff --git a/install/ansible/roles/cluster-host/tasks/main.yml b/install/ansible/roles/cluster-host/tasks/main.yml
index 09e42e4..228a54e 100644
--- a/install/ansible/roles/cluster-host/tasks/main.yml
+++ b/install/ansible/roles/cluster-host/tasks/main.yml
@@ -77,15 +77,14 @@
links: yes
tags: [cluster_host]
-- name: pre-emptive strike to avoid errors during package installation
- apt:
- name: "{{ item }}"
- state: absent
- with_items:
- - ubuntu-core-launcher
- - snapd
- tags: [cluster_host]
-
+#- name: pre-emptive strike to avoid errors during package installation
+# apt:
+# name: "{{ item }}"
+# state: absent
+# with_items:
+# - ubuntu-core-launcher
+# - snapd
+# tags: [cluster_host]
- name: A fluentd directory under tmp for voltha logs exists
file:
path: "/tmp/fluentd"
diff --git a/install/ansible/roles/voltha/tasks/main.yml b/install/ansible/roles/voltha/tasks/main.yml
index b7ee587..76afee1 100644
--- a/install/ansible/roles/voltha/tasks/main.yml
+++ b/install/ansible/roles/voltha/tasks/main.yml
@@ -49,6 +49,18 @@
when: target == "cluster"
tags: [voltha]
+- name: Insecure registry is configured and permitted
+ synchronize:
+ src: "/home/vinstall/daemon.json"
+ dest: /etc/docker/
+ archive: no
+ owner: no
+ perms: no
+ recursive: no
+ links: yes
+ when: target == "cluster"
+ tags: [voltha]
+
- name: Configuration directories are owned by voltha
file:
path: "{{ target_voltha_dir }}/{{ item }}"
@@ -102,6 +114,11 @@
with_items: "{{ voltha_containers }}"
when: target == "cluster"
tags: [voltha]
+- name: Docker images are re-tagged to cluster registry names
+ command: docker tag {{ docker_registry }}/{{ item }} {{ inventory_hostname }}:5001/{{ item }}
+ with_items: "{{ voltha_containers }}"
+ when: target == "cluster"
+ tags: [voltha]
#- name: Old docker image tags are removed
# command: docker rmi {{ docker_registry }}/{{ item }}
# with_items: "{{ voltha_containers }}"
@@ -162,3 +179,21 @@
when: target == "startup"
tags: [voltha]
+- name: cluster specific insecure registry is started
+ command: "docker stack deploy -c {{ target_voltha_dir }}/compose/docker-compose-registry.yml registry"
+ become: voltha
+ when: target == "startup"
+ tags: [voltha]
+
+- name: wait for the cluster startup to settle
+ command: "sleep 15"
+ become: voltha
+ when: target == "startup"
+ tags: [voltha]
+
+- name: Docker containers in the cluster are pushed to the cluster registry
+ command: docker push {{ inventory_hostname }}:5001/{{ item }}
+ with_items: "{{ voltha_containers }}"
+ when: target == "startup"
+ tags: [voltha]
+