diff options
author | Peter Mikus <pmikus@cisco.com> | 2018-10-17 14:34:45 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-10-23 06:20:19 +0000 |
commit | ccabfb04a4982c89d70b8bfbff67cc97438aad88 (patch) | |
tree | 2f0d64b50dc4afedcd4cdc36b232911e82c7fec2 /resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64 | |
parent | d465d9fba33a323703a2bf40c499d74d0f017091 (diff) |
CSIT-1255 1-Node VPP_Device Documentation
Change-Id: I0152bd9c0d2a97aa206819b46e8e4c0fe7d643eb
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64')
-rw-r--r-- | resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/Dockerfile | 122 | ||||
-rw-r--r-- | resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/supervisord.conf | 22 |
2 files changed, 144 insertions, 0 deletions
diff --git a/resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/Dockerfile b/resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/Dockerfile new file mode 100644 index 0000000000..343ac1ba2d --- /dev/null +++ b/resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/Dockerfile @@ -0,0 +1,122 @@ +# Copyright (c) 2018 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: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:bionic-20180821 + +MAINTAINER csit-dev <csit-dev@lists.fd.io> +LABEL Description="CSIT vpp-device ubuntu 18.04 baseline image" +LABEL Version="0.3" + +# Setup the environment +ENV DEBIAN_FRONTEND=noninteractive +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +ENV NOTVISIBLE "in users profile" +ENV VPP_PYTHON_PREFIX=/var/cache/vpp/python + +# Base layer +RUN apt-get -q update \ + && apt-get install -y -qq \ + apt-transport-https \ + curl \ + software-properties-common \ + && rm -rf /var/lib/apt/lists/* + +# Repository settings +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ + && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && apt-get remove -y \ + curl + +# Extended layer +RUN apt-get -q update \ + && apt-get install -y -qq \ + # general tools + bridge-utils \ + cloud-init \ + locales \ + net-tools \ + openssh-server \ + pciutils \ + rsyslog \ + ssh \ + sudo \ + supervisor \ + tar \ + vim \ + wget \ + # csit requirements + cmake \ + dkms \ + docker-ce \ + libpcap-dev \ + libpython2.7-dev \ + libpython-dev \ + openjdk-8-jdk-headless \ + python-pip \ + python2.7-dev \ + python-dev \ + python-virtualenv \ + qemu-system-x86 \ + socat \ + strongswan \ + unzip \ + tcpdump \ + zlib1g-dev \ + # vpp requirements + ca-certificates \ + libapr1 \ + libmbedcrypto1 \ + libmbedtls10 \ + libmbedx509-0 \ + libnuma1 \ + && rm -rf /var/lib/apt/lists/* + +# Configure locales +RUN locale-gen en_US.UTF-8 \ + && dpkg-reconfigure locales + +# Fix permissions +RUN chown root:syslog /var/log \ + && chmod 755 /etc/default + +# Create directory structure +RUN mkdir -p /tmp/dumps \ + && mkdir -p /var/cache/vpp/python \ + && mkdir -p /var/run/sshd + +# PIP pre-cache +RUN pip install \ + robotframework==2.9.2 \ + paramiko==1.16.0 \ + scp==0.10.2 \ + ipaddress==1.0.16 \ + PyYAML==3.11 \ + pykwalify==1.5.0 \ + scapy==2.3.1 \ + enum34==1.1.2 \ + requests==2.9.1 \ + ecdsa==0.13 \ + pycrypto==2.6.1 \ + pypcap==1.1.5 + +# SSH settings +RUN echo 'root:Csit1234' | chpasswd \ + && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \ + && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \ + && echo "export VISIBLE=now" >> /etc/profile + +EXPOSE 22 + +COPY supervisord.conf /etc/supervisord/supervisord.conf + +CMD ["sh", "-c", "rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api; /usr/bin/supervisord -c /etc/supervisord/supervisord.conf; /usr/sbin/sshd -D"] diff --git a/resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/supervisord.conf b/resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/supervisord.conf new file mode 100644 index 0000000000..3a2c150a53 --- /dev/null +++ b/resources/tools/disk-image-builder/csit-sut-dcr/ubuntu_1804_amd64/supervisord.conf @@ -0,0 +1,22 @@ +[unix_http_server] +file = /run/supervisor.sock + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl = unix:///run/supervisor.sock + +[supervisord] +pidfile = /run/supervisord.pid +identifier = supervisor +directory = /run +logfile=/var/log/supervisord.log +loglevel=debug +nodaemon=false + +[program:vpp] +command=/usr/bin/vpp -c /etc/vpp/startup.conf +autorestart=true +redirect_stderr=true +priority=1 |