Update to use ONAP standard base images 95/111995/1
authorDan Timoney <dtimoney@att.com>
Tue, 1 Sep 2020 20:21:53 +0000 (16:21 -0400)
committerDan Timoney <dtimoney@att.com>
Tue, 1 Sep 2020 20:24:53 +0000 (16:24 -0400)
Updated all containers to use one of the 2 approved ONAP base images:
 - onap/integration-java11
 - onap/integration-python

Change-Id: I961e9af38d790f74528a726a0fc68d1a2e5fbfb9
Issue-ID: CCSDK-2418
Signed-off-by: Dan Timoney <dtimoney@att.com>
alpine/java11/pom.xml
alpine/java11/src/main/docker/Dockerfile
ansible-server/src/main/Dockerfile
ansible-server/src/main/ansible-server/startAnsibleServer.sh
dgbuilder-docker/src/main/docker/Dockerfile
dgbuilder/tools/splitFlows.sh
odlsli/odlsli-alpine/src/main/docker/Dockerfile
opendaylight/sodium/sodium-alpine/src/main/docker/Dockerfile
saltstack-server/src/main/docker/Dockerfile

index e160665..8370e92 100644 (file)
@@ -22,6 +22,8 @@
         <image.name>onap/ccsdk-alpine-j11-image</image.name>
         <ccsdk.project.version>${project.version}</ccsdk.project.version>
         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+        <base.image>onap/integration-java11</base.image>
+        <base.image.version>7.1.0</base.image.version>
     </properties>
 
     <build>
index af1297c..d7077f3 100644 (file)
@@ -1,9 +1,7 @@
 # Base alpine with added packages needed for open ecomp
-FROM alpine:3.11.3
+FROM ${base.image}:${base.image.version}
+MAINTAINER CCSDK  Team (onap-ccsdk@lists.onap.org)
 
-LABEL maintainer="CCSDK  Team (onap-ccsdk@lists.onap.org)"
-
-RUN apk update && apk add --no-cache openjdk11 python3 graphviz unzip rsync nss mysql-client nodejs
 ARG HTTP_PROXY
 ARG HTTPS_PROXY
 
@@ -12,4 +10,8 @@ ENV http_proxy  ${HTTP_PROXY}
 ENV HTTPS_PROXY ${HTTPS_PROXY}
 ENV https_proxy ${HTTPS_PROXY}
 
-ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
\ No newline at end of file
+ENV JAVA_HOME /opt/java/openjdk
+# Add tools needed for OpenDaylight
+USER root
+RUN apk update && apk --no-cache add bash git  maven mysql-client nodejs npm python3 py3-pip graphviz unzip rsync nss
+USER onap
\ No newline at end of file
index 2751a48..9536a64 100644 (file)
@@ -1,23 +1,30 @@
-FROM alpine:3.8
+FROM onap/integration-python:7.0.1
 
 LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
 ARG PIP_TAG=18.0
 
 WORKDIR /opt/
 
+ENV http_proxy ${http_proxy}
+ENV https_proxy ${https_proxy}
+ENV PIP_EXTRA_OPTS ${https_proxy:+"--trusted-host pypi.org --trusted-host files.pythonhosted.org --proxy=${https_proxy}"}
+ENV PIP_EXTRA_OPTS ${PIP_EXTRA_OPTS:-""}
+
+USER root
 COPY ansible-server/requirements.txt ansible-server/requirements.txt
 
+RUN echo "https_proxy is ${https_proxy} ; PIP_EXTRA_OPTS is ${PIP_EXTRA_OPTS}"
+
 RUN apk add --no-cache curl \
                        iputils \
                        bash \
-                       openssh-client \
-                       python3 &&\
+                       openssh-client &&\
     apk add --no-cache --virtual .build-deps build-base \
                                              libffi-dev \
                                              openssl-dev \
                                              python3-dev &&\
-    pip3 install --no-cache-dir --upgrade pip==$PIP_TAG && \
-    pip3 install --no-cache-dir -r ansible-server/requirements.txt &&\
+    pip3 install --no-cache-dir --upgrade pip ${PIP_EXTRA_OPTS} && \
+    pip3 install --no-cache-dir -r ansible-server/requirements.txt ${PIP_EXTRA_OPTS} &&\
     apk del .build-deps
 
 RUN addgroup -S ansible && adduser -S ansible -G ansible
index 2853aca..172ae53 100755 (executable)
@@ -2,5 +2,5 @@
 exec &> >(tee -a "/var/log/ansible-server.log")
 
 cd /opt/onap/ccsdk
-exec /usr/bin/python3 RestServer.py
+exec /usr/local/bin/python3 RestServer.py
 
index 5c80378..1c3a403 100644 (file)
@@ -1,22 +1,23 @@
-# Base ubuntu with added packages needed for open ecomp
-FROM onap/ccsdk-ubuntu-image:${project.docker.latestfulltag.version}
+# Base standard ONAP java base image with added packages needed for nodered
+FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version}
 MAINTAINER CCSDK  Team (onap-discuss@lists.onap.org)
 
 # Create non-root user
