diff options
author | vagrant <vv770d@att.com> | 2018-01-20 15:12:44 +0000 |
---|---|---|
committer | vagrant <vv770d@att.com> | 2018-01-20 15:12:59 +0000 |
commit | 00bd7aa1794a71388cb323f524926958e0dd25c7 (patch) | |
tree | df95ef01901b8960d2fb821d961fe04a32b940d1 | |
parent | 4ddc91766c1d252be8d78bf26133dccce82886c2 (diff) |
snmptrap collector dockerization
Issue-ID: DCAEGEN2-228
Change-Id: I118a4c62452a53f647fc868c5cac9bd2b19730ae
Signed-off-by: Vijay VK <vv770d@att.com>
-rw-r--r-- | Dockerfile | 30 | ||||
-rwxr-xr-x | mvn-phase-script.sh | 30 | ||||
-rw-r--r-- | pom.xml | 5 | ||||
-rw-r--r-- | version.properties | 2 |
4 files changed, 37 insertions, 30 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e4806c3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +# Use an official Python runtime as a base image +FROM python:3.6 + +ENV INSROOT /opt/app +ENV APPUSER snmptrap +ENV APPDIR ${INSROOT}/${APPUSER} + +RUN useradd -d ${APPDIR} ${APPUSER} + +WORKDIR ${APPDIR} + +EXPOSE 162 + +# Copy the current directory contents into the container at ${APPDIR} +COPY ./src/ ./bin/ +COPY ./etc/ ./etc/ + +RUN mkdir -p ${APPDIR}/logs \ + && chown -R ${APPUSER}:${APPUSER} ${APPDIR} \ + && chmod a+w ${APPDIR}/logs \ + && chmod 500 ${APPDIR}/etc \ + && chmod 500 ${APPDIR}/bin/dcae_snmptrapd.sh + + +USER ${APPUSER} + +VOLUME ${APPDIR}/logs + +# Run run_policy.sh when the container launches +CMD ["./bin/dcae_snmptrapd.sh"] diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh index 80ca660..edfbed0 100755 --- a/mvn-phase-script.sh +++ b/mvn-phase-script.sh @@ -56,10 +56,10 @@ if [ -z "$WORKSPACE" ]; then WORKSPACE=$(pwd) fi -if [ -z "$SETTINGS_FILE" ]; then - echo "SETTINGS_FILE environment variable not set. Cannot proceed" - exit -fi +#if [ -z "$SETTINGS_FILE" ]; then +# echo "SETTINGS_FILE environment variable not set. Cannot proceed" +# exit +#fi @@ -116,31 +116,9 @@ deploy) # copy the ones suitable for your repo, and remove the "if false" statement # build docker image from Docker file (under root of repo) and push to registry - if false ; then build_and_push_docker - fi # upload all yaml file under the root of repo - if false ; then - upload_files_of_extension yaml - fi - - if false ; then - case $MVN_PROJECT_MODULEID in - bootstrap) - # build docker image from Docker file (under module dir) and push to registry - build_and_push_docker - ;; - scripts) - # upload all sh file under the root of module - upload_files_of_extension sh - ;; - *) - echo "====> unknown mvn project module" - ;; - esac - fi - ;; *) echo "==> unprocessed phase" @@ -23,15 +23,14 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>0.1.1</version> </parent> <!--- CHANGE THE FOLLOWING 3 OBJECTS for your own repo --> <groupId>org.onap.dcaegen2.collectors</groupId> <artifactId>snmptrap</artifactId> <name>dcaegen2-collectors-snmptrap</name> - - <version>1.1.0-SNAPSHOT</version> + <version>1.2.0-SNAPSHOT</version> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/version.properties b/version.properties index 73415a7..07578e5 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ major=1
-minor=1
+minor=2
patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}
|