Initialize onos-fabric-1
diff --git a/roles/onos-vm-install/files/fabric-docker-compose.yml b/roles/onos-vm-install/files/fabric-docker-compose.yml
new file mode 100644
index 0000000..5ad7f3d
--- /dev/null
+++ b/roles/onos-vm-install/files/fabric-docker-compose.yml
@@ -0,0 +1,14 @@
+# Basic docker-compose file for ONOS
+version: '2'
+
+services:
+
+ xos-onos:
+ image: onosproject/onos:1.6
+ expose:
+ - "6653"
+ - "8101"
+ - "8181"
+ - "9876"
+ network_mode: host
+
diff --git a/roles/onos-vm-install/files/onos-setup-playbook.yml b/roles/onos-vm-install/files/onos-setup-playbook.yml
index 0e1ef6b..24f23d1 100644
--- a/roles/onos-vm-install/files/onos-setup-playbook.yml
+++ b/roles/onos-vm-install/files/onos-setup-playbook.yml
@@ -1,5 +1,6 @@
---
-- hosts: onos-cord-1
+# Common ONOS setup
+- hosts: onos-cord-1:onos-fabric-1
remote_user: ubuntu
tasks:
@@ -11,6 +12,15 @@
path={{ ansible_user_dir }}/cord
state=directory
+ - name: Pull docker image for ONOS
+ become: yes
+ command: docker pull onosproject/onos:1.6
+
+# Setup specific for onos-cord VM
+- hosts: onos-cord-1
+ remote_user: ubuntu
+
+ tasks:
- name: Copy over SSH keys
copy:
src=~/.ssh/{{ item }}
@@ -33,7 +43,11 @@
src=~/onos-docker-compose.yml
dest={{ ansible_user_dir }}/cord/docker-compose.yml
- - name: Pull docker image for ONOS
- become: yes
- command: docker pull xosproject/onos-fork
+- hosts: onos-fabric-1
+ remote_user: ubuntu
+ tasks:
+ - name: Copy over & rename docker-compose file
+ copy:
+ src=~/fabric-docker-compose.yml
+ dest={{ ansible_user_dir }}/cord/docker-compose.yml
diff --git a/roles/onos-vm-install/tasks/main.yml b/roles/onos-vm-install/tasks/main.yml
index 0dbb54f..24b3c43 100644
--- a/roles/onos-vm-install/tasks/main.yml
+++ b/roles/onos-vm-install/tasks/main.yml
@@ -15,6 +15,7 @@
with_items:
- onos-setup-playbook.yml
- onos-docker-compose.yml
+ - fabric-docker-compose.yml
- Dockerfile.xos-onos
- onos-service