-RUN addgroup --system dgbuilder && adduser --system --ingroup dgbuilder dgbuilder
-RUN apt-get update && apt-get install -y curl
+USER root
+RUN addgroup -S dgbuilder && adduser -S dgbuilder -G dgbuilder
+
+RUN apk --no-cache add curl
 RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
-RUN apt-get install gcc g++ make
-RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
-RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" |tee /etc/apt/sources.list.d/yarn.list
+RUN apk add gcc g++ make ncurses
+
 # copy onap
 COPY --chown=dgbuilder:dgbuilder opt /opt
-RUN apt-get update && apt-get install -y yarn nodejs
+RUN apk update && apk add yarn nodejs
 RUN node --version
 WORKDIR /opt/onap/ccsdk/dgbuilder
 # Set the proxy if needed
 # RUN npm config set proxy http://your.proxy.com:8080
-RUN cd /opt/onap/ccsdk/dgbuilder/ && npm install
+RUN cd /opt/onap/ccsdk/dgbuilder/ && npm config set strict-ssl false && npm install
 
 #ENTRYPOINT /bin/bash /opt/onap/ccsdk/dgbuilder/start sdnc1.0
 
index ccb70cf..79fd450 100755 (executable)
@@ -1,3 +1,4 @@
+#!/bin/sh
 if [ "$#" != "2" ]
 then
        echo "Usage: $0 full_path_to_flows_json_file full_path_to_output_dir"
index ea6f41f..cca71f6 100644 (file)
@@ -3,6 +3,7 @@
 FROM ${base.image.name}:${project.docker.latestfulltag.version} AS stage0
 
 # copy the opendaylight credentials
+USER ROOT
 COPY idmlight.db.mv.db $ODL_HOME/data
 
 # copy CCSDK mvn artifacts to ODL repository
index 8c1a780..11eeacd 100644 (file)
@@ -1,9 +1,10 @@
 FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version}
-LABEL maintainer="CCSDK  Team (onap-ccsdk@lists.onap.org)"
+MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
 
 ENV ODL_HOME /opt/opendaylight/current
 
 # copy the opendaylight tar and expand
+USER root
 COPY ${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz /tmp/
 RUN mkdir -p /opt/odl \
     && tar zxvf /tmp/${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz --directory /opt/odl \
@@ -12,4 +13,10 @@ RUN mkdir -p /opt/odl \
     && ln -s  /opt/opendaylight /opt/opendaylight/${odl.karaf.artifactId}-${ccsdk.opendaylight.version} \
     && ln -s /opt/opendaylight /opt/opendaylight/current
 
+# Add missing scripts see SDNC-1056
+#COPY configure_cluster.sh configure-cluster-ipdetect.sh custom_shard_config.txt set_persistence.sh $ODL_HOME/bin/
+#RUN chmod 755 $ODL_HOME/bin/configure_cluster.sh $ODL_HOME/bin/configure-cluster-ipdetect.sh $ODL_HOME/bin/set_persistence.sh $ODL_HOME/bin/custom_shard_config.txt
+
+# ENTRYPOINT exec /opt/opendaylight/bin/karaf
+USER onap
 EXPOSE 8181
index 3226e47..710d45d 100644 (file)
@@ -1,21 +1,26 @@
-FROM centos:7
+#FROM centos:7
+FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version}
 
+USER root
+RUN apk add git tmux vim salt-master salt-minion
 
-RUN yum clean all && \
-      yum install -y yum install epel-release && \
-      yum install -y https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm && \
-      yum update -y && \
-      yum install -y sudo git tmux vim salt-master salt-minion && \
-      yum clean all
+#RUN yum clean all && \
+#      yum install -y yum install epel-release && \
+#      yum install -y https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm && \
+#      yum update -y && \
+#      yum install -y sudo git tmux vim salt-master salt-minion && \
+#      yum clean all
 
 EXPOSE 4505 4506
 
 # Create non root user
-RUN groupadd --system saltstack && useradd --system -g saltstack saltstack
-RUN chown -R saltstack /etc/salt /var/cache/salt /var/log/salt
+RUN addgroup -S saltstack && adduser -S saltstack -G saltstack
+# RUN groupadd --system saltstack && useradd --system -g saltstack saltstack
+RUN chown -R saltstack /etc/salt /var/log/salt
 RUN mkdir /var/run/salt && chown saltstack:saltstack /var/run/salt
+RUN mkdir /var/cache/salt && chown saltstack:saltstack /var/cache/salt
 
 USER saltstack
 
 # Run salt-master in foreground (not as a daemon)
-CMD /usr/bin/salt-master
\ No newline at end of file
+ENTRYPOINT [ "/usr/bin/salt-master" ]
\ No newline at end of file