blob: baf0e8ec52fe86899a5c2f178c0e0c653418c91f [file] [log] [blame]
Zack Williams821c5022020-01-15 15:11:46 -07001---
Matteo Scandolo48d3d2d2017-08-08 13:05:27 -07002# 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
A R Karthick6d98a592016-08-24 15:16:46 -070016- name: Install Cord tester prerequisites
Zack Williams821c5022020-01-15 15:11:46 -070017 become: true
18 apt: name={{ item }} state=latest force=true
A R Karthick6d98a592016-08-24 15:16:46 -070019 with_items:
20 - wget
21 - python
22 - python-dev
23 - python-pip
24 - python-setuptools
25 - python-scapy
26 - python-pexpect
27 - openvswitch-switch
A R Karthickc1dde152016-12-14 11:30:44 -080028 - libssl-dev
29 - libffi-dev
A R Karthick6d98a592016-08-24 15:16:46 -070030
31- name: Install Python Prerequisites for cord tester
Zack Williams821c5022020-01-15 15:11:46 -070032 become: true
A R Karthick6d98a592016-08-24 15:16:46 -070033 pip: name={{ item }} state=latest
34 with_items:
35 - nose
A R Karthick6d98a592016-08-24 15:16:46 -070036 - monotonic
37 - configObj
A R Karthick6d98a592016-08-24 15:16:46 -070038 - pyyaml
39 - nsenter
40 - pyroute2
41 - netaddr
42 - python-daemon
A R Karthickc1dde152016-12-14 11:30:44 -080043 - robotframework
44 - robotframework-requests
45 - robotframework-sshlibrary
46
47- name: Install scapy
48 pip: name=scapy version=2.3.2 state=present
49
50- name: Install scapy-ssl_tls
51 pip: name=scapy-ssl_tls version=1.2.2 state=present
52
53- name: Install docker-py
54 pip: name=docker-py version=1.9.0 state=present
55
56- name: Install paramiko
57 pip: name=paramiko version=1.10.1 state=present
58
59- name: Download Openvswitch {{ openvswitch_version }}
Zack Williams821c5022020-01-15 15:11:46 -070060 become: true
A R Karthickc1dde152016-12-14 11:30:44 -080061 get_url:
62 url: "{{ openvswitch_url }}/openvswitch-{{ openvswitch_version }}.tar.gz"
63 dest: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}.tar.gz"
Zack Williams821c5022020-01-15 15:11:46 -070064 force: true
A R Karthickc1dde152016-12-14 11:30:44 -080065
Zack Williams821c5022020-01-15 15:11:46 -070066- name: Untar Openvswitch {{ openvswitch_version }}
67 become: true
A R Karthickc1dde152016-12-14 11:30:44 -080068 unarchive:
69 src=openvswitch-{{ openvswitch_version }}.tar.gz
70 dest=/home/{{ ansible_user }}
71
72- name: Build Openvswitch {{ openvswitch_version }}
Zack Williams821c5022020-01-15 15:11:46 -070073 become: true
A R Karthickc1dde152016-12-14 11:30:44 -080074 shell: "{{ item }}"
75 args:
76 chdir: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}"
77 with_items:
78 - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-ssl
79 - make
80 - make install
81
82- name: Remove build files for Openvswitch {{ openvswitch_version }}
83 file:
84 path=/home/{{ ansible_user }}/{{ item }}
85 state=absent
86 with_items:
87 - "openvswitch-{{ openvswitch_version }}.tar.gz"
88 - "openvswitch-{{ openvswitch_version }}"
A R Karthick6d98a592016-08-24 15:16:46 -070089
90- name: install Pipework
Zack Williams821c5022020-01-15 15:11:46 -070091 sudo: true
A R Karthick6d98a592016-08-24 15:16:46 -070092 get_url:
93 url: "{{ docker_tools_pipework_exe_url }}"
94 dest: "{{ docker_tools_path }}/pipework"
Zack Williams821c5022020-01-15 15:11:46 -070095 force: true
A R Karthick6d98a592016-08-24 15:16:46 -070096 mode: "a+x"
97
98- name: Pull cord test container
Zack Williams821c5022020-01-15 15:11:46 -070099 become: true
A R Karthick6d98a592016-08-24 15:16:46 -0700100 docker:
101 name: cord-test
A R Karthickf7a613b2017-02-24 09:36:44 -0800102 image: "{{ docker.registry }}/cordtest/nose:{{ docker.image_version }}"
A R Karthick6d98a592016-08-24 15:16:46 -0700103 pull: always
104 state: absent
105
106- name: Pull test radius container
Zack Williams821c5022020-01-15 15:11:46 -0700107 become: true
A R Karthick6d98a592016-08-24 15:16:46 -0700108 docker:
109 name: cord-radius
A R Karthickf7a613b2017-02-24 09:36:44 -0800110 image: "{{ docker.registry }}/cordtest/radius:{{ docker.image_version }}"
A R Karthick6d98a592016-08-24 15:16:46 -0700111 pull: always
112 state: absent
113
114- name: Pull test quagga container
Zack Williams821c5022020-01-15 15:11:46 -0700115 become: true
A R Karthick6d98a592016-08-24 15:16:46 -0700116 docker:
117 name: cord-quagga
A R Karthickf7a613b2017-02-24 09:36:44 -0800118 image: "{{ docker.registry }}/cordtest/quagga:{{ docker.image_version }}"
A R Karthick6d98a592016-08-24 15:16:46 -0700119 pull: always
120 state: absent
A R Karthickc1dde152016-12-14 11:30:44 -0800121
122- name: Pull onosproject
Zack Williams821c5022020-01-15 15:11:46 -0700123 become: true
A R Karthickc1dde152016-12-14 11:30:44 -0800124 docker:
125 name: cord-test-onos
126 image: "{{ docker.registry }}/onosproject/onos:{{ docker.image_version }}"
127 pull: always
128 state: absent