Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 1 | --- |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 2 | # Common ONOS setup |
| 3 | - hosts: onos-cord-1:onos-fabric-1 |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 4 | remote_user: ubuntu |
| 5 | |
| 6 | tasks: |
| 7 | - name: Include configuration vars |
| 8 | include_vars: onos-setup-vars.yml |
| 9 | |
Zack Williams | 9b3c361 | 2016-04-14 07:05:30 -0700 | [diff] [blame] | 10 | - name: Create CORD directory |
| 11 | file: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 12 | path: "{{ ansible_user_dir }}/cord" |
| 13 | state: directory |
Zack Williams | 9b3c361 | 2016-04-14 07:05:30 -0700 | [diff] [blame] | 14 | |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 15 | # Should replace with http://docs.ansible.com/ansible/docker_module.html, when replacements are stable |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 16 | - name: Pull docker image for ONOS |
| 17 | become: yes |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 18 | command: "docker pull {{ onos_docker_image }}" |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 19 | |
| 20 | # Setup specific for onos-cord VM |
| 21 | - hosts: onos-cord-1 |
| 22 | remote_user: ubuntu |
| 23 | |
| 24 | tasks: |
Andy Bavier | d39936c | 2016-08-02 17:31:07 -0400 | [diff] [blame] | 25 | - name: Copy over SSH key |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 26 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 27 | src: "{{ node_private_key }}" |
| 28 | dest: "{{ ansible_user_dir }}/cord/node_key" |
| 29 | owner: "{{ ansible_user_id }}" |
| 30 | mode: 0600 |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 31 | |
Zack Williams | 2a28709 | 2016-05-18 13:41:31 -0700 | [diff] [blame] | 32 | - name: Copy over files to build XOS variant of ONOS |
| 33 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 34 | src: "~/{{ item }}" |
| 35 | dest: "{{ ansible_user_dir }}/cord/{{ item }}" |
Zack Williams | 2a28709 | 2016-05-18 13:41:31 -0700 | [diff] [blame] | 36 | with_items: |
| 37 | - Dockerfile.xos-onos |
| 38 | - onos-service |
| 39 | |
Zack Williams | e4fbacc | 2016-05-21 07:18:43 -0700 | [diff] [blame] | 40 | - name: Copy over & rename docker-compose file |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 41 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 42 | src: "~/onos-docker-compose.yml" |
| 43 | dest: "{{ ansible_user_dir }}/cord/docker-compose.yml" |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 44 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 45 | - hosts: onos-fabric-1 |
| 46 | remote_user: ubuntu |
Zack Williams | d31bbc9 | 2016-05-20 11:43:18 -0700 | [diff] [blame] | 47 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 48 | tasks: |
| 49 | - name: Copy over & rename docker-compose file |
| 50 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 51 | src: "~/fabric-docker-compose.yml" |
| 52 | dest: "{{ ansible_user_dir }}/cord/docker-compose.yml" |