Vagrant box for development use.
vagrant up onosdev sets up a vm with three lxc instances
which should be used with the lxc cell.
Change-Id: I18b5cc5366efc61f05063798b498559eb49a8eff
diff --git a/tools/dev/vagrant/ansible/roles/lxc/tasks/main.yml b/tools/dev/vagrant/ansible/roles/lxc/tasks/main.yml
new file mode 100644
index 0000000..ab4fbd4
--- /dev/null
+++ b/tools/dev/vagrant/ansible/roles/lxc/tasks/main.yml
@@ -0,0 +1,55 @@
+- name: Remove lxc default config
+ become: yes
+ file: path=/etc/lxc/default.conf state=absent
+
+- name: Copy default lxc file
+ become: yes
+ copy:
+ src: files/default.conf
+ dest: /etc/lxc/default.conf
+ mode: 644
+
+- name: Create onos1 container
+ lxc_container:
+ name: onos1
+ container_log: true
+ template: ubuntu
+ state: started
+ template_options: --release trusty
+ container_config:
+ - "lxc.network.ipv4=10.100.198.201/24"
+ container_command: |
+ ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
+ apt-get update
+ apt-get install -y openssh-server
+ echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers
+
+- name: Create onos2 container
+ lxc_container:
+ name: onos2
+ container_log: true
+ template: ubuntu
+ state: started
+ template_options: --release trusty
+ container_config:
+ - "lxc.network.ipv4=10.100.198.202/24"
+ container_command: |
+ ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
+ apt-get update
+ apt-get install -y openssh-server
+ echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers
+
+- name: Create onos3 container
+ lxc_container:
+ name: onos3
+ container_log: true
+ template: ubuntu
+ state: started
+ template_options: --release trusty
+ container_config:
+ - "lxc.network.ipv4=10.100.198.203/24"
+ container_command: |
+ ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
+ apt-get update
+ apt-get install -y openssh-server
+ echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers