From: Muthuramalingam, Brinda Santh(bs2796) Date: Thu, 23 Aug 2018 15:54:30 +0000 (+0000) Subject: Controller Blueprints Microservice X-Git-Tag: 0.3.0~94 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=d3efe7295b3bbe08d240d3719eb5a2c5d0b3c12d;p=ccsdk%2Fapps.git Controller Blueprints Microservice Add Docker Build and Deploy Maven Implementations for Controller Blueprint MS and their dependencies Change-Id: I9eee9fff535bcc9ca0b855150892ce53af126d1c Issue-ID: CCSDK-483 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index ea422600..1412ecae 100644 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT ../parent application diff --git a/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml b/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml index efd7d74b..a4670517 100644 --- a/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT adaptors diff --git a/ms/blueprintsprocessor/modules/commons/core/pom.xml b/ms/blueprintsprocessor/modules/commons/core/pom.xml index a601560b..d0203208 100644 --- a/ms/blueprintsprocessor/modules/commons/core/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/core/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT core @@ -38,8 +38,8 @@ rest-lib - org.onap.ccsdk.apps - controllerblueprints-resource-dict + org.onap.ccsdk.apps.controllerblueprints + resource-dict diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index 31abb40d..a8ece15d 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT db-lib diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index 83a3cb8b..00b7e5f3 100644 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT commons diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml index d671f120..27a1a1d7 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT rest-lib diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index 1b9d2782..fd2b9fa2 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT inbounds diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index 6ed7c9da..32b72178 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor inbounds - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT resource-api diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml index a777c08c..7791b5d1 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor inbounds - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT selfservice-api diff --git a/ms/blueprintsprocessor/modules/outbounds/pom.xml b/ms/blueprintsprocessor/modules/outbounds/pom.xml index 213e516b..8a902622 100644 --- a/ms/blueprintsprocessor/modules/outbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/outbounds/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT outbounds diff --git a/ms/blueprintsprocessor/modules/pom.xml b/ms/blueprintsprocessor/modules/pom.xml index 68447436..c0c30e01 100644 --- a/ms/blueprintsprocessor/modules/pom.xml +++ b/ms/blueprintsprocessor/modules/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT ../parent diff --git a/ms/blueprintsprocessor/modules/services/db-service/pom.xml b/ms/blueprintsprocessor/modules/services/db-service/pom.xml index b11ba6d0..3c0d9e7c 100644 --- a/ms/blueprintsprocessor/modules/services/db-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/db-service/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor services - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT db-service diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml index c49476fd..b1bf8231 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor services - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT execution-service diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml index 4ab8d00d..90a4446d 100644 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT services diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml b/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml index 581dd14d..f25eb713 100644 --- a/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor services - 0.0.3-SNAPSHOT + 0.3.0-SNAPSHOT resolution-service jar diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index b6c8e0c3..79039aa3 100644 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -16,27 +16,61 @@ --> - org.onap.ccsdk.apps.blueprintsprocessor - 0.0.3-SNAPSHOT 4.0.0 + + org.onap.ccsdk.apps + blueprintsprocessor + 0.3.0-SNAPSHOT + + org.onap.ccsdk.apps.blueprintsprocessor parent pom Blueprints Processor Parent Blueprints Processor Parent - UTF-8 - UTF-8 - 1.8 - 1.8 - 1.8 0.3.0-SNAPSHOT 2.0.4.RELEASE + 5.0.8.RELEASE 1.2.60 + 1.0.0 2.9.2 1.4.197 + + + org.springframework.boot + spring-boot-starter-parent + ${spring.boot.version} + pom + import + + + + + com.att.eelf + eelf-core + ${eelf.version} + + + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version} + + org.onap.ccsdk.apps.blueprintsprocessor @@ -81,8 +115,8 @@ - org.onap.ccsdk.apps - controllerblueprints-resource-dict + org.onap.ccsdk.apps.controllerblueprints + resource-dict ${controllerblueprints.version} @@ -98,25 +132,33 @@ ${springfox.swagger2.version} - - + - org.springframework.boot - spring-boot-starter-parent - ${spring.boot.version} - pom - import + org.apache.commons + commons-lang3 + 3.2.1 - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - ${kotlin.version} + commons-collections + commons-collections + 3.2.2 - org.jetbrains.kotlin - kotlin-reflect - ${kotlin.version} + commons-io + commons-io + 2.6 + + org.apache.velocity + velocity + 1.7 + + + com.google.guava + guava + 25.1-jre + + com.h2database @@ -136,22 +178,18 @@ org.apache.commons commons-lang3 - 3.2.1 commons-collections commons-collections - 3.2.2 commons-io commons-io - 2.6 org.apache.velocity velocity - 1.7 diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml index 6c980be0..f35b105d 100644 --- a/ms/blueprintsprocessor/pom.xml +++ b/ms/blueprintsprocessor/pom.xml @@ -29,10 +29,15 @@ Blueprints Processor POM + BlueprintsProcessor UTF-8 + UTF-8 + yyyyMMdd'T'HHmmss'Z' + ${maven.build.timestamp} + 1.8 1.8 1.8 - 1.2.60 + ${project.version} diff --git a/ms/controllerblueprints/application/pom.xml b/ms/controllerblueprints/application/pom.xml index 19fd9c72..4e781ad1 100644 --- a/ms/controllerblueprints/application/pom.xml +++ b/ms/controllerblueprints/application/pom.xml @@ -21,24 +21,18 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.onap.ccsdk.apps - controllerblueprints-parent + org.onap.ccsdk.apps.controllerblueprints + parent 0.3.0-SNAPSHOT ../parent - controllerblueprints-application + application Controller Blueprints Application ${basedir}/src/main/resources/swagger-ui/dist 1.8 - xxxxxxxxx:5100 - distribution - local org.onap.ccsdk.apps - org.onap.ccsdk.apps - 200.0.49 controllerblueprints - jacoco reuseReports @@ -50,15 +44,12 @@ ${basedir}/target/jacoco-it.exec java 2.0.7 - - - - org.onap.ccsdk.apps - controllerblueprints-service + org.onap.ccsdk.apps.controllerblueprints + service org.springframework.boot @@ -102,16 +93,34 @@ true - - src/main/docker - ${basedir}/target - - **/* - - true - + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/docker + + * + + true + + + + + + + org.jacoco jacoco-maven-plugin @@ -166,28 +175,6 @@ - - - maven-assembly-plugin - 3.0.0 - - - target - - src/assembly/distribution.xml - - posix - - - - ${assembly.id} - package - - single - - - - maven-compiler-plugin 3.1 diff --git a/ms/controllerblueprints/distribution/pom.xml b/ms/controllerblueprints/distribution/pom.xml new file mode 100644 index 00000000..37c0b844 --- /dev/null +++ b/ms/controllerblueprints/distribution/pom.xml @@ -0,0 +1,187 @@ + + + + + 4.0.0 + + org.onap.ccsdk.apps.controllerblueprints + parent + 0.3.0-SNAPSHOT + ../parent + + distribution + pom + Controller Blueprints Distribution + + maven + org.onap.ccsdk.apps + controllerblueprints + onap/ccsdk-controllerblueprints + + + + + org.onap.ccsdk.apps.controllerblueprints + application + + + + + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/docker + + * + + true + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + ant-test + package + + + + + + + run + + + + + + + maven-assembly-plugin + 3.0.0 + + + ${basedir}/target/docker-stage + + src/main/docker/distribution.xml + + posix + + + + ${assembly.id} + package + + single + + + + + + org.codehaus.groovy.maven + gmaven-plugin + 1.0 + + + validate + + execute + + + + println project.properties['ccsdk.project.version']; + def versionArray; + if (project.properties['ccsdk.project.version'] != null ) { + versionArray = project.properties['ccsdk.project.version'].split('\\.'); + } + + if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT")) + { + project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; + } else { + project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest"; + } + + println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']; + + + + + + + io.fabric8 + docker-maven-plugin + 0.26.1 + false + + + + ${image.name} + + try + ${basedir}/target/docker-stage + + ${project.version} + ${project.version}-STAGING-${maven.build.timestamp} + ${project.docker.latesttag.version} + + + + + true + + + + + + + + + + + push-images + deploy + + build + push + + + + + + + + diff --git a/ms/controllerblueprints/application/src/main/dc/docker-compose.yaml b/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml similarity index 88% rename from ms/controllerblueprints/application/src/main/dc/docker-compose.yaml rename to ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml index 5696d02b..9450f306 100644 --- a/ms/controllerblueprints/application/src/main/dc/docker-compose.yaml +++ b/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml @@ -17,7 +17,7 @@ services: controller-blueprints: depends_on: - db - image: onap/controllerblueprints:1.0.0 + image: onap/ccsdk-controllerblueprints:latest container_name: cb-rest ports: - "8080:8080" diff --git a/ms/controllerblueprints/application/src/main/docker/Dockerfile b/ms/controllerblueprints/distribution/src/main/docker/Dockerfile similarity index 89% rename from ms/controllerblueprints/application/src/main/docker/Dockerfile rename to ms/controllerblueprints/distribution/src/main/docker/Dockerfile index 06304e1d..a2f453f2 100644 --- a/ms/controllerblueprints/application/src/main/docker/Dockerfile +++ b/ms/controllerblueprints/distribution/src/main/docker/Dockerfile @@ -1,5 +1,8 @@ FROM anapsix/alpine-java:8_jdk +ENV HTTP_PROXY ${HTTP_PROXY} +ENV HTTPS_PROXY ${HTTPS_PROXY} + RUN apk add --no-cache curl COPY startService.sh /startService.sh diff --git a/ms/controllerblueprints/application/src/assembly/distribution.xml b/ms/controllerblueprints/distribution/src/main/docker/distribution.xml similarity index 81% rename from ms/controllerblueprints/application/src/assembly/distribution.xml rename to ms/controllerblueprints/distribution/src/main/docker/distribution.xml index c58c20d7..f2f3cb0b 100644 --- a/ms/controllerblueprints/application/src/assembly/distribution.xml +++ b/ms/controllerblueprints/distribution/src/main/docker/distribution.xml @@ -32,11 +32,11 @@ - ${project.basedir}/src/main/resources + ${project.basedir}/../application/src/main/resources application.properties - / + ./ true @@ -45,26 +45,26 @@ Dockerfile startService.sh - / + ./ true - ${project.basedir}/src/main/groovy + ${project.basedir}/../application/src/main/groovy src/main/groovy true - ${project.basedir}/src/main/resources + ${project.basedir}/../application/src/main/resources src/main/resources true - ${project.basedir}/etc - /etc + ${project.basedir}/../application/etc + ./etc true - ${project.basedir}/load + ${project.basedir}/../application/load load true diff --git a/ms/controllerblueprints/application/src/main/docker/startService.sh b/ms/controllerblueprints/distribution/src/main/docker/startService.sh similarity index 100% rename from ms/controllerblueprints/application/src/main/docker/startService.sh rename to ms/controllerblueprints/distribution/src/main/docker/startService.sh diff --git a/ms/controllerblueprints/modules/core/pom.xml b/ms/controllerblueprints/modules/core/pom.xml index fc7581c8..5782c60f 100644 --- a/ms/controllerblueprints/modules/core/pom.xml +++ b/ms/controllerblueprints/modules/core/pom.xml @@ -21,11 +21,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.onap.ccsdk.apps - controllerblueprints-modules + org.onap.ccsdk.apps.controllerblueprints + modules 0.3.0-SNAPSHOT - controllerblueprints-core + core Controller Blueprints Core diff --git a/ms/controllerblueprints/modules/pom.xml b/ms/controllerblueprints/modules/pom.xml index 9e7215ba..5ab4e447 100644 --- a/ms/controllerblueprints/modules/pom.xml +++ b/ms/controllerblueprints/modules/pom.xml @@ -21,12 +21,12 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.onap.ccsdk.apps - controllerblueprints-parent + org.onap.ccsdk.apps.controllerblueprints + parent 0.3.0-SNAPSHOT ../parent - controllerblueprints-modules + modules Controller Blueprints Modules pom diff --git a/ms/controllerblueprints/modules/resource-dict/pom.xml b/ms/controllerblueprints/modules/resource-dict/pom.xml index 337f5512..4f226185 100644 --- a/ms/controllerblueprints/modules/resource-dict/pom.xml +++ b/ms/controllerblueprints/modules/resource-dict/pom.xml @@ -21,17 +21,17 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.onap.ccsdk.apps - controllerblueprints-modules + org.onap.ccsdk.apps.controllerblueprints + modules 0.3.0-SNAPSHOT - controllerblueprints-resource-dict + resource-dict Controller Blueprints Resource Dictionary - org.onap.ccsdk.apps - controllerblueprints-core + org.onap.ccsdk.apps.controllerblueprints + core diff --git a/ms/controllerblueprints/modules/service/pom.xml b/ms/controllerblueprints/modules/service/pom.xml index b4b798e6..6a40a4a7 100644 --- a/ms/controllerblueprints/modules/service/pom.xml +++ b/ms/controllerblueprints/modules/service/pom.xml @@ -21,11 +21,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.onap.ccsdk.apps - controllerblueprints-modules + org.onap.ccsdk.apps.controllerblueprints + modules 0.3.0-SNAPSHOT - controllerblueprints-service + service Controller Blueprints Service @@ -33,8 +33,8 @@ - org.onap.ccsdk.apps - controllerblueprints-resource-dict + org.onap.ccsdk.apps.controllerblueprints + resource-dict org.apache.velocity diff --git a/ms/controllerblueprints/parent/pom.xml b/ms/controllerblueprints/parent/pom.xml index f8977d1f..e48c1134 100644 --- a/ms/controllerblueprints/parent/pom.xml +++ b/ms/controllerblueprints/parent/pom.xml @@ -20,18 +20,18 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - org.onap.ccsdk.apps - controllerblueprints-parent + + org.onap.ccsdk.apps + controllerblueprints + 0.3.0-SNAPSHOT + + org.onap.ccsdk.apps.controllerblueprints + parent Controller Blueprints Parent - 0.3.0-SNAPSHOT pom - UTF-8 - UTF-8 - 1.8 - 1.8 - 1.8 2.0.4.RELEASE + 5.0.8.RELEASE 1.2.60 1.0.0 2.9.2 @@ -122,19 +122,26 @@ ${kotlin.version} test + + - org.onap.ccsdk.apps - controllerblueprints-core + org.onap.ccsdk.apps.controllerblueprints + core ${project.version} - org.onap.ccsdk.apps - controllerblueprints-service + org.onap.ccsdk.apps.controllerblueprints + service ${project.version} - org.onap.ccsdk.apps - controllerblueprints-resource-dict + org.onap.ccsdk.apps.controllerblueprints + application + ${project.version} + + + org.onap.ccsdk.apps.controllerblueprints + resource-dict ${project.version} @@ -148,17 +155,14 @@ org.apache.commons commons-lang3 - 3.2.1 - + commons-collections commons-collections - 3.2.2 commons-io commons-io - 2.6 com.jayway.jsonpath diff --git a/ms/controllerblueprints/pom.xml b/ms/controllerblueprints/pom.xml index d76f4c8c..798bdae4 100644 --- a/ms/controllerblueprints/pom.xml +++ b/ms/controllerblueprints/pom.xml @@ -30,12 +30,20 @@ ControllerBlueprints UTF-8 + UTF-8 + yyyyMMdd'T'HHmmss'Z' + ${maven.build.timestamp} + 1.8 + 1.8 + 1.8 + ${project.version} pom parent modules application + distribution