diff options
-rw-r--r-- | alpine/java11/pom.xml | 2 | ||||
-rw-r--r-- | alpine/java11/src/main/docker/Dockerfile | 12 | ||||
-rw-r--r-- | ansible-server/src/main/Dockerfile | 17 | ||||
-rwxr-xr-x | ansible-server/src/main/ansible-server/startAnsibleServer.sh | 2 | ||||
-rw-r--r-- | dgbuilder-docker/src/main/docker/Dockerfile | 19 | ||||
-rwxr-xr-x | dgbuilder/tools/splitFlows.sh | 1 | ||||
-rw-r--r-- | odlsli/odlsli-alpine/src/main/docker/Dockerfile | 1 | ||||
-rw-r--r-- | opendaylight/sodium/sodium-alpine/src/main/docker/Dockerfile | 9 | ||||
-rw-r--r-- | saltstack-server/src/main/docker/Dockerfile | 25 |
9 files changed, 57 insertions, 31 deletions
diff --git a/alpine/java11/pom.xml b/alpine/java11/pom.xml index e160665c..8370e92a 100644 --- a/alpine/java11/pom.xml +++ b/alpine/java11/pom.xml @@ -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> diff --git a/alpine/java11/src/main/docker/Dockerfile b/alpine/java11/src/main/docker/Dockerfile index af1297c0..d7077f30 100644 --- a/alpine/java11/src/main/docker/Dockerfile +++ b/alpine/java11/src/main/docker/Dockerfile @@ -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 diff --git a/ansible-server/src/main/Dockerfile b/ansible-server/src/main/Dockerfile index 2751a482..9536a646 100644 --- a/ansible-server/src/main/Dockerfile +++ b/ansible-server/src/main/Dockerfile @@ -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 diff --git a/ansible-server/src/main/ansible-server/startAnsibleServer.sh b/ansible-server/src/main/ansible-server/startAnsibleServer.sh index 2853acad..172ae530 100755 --- a/ansible-server/src/main/ansible-server/startAnsibleServer.sh +++ b/ansible-server/src/main/ansible-server/startAnsibleServer.sh @@ -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 diff --git a/dgbuilder-docker/src/main/docker/Dockerfile b/dgbuilder-docker/src/main/docker/Dockerfile index 5c803785..1c3a4034 100644 --- a/dgbuilder-docker/src/main/docker/Dockerfile +++ b/dgbuilder-docker/src/main/docker/Dockerfile @@ -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 diff --git a/dgbuilder/tools/splitFlows.sh b/dgbuilder/tools/splitFlows.sh index ccb70cf9..79fd450d 100755 --- a/dgbuilder/tools/splitFlows.sh +++ b/dgbuilder/tools/splitFlows.sh @@ -1,3 +1,4 @@ +#!/bin/sh if [ "$#" != "2" ] then echo "Usage: $0 full_path_to_flows_json_file full_path_to_output_dir" diff --git a/odlsli/odlsli-alpine/src/main/docker/Dockerfile b/odlsli/odlsli-alpine/src/main/docker/Dockerfile index ea6f41f7..cca71f6d 100644 --- a/odlsli/odlsli-alpine/src/main/docker/Dockerfile +++ b/odlsli/odlsli-alpine/src/main/docker/Dockerfile @@ -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 diff --git a/opendaylight/sodium/sodium-alpine/src/main/docker/Dockerfile b/opendaylight/sodium/sodium-alpine/src/main/docker/Dockerfile index 8c1a780f..11eeacd8 100644 --- a/opendaylight/sodium/sodium-alpine/src/main/docker/Dockerfile +++ b/opendaylight/sodium/sodium-alpine/src/main/docker/Dockerfile @@ -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 diff --git a/saltstack-server/src/main/docker/Dockerfile b/saltstack-server/src/main/docker/Dockerfile index 3226e472..710d45d7 100644 --- a/saltstack-server/src/main/docker/Dockerfile +++ b/saltstack-server/src/main/docker/Dockerfile @@ -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 |