Ansible: Remove vpp_device snergster dependency 74/29874/2
authorpmikus <pmikus@cisco.com>
Wed, 11 Nov 2020 10:15:33 +0000 (10:15 +0000)
committerPeter Mikus <pmikus@cisco.com>
Wed, 11 Nov 2020 12:10:11 +0000 (12:10 +0000)
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: Id14c3f2f4f8689256172dc2b3ebc4fbaed5de8d3

VPP_DEVICE_IMAGE_UBUNTU
VPP_DEVICE_IMAGE_UBUNTU_ARM
resources/tools/testbed-setup/ansible/roles/csit_sut_image/files/Dockerfile [moved from resources/tools/disk-image-builder/csit-sut/Dockerfile with 96% similarity]
resources/tools/testbed-setup/ansible/roles/csit_sut_image/files/supervisord.conf [moved from resources/tools/disk-image-builder/csit-sut/supervisord.conf with 97% similarity]
resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/vpp_device.yaml

index 3f47e59..e0a7992 100644 (file)
@@ -1 +1 @@
-snergster/csit-sut:latest
+csit_dut-ubuntu1804:local
index 46a5db3..e0a7992 100644 (file)
@@ -1 +1 @@
-snergster/csit-arm-sut:latest
+csit_dut-ubuntu1804:local
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -12,9 +12,8 @@
 # limitations under the License.
 
 FROM ubuntu:18.04
-MAINTAINER csit-dev <csit-dev@lists.fd.io>
 LABEL Description="CSIT vpp-device ubuntu 18.04 SUT image"
-LABEL Version="1.0"
+LABEL Version="master"
 
 # Setup the environment
 ENV DEBIAN_FRONTEND=noninteractive
@@ -57,6 +56,7 @@ RUN apt-get -q update \
         python-cffi \
         python-cffi-backend \
         python-dev \
+        python-enum34 \
         python-pip \
         python-setuptools \
         python-virtualenv \
@@ -114,11 +114,9 @@ RUN pip3 install \
         scapy==2.4.3 \
         scp==0.13.2 \
         ansible==2.7.8 \
-        ply==3.11 \
         dill==0.2.8.2 \
         numpy==1.17.3 \
         hdrhistogram==0.6.1 \
-        pandas==0.25.3 \
         plotly==4.1.1 \
         PTable==0.9.2 \
         Sphinx==2.2.1 \
@@ -158,7 +156,9 @@ RUN pip3 install \
         urllib3==1.25.6
 
 # ARM workaround
-RUN pip3 install scipy==1.1.0
+RUN pip3 install \
+        pandas==0.25.3 \
+        scipy==1.1.0
 
 # SSH settings
 RUN echo 'root:Csit1234' | chpasswd \
@@ -170,4 +170,4 @@ EXPOSE 2222
 
 COPY supervisord.conf /etc/supervisor/supervisord.conf
 
-CMD ["sh", "-c", "rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api; /usr/bin/supervisord -c /etc/supervisor/supervisord.conf; /usr/sbin/sshd -D -p 2222"]
+CMD ["sh", "-c", "rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api; /usr/bin/supervisord -c /etc/supervisor/supervisord.conf; /usr/sbin/sshd -D -p 2222"]
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml
new file mode 100644 (file)
index 0000000..6ea469b
--- /dev/null
@@ -0,0 +1,27 @@
+---
+# file: roles/csit_sut_image/tasks/main.yaml
+
+- name: Create a directory if it does not exist
+  file:
+    path: "/opt/csit-sut/"
+    state: "directory"
+    mode: 0755
+  tags: csit-sut-image
+
+- name: Copy Build Items
+  copy:
+    src: "{{ item }}"
+    dest: "/opt/csit-sut/"
+    owner: "root"
+    group: "root"
+    mode: 0755
+  with_items:
+    - Dockerfile
+    - supervisord.conf
+  tags: csit-sut-image
+
+- name: Build CSIT SUT Docker Image
+  shell: "docker build -t csit_dut-ubuntu1804:local ."
+  args:
+    chdir: "/opt/csit-sut"
+  tags: csit-sut-image
\ No newline at end of file
index 8a99166..aae5ad3 100644 (file)
@@ -16,6 +16,8 @@
       tags: vpp_device
     - role: kernel_vm
       tags: kernel_vm
+    - role: csit_sut_image
+      tags: csit_sut_image
     - role: nomad
       tags: nomad
     - role: cleanup