summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alpine/java11/src/main/docker/Dockerfile2
-rwxr-xr-xdependencies/pom.xml2
-rw-r--r--odlsli/odlsli-alpine/pom.xml2
-rw-r--r--odlsli/odlsli-alpine/src/main/docker/Dockerfile75
-rw-r--r--opendaylight/aluminum/aluminum-alpine/src/main/docker/Dockerfile22
-rw-r--r--pom.xml2
6 files changed, 65 insertions, 40 deletions
diff --git a/alpine/java11/src/main/docker/Dockerfile b/alpine/java11/src/main/docker/Dockerfile
index 6480fe50..192d618b 100644
--- a/alpine/java11/src/main/docker/Dockerfile
+++ b/alpine/java11/src/main/docker/Dockerfile
@@ -14,6 +14,6 @@ ENV https_proxy ${HTTPS_PROXY}
ENV JAVA_HOME /opt/java/openjdk
# Add tools needed for OpenDaylight
-RUN apk update && apk --no-cache add bash git mysql-client nodejs npm python3 py3-pip graphviz unzip rsync nss
+RUN apk update && apk --no-cache add sudo bash iputils openssl git mysql-client nodejs npm python3 py3-pip graphviz unzip rsync nss
USER onap
diff --git a/dependencies/pom.xml b/dependencies/pom.xml
index 36df240c..e2b81714 100755
--- a/dependencies/pom.xml
+++ b/dependencies/pom.xml
@@ -24,7 +24,7 @@
<dependency>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>dependencies-odl-bom</artifactId>
- <version>2.1.7-SNAPSHOT</version>
+ <version>2.1.7</version>
<scope>import</scope>
<type>pom</type>
</dependency>
diff --git a/odlsli/odlsli-alpine/pom.xml b/odlsli/odlsli-alpine/pom.xml
index d5e92cf7..348c1803 100644
--- a/odlsli/odlsli-alpine/pom.xml
+++ b/odlsli/odlsli-alpine/pom.xml
@@ -647,7 +647,7 @@
</image>
<image>
<name>${image.name}:${project.docker.latesttagtimestamp.snapshot.version}</name>
- <alias>odlsli-container</alias>
+ <alias>ccsdk_odlsli_container</alias>
<run>
<env>
<MYSQL_ROOT_PASSWORD>itsASecret</MYSQL_ROOT_PASSWORD>
diff --git a/odlsli/odlsli-alpine/src/main/docker/Dockerfile b/odlsli/odlsli-alpine/src/main/docker/Dockerfile
index b3140fc8..0b6dbbf7 100644
--- a/odlsli/odlsli-alpine/src/main/docker/Dockerfile
+++ b/odlsli/odlsli-alpine/src/main/docker/Dockerfile
@@ -3,57 +3,66 @@
FROM ${base.image.name}:${project.docker.latestfulltag.version} AS stage0
USER root
-# copy the opendaylight credentials
+# Copy the opendaylight credentials
COPY idmlight.db.mv.db $ODL_HOME/data
-# copy CCSDK mvn artifacts to ODL repository
+# Copy CCSDK mvn artifacts to ODL repository
COPY system /tmp/system
RUN rsync -a /tmp/system $ODL_HOME
-# copy deliverables to opt
+# Copy deliverables to opt
COPY opt /opt
COPY org.ops4j.pax.logging.cfg $ODL_HOME/etc/org.ops4j.pax.logging.cfg
-## END OF STAGE0 ##
-FROM ${base.image.name}:${project.docker.latestfulltag.version}
+# CCSDK SLI FEATURES
+ENV CCSDK_SLI_FEATURES_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.version}/xml/features,\
+mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.version}/xml/features,\
+mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.version}/xml/features,\
+mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.version}/xml/features
-LABEL maintainer="CCSDK Team (onap-ccsdk@lists.onap.org)"
-USER root
+# CCSDK SDNR FEATURES
+ENV CCSDK_SDNR_FEATURES_REPO mvn:org.onap.ccsdk.oran/a1-adapter-northbound/${ccsdk.oran.a1adapter.version}/xml/features,\
+mvn:org.onap.ccsdk.features/ccsdk-features-all/${ccsdk.features.version}/xml/features,\
+mvn:org.onap.ccsdk.features.sdnr.northbound/sdnr-northbound-all/${ccsdk.features.version}/xml/features,\
+mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator/${ccsdk.features.version}/xml/features,\
+mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator-oauth/${ccsdk.features.version}/xml/features,\
+mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator-devicemanager/${ccsdk.features.version}/xml/features,\
+mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator-devicemanager-base/${ccsdk.features.version}/xml/features
-ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties
-ENV CCSDKFEATUREVERSION ${ccsdk.features.version}
-ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.sli.version}/xml/features
-ENV CCSDK_SLI_ADAPTORS_REPO mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.version}/xml/features
-ENV CCSDK_FEATURES_REPO mvn:org.onap.ccsdk.features/ccsdk-features-all/${ccsdk.features.version}/xml/features
-ENV CCSDK_FEATURES_SDNR_WT_REPO mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator/${ccsdk.features.version}/xml/features,\
- mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator-oauth/${ccsdk.features.version}/xml/features,\
- mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator-devicemanager/${ccsdk.features.version}/xml/features,\
- mvn:org.onap.ccsdk.features.sdnr.wt/sdnr-wt-feature-aggregator-devicemanager-base/${ccsdk.features.version}/xml/features
-ENV CCSDK_FEATURES_SDNR_NORTHBOUND_REPO mvn:org.onap.ccsdk.features.sdnr.northbound/sdnr-northbound-all/${ccsdk.features.version}/xml/features
-ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.version}/xml/features
-ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.version}/xml/features
-ENV A1ADAPTER_NORTHBOUND_REPO mvn:org.onap.ccsdk.oran/a1-adapter-northbound/${ccsdk.oran.a1adapter.version}/xml/features
-ENV ANSIBLE_GPG_KEY ${ansible.gpg.key}
+# ODL and CCSDK SLI featuresBoot defined in pom.xml
ENV ODL_BOOT_FEATURES_EXTRA ${odl.boot.features.extra}
-# Install sudo and IP utilities
-RUN apk update && apk --no-cache add sudo iputils openssl
+# Backing up existing karaf cfg and updating features boot and features repository
+RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig
+RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${ODL_BOOT_FEATURES_EXTRA}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
+RUN sed -i -e "\|featuresRepositories|s|$|,${CCSDK_SLI_FEATURES_REPO},${CCSDK_SDNR_FEATURES_REPO} |" $ODL_HOME/etc/org.apache.karaf.features.cfg
+# Enable wheel and create a group and user
+RUN sed -i -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers \
+ && addgroup -S odl \
+ && adduser -S odl -G odl \
+ && addgroup odl wheel
+# Changing ownership and permission of /opt
+RUN chown -R odl:odl /opt && chmod -R 755 /opt
-# Enable wheel group
-RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers
+## END OF STAGE0 ##
-# Create odl user
-RUN addgroup -S odl && adduser -S odl -G odl
-RUN addgroup odl wheel
+#################################################
-COPY --from=stage0 --chown=odl:odl /opt /opt
+## This will create actual image
+FROM scratch
+LABEL maintainer="CCSDK Team (onap-ccsdk@lists.onap.org)"
+USER root
-# Add CCSDK repositories to boot repositories
-RUN cp $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig
-RUN sed -i -e "\|featuresRepositories|s|$|, ${CCSDK_SLI_CORE_REPO}, ${CCSDK_SLI_ADAPTORS_REPO}, ${CCSDK_SLI_NORTHBOUND_REPO}, ${CCSDK_SLI_PLUGINS_REPO}, ${CCSDK_FEATURES_REPO}, ${A1ADAPTER_NORTHBOUND_REPO}, ${CCSDK_FEATURES_SDNR_NORTHBOUND_REPO}, ${CCSDK_FEATURES_SDNR_WT_REPO} |" $ODL_HOME/etc/org.apache.karaf.features.cfg
-RUN sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${ODL_BOOT_FEATURES_EXTRA}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
+ENV JAVA_HOME /opt/java/openjdk
+ENV ODL_HOME /opt/opendaylight/current
+ENV SDNC_CONFIG_DIR /opt/onap/ccsdk/data/properties
+ENV ANSIBLE_GPG_KEY ${ansible.gpg.key}
+
+# Copy Everything from stage0
+COPY --from=stage0 / /
USER odl
+WORKDIR $ODL_HOME
ENTRYPOINT /opt/onap/ccsdk/bin/startODL.sh
diff --git a/opendaylight/aluminum/aluminum-alpine/src/main/docker/Dockerfile b/opendaylight/aluminum/aluminum-alpine/src/main/docker/Dockerfile
index dd63d514..e0091984 100644
--- a/opendaylight/aluminum/aluminum-alpine/src/main/docker/Dockerfile
+++ b/opendaylight/aluminum/aluminum-alpine/src/main/docker/Dockerfile
@@ -1,10 +1,11 @@
-FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version}
-MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
+# Prepare stage for multistage image build
+## START OF STAGE0 ##
+FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version} AS stage0
+USER root
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 xzf /tmp/${odl.karaf.artifactId}-${ccsdk.opendaylight.version}.tar.gz --directory /opt/odl \
@@ -19,6 +20,21 @@ COPY system $ODL_HOME/system
#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
+## END OF STAGE0 ##
+
+#################################################
+
+## This will create actual image
+FROM scratch
+MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
+USER root
+
+ENV JAVA_HOME /opt/java/openjdk
+ENV ODL_HOME /opt/opendaylight/current
+
+# Copy Everything from stage0
+COPY --from=stage0 / /
+
# ENTRYPOINT exec /opt/opendaylight/bin/karaf
WORKDIR $ODL_HOME
USER onap
diff --git a/pom.xml b/pom.xml
index 9362cedd..a5f76d8e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>oparent</artifactId>
- <version>2.1.7-SNAPSHOT</version>
+ <version>2.1.7</version>
</parent>
<groupId>org.onap.ccsdk.distribution</groupId>