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 | |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 8 | - name: Create onos_cord 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 | |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 17 | - name: Create node_key file with SSH private key for compute nodes |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 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 |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 33 | - docker-compose.yml |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 34 | |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 35 | - name: Copy SSL Certs to ONOS so docker-compose can find them |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 36 | copy: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 37 | src: "{{ pki_dir }}/{{ item.src }}" |
| 38 | dest: "{{ head_onos_cord_dir }}/{{ item.dest }}" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 39 | owner: "{{ ansible_user_id }}" |
Zack Williams | c047c87 | 2017-01-11 08:38:15 -0700 | [diff] [blame] | 40 | with_items: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 41 | - src: "root_ca/certs/ca_cert.pem" |
| 42 | dest: "cord_root_ca.crt" |
| 43 | - src: "{{ site_name }}_im_ca/certs/im_cert.pem" |
| 44 | dest: "cord_{{ site_name }}_im_ca.crt" |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 45 | |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 46 | - name: Build xos/onos docker image |
| 47 | docker_image: |
Andy Bavier | 75e1712 | 2017-07-26 09:07:19 -0700 | [diff] [blame] | 48 | name: "xos/onos:{{ pull_docker_tag }}" |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 49 | path: "{{ head_onos_cord_dir }}" |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 50 | pull: False |
| 51 | force: True |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 52 | |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 53 | - name: Start ONOS for CORD |
| 54 | docker_service: |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 55 | project_name: "onoscord" |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 56 | project_src: "{{ head_onos_cord_dir }}" |
| 57 | |