diff options
author | vagrant <pmikus@cisco.com> | 2020-02-04 14:16:01 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2020-02-07 20:08:43 +0000 |
commit | 8605f3f406468f57bb9b2eac12a4421f65965300 (patch) | |
tree | 5eef32ff0298ab1c3ac593adced4a502d7c8ea17 /resources/tools/testbed-setup/ansible/roles/sut | |
parent | d7e14a0a93e7e06047daeaf6a5575f227aeb925a (diff) |
CSIT Azure integration
+ Terraform
+ Ansible
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I353511c5ef39d8c8d43fedc61c8dbb30b4821e1b
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/sut')
4 files changed, 40 insertions, 61 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/sut/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/sut/defaults/main.yaml new file mode 100644 index 0000000000..327d8b7456 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/sut/defaults/main.yaml @@ -0,0 +1,27 @@ +--- +# file: roles/sut/defaults/main.yaml + +packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}" + +packages_base: + - "gdb" + - "libtool" + - "lxc" + - "pkg-config" + - "screen" + +packages_by_distro: + ubuntu: + - "build-essential" + - "libglib2.0-dev" + - "libmbedcrypto1" + - "libmbedtls10" + - "libmbedx509-0" + - "libnuma-dev" + - "libpixman-1-dev" + +packages_by_arch: + aarch64: + - [] + x86_64: + - [] diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/dpdk.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/dpdk.yaml deleted file mode 100644 index f2fc83edae..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/dpdk.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# file: roles/sut/tasks/dpdk.yaml - -- name: Download DPDK release archive - get_url: - url: '{{ dpdk.url }}/{{ dpdk.version }}.tar.xz' - dest: '{{ dpdk.target_dir }}/{{ dpdk.version }}.tar.xz' - mode: 0644 - register: 'linux__dpdk_downloaded' - tags: install-dpdk - -- name: Extract DPDK release archive - become: yes - shell: 'cd {{ dpdk.target_dir }}; tar xf {{ dpdk.target_dir }}/{{ dpdk.version }}.tar.xz' - when: 'linux__dpdk_downloaded' - register: 'linux__dpdk_extracted' - tags: install-dpdk - -- name: Compile DPDK release - become: yes - command: 'make install T={{ dpdk.build_targets[ansible_machine] }}-linuxapp-gcc DESTDIR={{ dpdk.target_dir }}/{{ dpdk.version }} chdir={{ dpdk.target_dir }}/{{ dpdk.version }}' - when: 'linux__dpdk_extracted' - tags: install-dpdk diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml index a882001868..5d02225abc 100644 --- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/sut/tasks/main.yaml @@ -1,18 +1,19 @@ --- # file: roles/sut/tasks/main.yaml -- name: Install distribution - release - machine prerequisites - include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' - tags: [ install-csit-dependencies, install-kernel-image ] +- name: SUT - Install Distribution - Release - Machine Prerequisites + package: + name: "{{ packages | flatten(levels=1) }}" + state: latest + update_cache: true + tags: + - install-dependencies -- name: Copy 80-vpp.conf +- name: SUT - Copy 80-vpp.conf file: - src: '/dev/null' - dest: '/etc/sysctl.d/80-vpp.conf' - state: 'link' + src: "/dev/null" + dest: "/etc/sysctl.d/80-vpp.conf" + state: "link" become: yes - tags: copy-80-vpp - -- name: Install DPDK - include_tasks: 'dpdk.yaml' - tags: install-dpdk + tags: + - copy-80-vpp diff --git a/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_bionic.yaml deleted file mode 100644 index ec2e6fcdd1..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/sut/tasks/ubuntu_bionic.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# file: roles/sut/tasks/ubuntu_bionic.yaml - -- name: Install CSIT dependencies - apt: - name: - - 'gdb' - - 'libglib2.0-dev' - - 'libmbedcrypto1' - - 'libmbedtls10' - - 'libmbedx509-0' - - 'libnuma-dev' - - 'libpixman-1-dev' - - 'libtool' - - 'lxc' - - 'openjdk-8-jdk' - - 'pkg-config' - - 'screen' - state: 'present' - cache_valid_time: 3600 - install_recommends: False - tags: install-csit-dependencies - -- name: Kernel VM install - include_tasks: '../../common/tasks/kernel_install.yaml' - tags: install-kernel-image |