Matteo Scandolo | 48d3d2d | 2017-08-08 13:05:27 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 17 | --- |
| 18 | - name: Install Cord tester prerequisites |
| 19 | become: yes |
| 20 | apt: name={{ item }} state=latest force=yes |
| 21 | with_items: |
| 22 | - wget |
| 23 | - python |
| 24 | - python-dev |
| 25 | - python-pip |
| 26 | - python-setuptools |
| 27 | - python-scapy |
| 28 | - python-pexpect |
| 29 | - openvswitch-switch |
A R Karthick | c1dde15 | 2016-12-14 11:30:44 -0800 | [diff] [blame] | 30 | - libssl-dev |
| 31 | - libffi-dev |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 32 | |
| 33 | - name: Install Python Prerequisites for cord tester |
| 34 | become: yes |
| 35 | pip: name={{ item }} state=latest |
| 36 | with_items: |
| 37 | - nose |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 38 | - monotonic |
| 39 | - configObj |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 40 | - pyyaml |
| 41 | - nsenter |
| 42 | - pyroute2 |
| 43 | - netaddr |
| 44 | - python-daemon |
A R Karthick | c1dde15 | 2016-12-14 11:30:44 -0800 | [diff] [blame] | 45 | - robotframework |
| 46 | - robotframework-requests |
| 47 | - robotframework-sshlibrary |
| 48 | |
| 49 | - name: Install scapy |
| 50 | pip: name=scapy version=2.3.2 state=present |
| 51 | |
| 52 | - name: Install scapy-ssl_tls |
| 53 | pip: name=scapy-ssl_tls version=1.2.2 state=present |
| 54 | |
| 55 | - name: Install docker-py |
| 56 | pip: name=docker-py version=1.9.0 state=present |
| 57 | |
| 58 | - name: Install paramiko |
| 59 | pip: name=paramiko version=1.10.1 state=present |
| 60 | |
| 61 | - name: Download Openvswitch {{ openvswitch_version }} |
| 62 | become: yes |
| 63 | get_url: |
| 64 | url: "{{ openvswitch_url }}/openvswitch-{{ openvswitch_version }}.tar.gz" |
| 65 | dest: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}.tar.gz" |
| 66 | force: yes |
| 67 | |
| 68 | - name: Untar Openvswitch {{ openvswitch_version }} |
| 69 | become: yes |
| 70 | unarchive: |
| 71 | src=openvswitch-{{ openvswitch_version }}.tar.gz |
| 72 | dest=/home/{{ ansible_user }} |
| 73 | |
| 74 | - name: Build Openvswitch {{ openvswitch_version }} |
| 75 | become: yes |
| 76 | shell: "{{ item }}" |
| 77 | args: |
| 78 | chdir: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}" |
| 79 | with_items: |
| 80 | - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-ssl |
| 81 | - make |
| 82 | - make install |
| 83 | |
| 84 | - name: Remove build files for Openvswitch {{ openvswitch_version }} |
| 85 | file: |
| 86 | path=/home/{{ ansible_user }}/{{ item }} |
| 87 | state=absent |
| 88 | with_items: |
| 89 | - "openvswitch-{{ openvswitch_version }}.tar.gz" |
| 90 | - "openvswitch-{{ openvswitch_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 91 | |
| 92 | - name: install Pipework |
| 93 | sudo: True |
| 94 | get_url: |
| 95 | url: "{{ docker_tools_pipework_exe_url }}" |
| 96 | dest: "{{ docker_tools_path }}/pipework" |
| 97 | force: yes |
| 98 | mode: "a+x" |
| 99 | |
| 100 | - name: Pull cord test container |
| 101 | become: yes |
| 102 | docker: |
| 103 | name: cord-test |
A R Karthick | f7a613b | 2017-02-24 09:36:44 -0800 | [diff] [blame] | 104 | image: "{{ docker.registry }}/cordtest/nose:{{ docker.image_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 105 | pull: always |
| 106 | state: absent |
| 107 | |
| 108 | - name: Pull test radius container |
| 109 | become: yes |
| 110 | docker: |
| 111 | name: cord-radius |
A R Karthick | f7a613b | 2017-02-24 09:36:44 -0800 | [diff] [blame] | 112 | image: "{{ docker.registry }}/cordtest/radius:{{ docker.image_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 113 | pull: always |
| 114 | state: absent |
| 115 | |
| 116 | - name: Pull test quagga container |
| 117 | become: yes |
| 118 | docker: |
| 119 | name: cord-quagga |
A R Karthick | f7a613b | 2017-02-24 09:36:44 -0800 | [diff] [blame] | 120 | image: "{{ docker.registry }}/cordtest/quagga:{{ docker.image_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 121 | pull: always |
| 122 | state: absent |
A R Karthick | c1dde15 | 2016-12-14 11:30:44 -0800 | [diff] [blame] | 123 | |
| 124 | - name: Pull onosproject |
| 125 | become: yes |
| 126 | docker: |
| 127 | name: cord-test-onos |
| 128 | image: "{{ docker.registry }}/onosproject/onos:{{ docker.image_version }}" |
| 129 | pull: always |
| 130 | state: absent |