Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 1 | --- |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 2 | # onos-cord-install/tasks/main.yml |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 3 | |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 4 | - name: Pull base docker image for ONOS |
| 5 | docker_image: |
| 6 | name: "{{ onos_docker_image }}" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 7 | |
| 8 | - name: Create dest directory |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 9 | become: yes |
| 10 | file: |
| 11 | path: "{{ head_onos_cord_dir }}" |
| 12 | state: directory |
| 13 | owner: "{{ ansible_user_id }}" |
| 14 | group: "{{ ansible_user_gid }}" |
| 15 | mode: 0755 |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 16 | |
| 17 | - name: Copy over SSH key |
| 18 | copy: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 19 | src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey" |
| 20 | dest: "{{ head_onos_cord_dir }}/node_key" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 21 | owner: "{{ ansible_user_id }}" |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 22 | group: "{{ ansible_user_gid }}" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 23 | mode: 0600 |
| 24 | |
| 25 | - name: Create templated ONOS files |
| 26 | template: |
| 27 | src: "{{ item }}.j2" |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 28 | dest: "{{ head_onos_cord_dir }}/{{ item }}" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 29 | with_items: |
| 30 | - Dockerfile |
| 31 | - onos-service |
Zack Williams | 30c01f9 | 2017-02-19 23:38:52 -0700 | [diff] [blame] | 32 | - org.ops4j.pax.logging.cfg |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 33 | |
| 34 | - name: Copy over ONOS playbook and other files |
| 35 | copy: |
| 36 | src: "onos-cord-docker-compose.yml" |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 37 | dest: "{{ head_onos_cord_dir }}/docker-compose.yml" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 38 | |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 39 | - name: Copy SSL Certs to ONOS so docker-compose can find them |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 40 | copy: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 41 | src: "{{ pki_dir }}/{{ item.src }}" |
| 42 | dest: "{{ head_onos_cord_dir }}/{{ item.dest }}" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 43 | owner: "{{ ansible_user_id }}" |
Zack Williams | c047c87 | 2017-01-11 08:38:15 -0700 | [diff] [blame] | 44 | with_items: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 45 | - src: "root_ca/certs/ca_cert.pem" |
| 46 | dest: "cord_root_ca.crt" |
| 47 | - src: "{{ site_name }}_im_ca/certs/im_cert.pem" |
| 48 | dest: "cord_{{ site_name }}_im_ca.crt" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 49 | |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 50 | - name: Build xos/onos docker image |
| 51 | docker_image: |
| 52 | name: "xos/onos" |
| 53 | path: "{{ head_onos_cord_dir }}" |
| 54 | dockerfile: "Dockerfile" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 55 | |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 56 | - name: Start ONOS for CORD |
| 57 | docker_service: |
| 58 | project_src: "{{ head_onos_cord_dir }}" |
| 59 | |