Initialize onos-fabric-1
diff --git a/roles/docker-compose/tasks/main.yml b/roles/docker-compose/tasks/main.yml
index 6385517..9edb437 100644
--- a/roles/docker-compose/tasks/main.yml
+++ b/roles/docker-compose/tasks/main.yml
@@ -17,7 +17,7 @@
-a "docker-compose build chdir=cord"
- name: Start ONOS
- command: ansible onos-cord-1 -u ubuntu -m command \
+ command: ansible onos-cord-1:onos-fabric-1 -u ubuntu -m command \
-a "docker-compose up -d chdir=cord"
- name: Wait for xos_setup_playbook to complete
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