A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 1 | --- |
| 2 | - name: Install Cord tester prerequisites |
| 3 | become: yes |
| 4 | apt: name={{ item }} state=latest force=yes |
| 5 | with_items: |
| 6 | - wget |
| 7 | - python |
| 8 | - python-dev |
| 9 | - python-pip |
| 10 | - python-setuptools |
| 11 | - python-scapy |
| 12 | - python-pexpect |
| 13 | - openvswitch-switch |
A R Karthick | c1dde15 | 2016-12-14 11:30:44 -0800 | [diff] [blame] | 14 | - libssl-dev |
| 15 | - libffi-dev |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 16 | |
| 17 | - name: Install Python Prerequisites for cord tester |
| 18 | become: yes |
| 19 | pip: name={{ item }} state=latest |
| 20 | with_items: |
| 21 | - nose |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 22 | - monotonic |
| 23 | - configObj |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 24 | - pyyaml |
| 25 | - nsenter |
| 26 | - pyroute2 |
| 27 | - netaddr |
| 28 | - python-daemon |
A R Karthick | c1dde15 | 2016-12-14 11:30:44 -0800 | [diff] [blame] | 29 | - robotframework |
| 30 | - robotframework-requests |
| 31 | - robotframework-sshlibrary |
| 32 | |
| 33 | - name: Install scapy |
| 34 | pip: name=scapy version=2.3.2 state=present |
| 35 | |
| 36 | - name: Install scapy-ssl_tls |
| 37 | pip: name=scapy-ssl_tls version=1.2.2 state=present |
| 38 | |
| 39 | - name: Install docker-py |
| 40 | pip: name=docker-py version=1.9.0 state=present |
| 41 | |
| 42 | - name: Install paramiko |
| 43 | pip: name=paramiko version=1.10.1 state=present |
| 44 | |
| 45 | - name: Download Openvswitch {{ openvswitch_version }} |
| 46 | become: yes |
| 47 | get_url: |
| 48 | url: "{{ openvswitch_url }}/openvswitch-{{ openvswitch_version }}.tar.gz" |
| 49 | dest: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}.tar.gz" |
| 50 | force: yes |
| 51 | |
| 52 | - name: Untar Openvswitch {{ openvswitch_version }} |
| 53 | become: yes |
| 54 | unarchive: |
| 55 | src=openvswitch-{{ openvswitch_version }}.tar.gz |
| 56 | dest=/home/{{ ansible_user }} |
| 57 | |
| 58 | - name: Build Openvswitch {{ openvswitch_version }} |
| 59 | become: yes |
| 60 | shell: "{{ item }}" |
| 61 | args: |
| 62 | chdir: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}" |
| 63 | with_items: |
| 64 | - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-ssl |
| 65 | - make |
| 66 | - make install |
| 67 | |
| 68 | - name: Remove build files for Openvswitch {{ openvswitch_version }} |
| 69 | file: |
| 70 | path=/home/{{ ansible_user }}/{{ item }} |
| 71 | state=absent |
| 72 | with_items: |
| 73 | - "openvswitch-{{ openvswitch_version }}.tar.gz" |
| 74 | - "openvswitch-{{ openvswitch_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 75 | |
| 76 | - name: install Pipework |
| 77 | sudo: True |
| 78 | get_url: |
| 79 | url: "{{ docker_tools_pipework_exe_url }}" |
| 80 | dest: "{{ docker_tools_path }}/pipework" |
| 81 | force: yes |
| 82 | mode: "a+x" |
| 83 | |
| 84 | - name: Pull cord test container |
| 85 | become: yes |
| 86 | docker: |
| 87 | name: cord-test |
A R Karthick | f7a613b | 2017-02-24 09:36:44 -0800 | [diff] [blame] | 88 | image: "{{ docker.registry }}/cordtest/nose:{{ docker.image_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 89 | pull: always |
| 90 | state: absent |
| 91 | |
| 92 | - name: Pull test radius container |
| 93 | become: yes |
| 94 | docker: |
| 95 | name: cord-radius |
A R Karthick | f7a613b | 2017-02-24 09:36:44 -0800 | [diff] [blame] | 96 | image: "{{ docker.registry }}/cordtest/radius:{{ docker.image_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 97 | pull: always |
| 98 | state: absent |
| 99 | |
| 100 | - name: Pull test quagga container |
| 101 | become: yes |
| 102 | docker: |
| 103 | name: cord-quagga |
A R Karthick | f7a613b | 2017-02-24 09:36:44 -0800 | [diff] [blame] | 104 | image: "{{ docker.registry }}/cordtest/quagga:{{ docker.image_version }}" |
A R Karthick | 6d98a59 | 2016-08-24 15:16:46 -0700 | [diff] [blame] | 105 | pull: always |
| 106 | state: absent |
A R Karthick | c1dde15 | 2016-12-14 11:30:44 -0800 | [diff] [blame] | 107 | |
| 108 | - name: Pull onosproject |
| 109 | become: yes |
| 110 | docker: |
| 111 | name: cord-test-onos |
| 112 | image: "{{ docker.registry }}/onosproject/onos:{{ docker.image_version }}" |
| 113 | pull: always |
| 114 | state: absent |