From d0a915d10c00314ecc1f07c2ecf9dd239ee47aad Mon Sep 17 00:00:00 2001 From: dglFromAtt Date: Mon, 18 Feb 2019 18:20:55 +0000 Subject: Restructure project for 2 images Change-Id: I05b858012a05b1c177a8a2e25ec610b0174b6a54 Signed-off-by: dglFromAtt Issue-ID: DMAAP-1046 Signed-off-by: dglFromAtt Patchset2 - corrected some typos Signed-off-by: dglFromAtt Signed-off-by: dglFromAtt Change-Id: I05b858012a05b1c177a8a2e25ec610b0174b6a54 Signed-off-by: dglFromAtt Patchset3 - use latest dbcapi.jar Change-Id: I05b858012a05b1c177a8a2e25ec610b0174b6a54 Signed-off-by: dglFromAtt --- dmaap-bc/misc/LocalKey | 27 ++ dmaap-bc/misc/PolicyEngineApi.properties.tmpl | 36 ++ dmaap-bc/misc/dbc-api.jks | Bin 0 -> 3740 bytes dmaap-bc/misc/dmaapbc | 252 +++++++++++++ dmaap-bc/misc/dmaapbc.properties.tmpl | 218 +++++++++++ dmaap-bc/misc/doaction | 63 ++++ dmaap-bc/misc/havecert.tmpl | 32 ++ dmaap-bc/misc/log4j.properties.tmpl | 32 ++ dmaap-bc/misc/logback.xml | 358 ++++++++++++++++++ dmaap-bc/misc/opensource.env | 120 ++++++ dmaap-bc/misc/org.onap.dmaap-bc.trust.jks | Bin 0 -> 1413 bytes dmaap-bc/misc/policyLogger.properties | 45 +++ dmaap-bc/pom.xml | 408 +++++++++++++++++++++ dmaap-bc/src/main/resources/docker-compose.yml | 25 ++ .../main/resources/docker-databus-controller.conf | 12 + dmaap-bc/src/main/webapp/HelloJetty.html | 30 ++ dmaap-bc/src/main/webapp/WEB-INF/log4j.xml | 45 +++ dmaap-bc/src/main/webapp/WEB-INF/web.xml | 38 ++ dmaap-bc/src/main/webapp/index.jsp | 28 ++ dmaap-bc/version.properties | 35 ++ 20 files changed, 1804 insertions(+) create mode 100644 dmaap-bc/misc/LocalKey create mode 100644 dmaap-bc/misc/PolicyEngineApi.properties.tmpl create mode 100644 dmaap-bc/misc/dbc-api.jks create mode 100644 dmaap-bc/misc/dmaapbc create mode 100644 dmaap-bc/misc/dmaapbc.properties.tmpl create mode 100644 dmaap-bc/misc/doaction create mode 100644 dmaap-bc/misc/havecert.tmpl create mode 100644 dmaap-bc/misc/log4j.properties.tmpl create mode 100644 dmaap-bc/misc/logback.xml create mode 100644 dmaap-bc/misc/opensource.env create mode 100644 dmaap-bc/misc/org.onap.dmaap-bc.trust.jks create mode 100644 dmaap-bc/misc/policyLogger.properties create mode 100644 dmaap-bc/pom.xml create mode 100644 dmaap-bc/src/main/resources/docker-compose.yml create mode 100644 dmaap-bc/src/main/resources/docker-databus-controller.conf create mode 100644 dmaap-bc/src/main/webapp/HelloJetty.html create mode 100644 dmaap-bc/src/main/webapp/WEB-INF/log4j.xml create mode 100644 dmaap-bc/src/main/webapp/WEB-INF/web.xml create mode 100644 dmaap-bc/src/main/webapp/index.jsp create mode 100644 dmaap-bc/version.properties (limited to 'dmaap-bc') diff --git a/dmaap-bc/misc/LocalKey b/dmaap-bc/misc/LocalKey new file mode 100644 index 0000000..38ede55 --- /dev/null +++ b/dmaap-bc/misc/LocalKey @@ -0,0 +1,27 @@ +7ntUvubggJ1h6AXwQENQScrnlqmLMno_583XufLsguAT11bnBk0DVLE2GtCZ0pNQzlR8I3PJ1_nZ +UEVQs1G_qZzV-MHQZvz54solEp8dNUVji4JUzP7WiPuJdvCX8vvGLc8-jOVzEJ2DAGmV3gNp60_F +jrKx7F7Dz-h94jWZ45rNn7-Re_BneSto6HiSj0DN_SKSNhE5z9Qf3tFyFLGIYmlQoxzbTYC38uN0 +FjAYuKz6W_pTLzyOjHNAagYwEjTUUU-ei-QA5pL20-oG3jSYGnj_V94kd8X5ncB1-nybUsy5OOvZ +huCxf9hSetn2fpIszkRcuFxaxiwubpmEWp2L_zovhcRI1OMFPIIK0IckRHD1a5CpFVzR7P5L7LQk +FErATsQkHsPS9BJN5wlj1EoIhA2uaELjXjmOqPQg76eyQqXXcMHRJTA6czbXPYfTQMQx1r2USC9o +HdoLT4-so7zARZidmYmvPPT9qvNisK6BF4M32K-_s6YyJspSEB1MscNPujsD7zczIsBct7BTRoeZ +CbtkskT_yFhQzdzdSMzFN_NJ7Yb9p3d1G4gSkj2rbA-BDybHHPij8k6-k-ipvi_T_LW9B_J8Jf5f +aRclZqVgwwSG-mUKUyk9bI3cVc-1P2ICUmr59EjuauDAtlMQL-hnTJUs1rUerh4Q7d4XgrNLjLHY +Oue8MEj24VSMl-f28DDIV1N6ODiBKDHUmdENsmlbqeNpzQxu7FoSbLu6gN6zDP8Jw4ck1NHEIv8H +ecUf-hBGdB0HINClaV9X2ycafWcmRY-NCzX65cp7a1Rpl1kCEW5u79LLN28aJeTzmriewhy87hJf +rAah8z3dHteIN1fuvRoGsFwZ4jKo6olFxcBOlpHQIW5JJ1roO1vQ2Dx_l-Foo7wV_AD127zCu7ci +lYodnAOocKbhAub4sf90P3D2NMKb20e5CQrBSchtIEaD3G7J-vL5xYydLuLu5WipOdZuq3VhSSZm +TZIR3Ya2QiZVokxKgH-N0gPDz-TimNV_MkUSCNsv2NxjBM7oPF3dzEHbHS5eue41_R4vqxFdTdva +o0ASTFkARmmnMFBx1a73jmcoBBx-i4el8Rce7RvFWn1PALOnRsIQPy_Pgx0OE9_6eHfOSvyxbyMM +0FwE5f77gO967tgc4LwqB1pzz2Uk7hfizLKNc6nrrgDxSb_9rDWwiE4rWw7WYcRKvRQ270lCH4FQ +ezrPacnnK3cKM5L6brOyhbhiL4MnNX714L0K8C6TQnIVisQCLHwif40G_DSEWxICQ5V2DMzFn3JT +PefaubHlqxRZVikNH71b_2ZRLEi84m5iUuy8Ir1s3W6xuyIdt-yKLnjgnLjOPPxTDC5G_xaXAAuM +SkSOjvPzOArMUUnwYk68jAxXS2tBT8JN6OnglN8dHC-P24tYzfs4B4tMYJ1ibz6BUsQ6nYxsRUak +4ZjRmo3UG0OFJbOY-f0ja6Q4pISe1IXmlM4Ly9QdCfeHyDV-7Fiud9V_zo92lpQwttwSpBvFoDYQ +oePdA0zmCx6GIX_8L9e8a03hUx4aUtZ8C3Kf0PzOWTcjrV7nGb99ctjmRtfGw5GPWudH6CI3WFK2 +5wFDhrQSbRhzV4iQalYVPJQ7LO4WEi4EsBTRSiz074UpvkMV3UfMGDlpXAAq5rEjj-d5WbHhzbs8 +MGKzZLTfUz9lP4CME9AOwto_ey1ly3H-yaEgCpnshm-CZoSqVDmuFYM0QR_NcrqmSQ9ZKJEF_wTa +TEAXNJ99CYE0ZLvU9FjgCqH1-q1zL7z3NLX1uFYazEZWGMZFPVD5XOcCtUlVyUz9KuAO9ARVyu5C +7kzo_AFePtnsA_JUvvkauo6RwO6qhLJjZuSjvmiSdOAohiXUalDFjWVW8CMfgLF4PbRDklsAcsiT +P0xUdyWJ5slu87f9PunXDwQZWNv6haTIhVX7bilCDpRPbTbmimmE_C2J7tgV2EvazD7o8V_jeu0g +cnIpzRnaPG9l-uy2UKoxOXI4CSymcJoyV2xxC0SF7Q5quAhf3UGAdQUeFtHwxZtYiAMXLs06 \ No newline at end of file diff --git a/dmaap-bc/misc/PolicyEngineApi.properties.tmpl b/dmaap-bc/misc/PolicyEngineApi.properties.tmpl new file mode 100644 index 0000000..248b288 --- /dev/null +++ b/dmaap-bc/misc/PolicyEngineApi.properties.tmpl @@ -0,0 +1,36 @@ +# +# ============LICENSE_START========================================== +# org.onap.dmaap +# =================================================================== +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END============================================ +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +# + +cat < $APP_ROOT/ok_to_exit + else + echo "Not creating $APP_ROOT/ok_to_exit" + fi + + if [ ! -f $APP_ROOT/misc/cert-client-init.sh ] + then + echo "Did not find $APP_ROOT/misc/cert-client-init.sh to append to truststore" + exit 1 + fi + $APP_ROOT/misc/cert-client-init.sh + . misc/havecert.tmpl > etc/havecert + chmod +x etc/havecert + + # These files might be better provided in kubernetes configmaps + # so if they are there, use them + if [ -f $CONFIGMAP_PROPS ] + then + PROPS=$CONFIGMAP_PROPS + else + PROPS=etc/dmaapbc.properties + . misc/dmaapbc.properties.tmpl > $PROPS + fi + if [ ! -f config/PolicyEngineApi.properties ] + then + . misc/PolicyEngineApi.properties.tmpl > config/PolicyEngineApi.properties + fi + set +x +} + +start() { + echo "ENTER start" + set -x + ID=`id -n -u` + GRP=`id -n -g` + if [ "$ID" != "$USER" ] + then + echo $COMPONENT must be started as user $USER not $ID + exit 1 + fi + if [ "$GRP" != "$USER" ] + then + echo $COMPONENT must be started as group $USER not $GRP + exit 1 + fi + cd $APP_ROOT + pwd + + if etc/havecert + then + echo >/dev/null + else + echo No certificate file available. Cannot start + exit 0 + fi + PIDS=`pids` + if [ "$PIDS" != "" ] + then + echo $COMPONENT already running + exit 0 + fi + rm -f $APP_ROOT/etc/SHUTDOWN + + # JVM flags +#old line from Dockerfile...keep for reference only + FLAGS="-cp etc:lib/* -Dlog4j.configuration=etc/log4j.properties -DConfigFile=$PROPS -Dlogback.configurationFile=etc/logback.xml -Dhttps.protocols=TLSv1.2 -Dhttps.cipherSuites=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + #nohup java $FLAGS $MAIN /dev/null 2>&1 & + nohup java $FLAGS $MAIN /dev/null + cp dmaapbc.properties dmaapbc.properties.save 2>/dev/null + cp havecert havecert.save 2>/dev/null + ;; +'stop') + /opt/app/platform/init.d/dmaapbc stop + ;; +'start') + /opt/app/platform/init.d/dmaapbc start || exit 1 + ;; +'config') + /bin/bash log4j.properties.tmpl >log4j.properties + /bin/bash dmaapbc.properties.tmpl >dmaapbc.properties + /bin/bash havecert.tmpl >havecert + /bin/bash PolicyEngineApi.properties.tmpl > ../config/PolicyEngineApi.properties + chmod +x havecert + rm -f /opt/app/platform/rc.d/K90dmaapbc /opt/app/platform/rc.d/S10dmaapbc + ln -s ../init.d/dmaapbc /opt/app/platform/rc.d/K90dmaapbc + ln -s ../init.d/dmaapbc /opt/app/platform/rc.d/S10dmaapbc + ;; +'restore') + cp log4j.properties.save log4j.properties 2>/dev/null + cp dmaapbc.properties.save dmaapbc.properties 2>/dev/null + cp havecert.save havecert 2>/dev/null + ;; +'clean') + rm -f log4j.properties dmaapbc.properties havecert log4j.properties.save dmaapbc.properties.save havecert.save SHUTDOWN redirections.dat VERSION.dmaapbc + rm -f /opt/app/platform/rc.d/K90dmaapbc /opt/app/platform/rc.d/S10dmaapbc + ;; +*) + exit 1 + ;; +esac +done +exit 0 diff --git a/dmaap-bc/misc/havecert.tmpl b/dmaap-bc/misc/havecert.tmpl new file mode 100644 index 0000000..a3a5ff8 --- /dev/null +++ b/dmaap-bc/misc/havecert.tmpl @@ -0,0 +1,32 @@ +#!/bin/bash +# +# ============LICENSE_START========================================== +# org.onap.dmaap +# =================================================================== +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END============================================ +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +# +cat <>${DMAAPBC_LOGS:-logs}/dmaapbc.log +exit 1 +!EOF diff --git a/dmaap-bc/misc/log4j.properties.tmpl b/dmaap-bc/misc/log4j.properties.tmpl new file mode 100644 index 0000000..2a30bf5 --- /dev/null +++ b/dmaap-bc/misc/log4j.properties.tmpl @@ -0,0 +1,32 @@ +# +# ============LICENSE_START========================================== +# org.onap.dmaap +# =================================================================== +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END============================================ +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +# +cat < + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + + + + + + ${logDirectory}/${securityLogName}.log + + ${logDirectory}/${securityLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + 0 + + + + + + ${logDirectory}/${performanceLogName}.log + + ${logDirectory}/${performanceLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + ${logDirectory}/${serverLogName}.log + + ${logDirectory}/${serverLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + ${logDirectory}/${policyLogName}.log + + ${logDirectory}/${policyLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${auditLoggerPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${metricsLoggerPattern} + + + + + + 256 + + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${errorLoggerPattern} + + + + + 256 + + + + + ${debugLogDirectory}/${debugLogName}.log + + ${debugLogDirectory}/${debugLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${debugLoggerPattern} + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dmaap-bc/misc/opensource.env b/dmaap-bc/misc/opensource.env new file mode 100644 index 0000000..80d82f8 --- /dev/null +++ b/dmaap-bc/misc/opensource.env @@ -0,0 +1,120 @@ +# +# +# ============LICENSE_START========================================== +# org.onap.dmaap +# =================================================================== +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END============================================ +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +# +# The Controller domain +# +CONT_DOMAIN=simpledemo.onap.org +# +# The https port +# set to 0 if certificate is not ready +DMAAPBC_INT_HTTPS_PORT=0 + +# +# The path to the keystore for https +# +DMAAPBC_KSTOREFILE=/opt/app/dcae-certificates + +# The password for the https keystore +# +DMAAPBC_KSTOREPASS=foofoofoo +# +# The password for the private key in the https keystore +# +DMAAPBC_PVTKEYPASS=barbarbar +# +# Flag for whether we are using PG connection for persistence +# +DMAAPBC_PG_ENABLED=false +# +# The host for postgres access +# +DMAAPBC_PGHOST=zldciad1vipstg00.${CONT_DOMAIN} +# +# For postgres access +# +DMAAPBC_PGCRED=test234-ftl +# +# Name of this environment +# +DMAAPBC_INSTANCE_NAME=onap1 +# +# Name of DR prov server +# +DMAAPBC_DRPROV_FQDN=dcae-drps.${CONT_DOMAIN} + +################# +# AAF Properties: +# +# regarding password encryption: +# In the dependencies that Maven retrieves (e.g., under dcae_dmaapbc/target/deps/ is a jar file cadi-core-version.jar. Generate the key file with: +# +# java \u2013jar wherever/cadi-core-*.jar keygen keyfilename +# chmod 400 keyfilename +# +# To encrypt a key: +# +# java \u2013jar wherever/cadi-core-*.jar digest password-to-encrypt keyfilename +# +# This will generate a string. Put \u201Cenc:\u201D on the front of the string, and put the result in this properties file. +# +# Location of the Codec Keyfile which is used to decrypt passwords in this properties file before they are passed to AAF +# +# REF: https://wiki.domain.notset.com/display/cadi/CADI+Deployment +# +# URL of AAF environment to use. +# +DMAAPBC_AAF_URL=https://aafapi.${CONT_DOMAIN}:8095/proxy/ +# +# TopicMgr mechid@namespace +# +DMAAPBC_TOPICMGR_USER=m99751@dmaapBC.onap.org +# +# TopicMgr password +# +DMAAPBC_TOPICMGR_PWD=enc:zyRL9zbI0py3rJAjMS0dFOnYfEw_mJhO +# +# Bus Controller Namespace Admin mechid@namespace +# +DMAAPBC_ADMIN_USER=m99501@dcae.onap.org +# +# Bus Controller Namespace Admin password +# +DMAAPBC_ADMIN_PWD=enc:YEaHwOJrwhDY8a6usetlhbB9mEjUq9m + +# +# endof AAF Properties +################# + +################# +# PolicyEngine Properties + +# +# Flag to turn on/off Authentication +DMAAPBC_PE_ENABLED=false +# +# Argument to decisionAttributes.put("AAF_ENVIRONMENT", X); +# where X is: TEST= UAT, PROD = PROD, DEVL = TEST +# +DMAAPBC_PE_AAF_ENV=DEMO + +# endof PolicyEngineProperties +################# diff --git a/dmaap-bc/misc/org.onap.dmaap-bc.trust.jks b/dmaap-bc/misc/org.onap.dmaap-bc.trust.jks new file mode 100644 index 0000000..00cc35e Binary files /dev/null and b/dmaap-bc/misc/org.onap.dmaap-bc.trust.jks differ diff --git a/dmaap-bc/misc/policyLogger.properties b/dmaap-bc/misc/policyLogger.properties new file mode 100644 index 0000000..6b9ad99 --- /dev/null +++ b/dmaap-bc/misc/policyLogger.properties @@ -0,0 +1,45 @@ +# +# ============LICENSE_START========================================== +# org.onap.dmaap +# =================================================================== +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END============================================ +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +# +################################### Set concurrentHashMap and timer info ####################### +#Timer initial delay and the delay between in milliseconds before task is to be execute. +timer.delay.time=1000 +#Timer scheduleAtFixedRate period - time in milliseconds between successive task executions. +check.interval= 30000 +#Longest time an event info can be stored in the concurrentHashMap for logging - in seconds. +event.expired.time=86400 +#Size of the concurrentHashMap which stores the event starting time, etc - when its size reaches this limit, the Timer gets executed +#to remove all expired records from this concurrentHashMap. +concurrentHashMap.limit=5000 +#Size of the concurrentHashMap - when its size drops to this point, stop the Timer +stop.check.point=2500 +################################### Set logging format ############################################# +# set EELF for EELF logging format, set LOG4J for using log4j, set SYSTEMOUT for using system.out.println +logger.type=EELF +#################################### Set level for EELF or SYSTEMOUT logging ################################## +# Set level for debug file. Set DEBUG to enable .info, .warn and .debug; set INFO for enable .info and .warn; set OFF to disable all +debugLogger.level=OFF +# Set level for metrics file. Set OFF to disable; set ON to enable +metricsLogger.level=ON +# Set level for error file. Set OFF to disable; set ON to enable +error.level=ON +# Set level for audit file. Set OFF to disable; set ON to enable +audit.level=ON diff --git a/dmaap-bc/pom.xml b/dmaap-bc/pom.xml new file mode 100644 index 0000000..f7f2bc1 --- /dev/null +++ b/dmaap-bc/pom.xml @@ -0,0 +1,408 @@ + + + + 4.0.0 + org.onap.dmaap.buscontroller + dmaap-bc + ${artifact.version} + dmaap-bc + + org.onap.oparent + oparent + 1.2.2 + + + + dmaap-bc + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-no-snapshots + + enforce + + + + + No Snapshots Allowed! + + org.onap.dmaap.dbcapi:dbcapi + org.onap.aaf.authz:aaf-cadi-client + org.onap.aaf.authz:aaf-misc-env + org.onap.aaf.authz:aaf-cadi-aaf + org.onap.aaf.authz:aaf-auth-client + org.onap.aaf.authz:aaf-cadi-core + org.onap.aaf.authz:aaf-misc-rosetta + + + + true + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.3 + + + + package + + shade + + + false + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + org.onap.dmaap.dbcapi.server.Main + + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + true + + ecomp-staging + ${nexusproxy} + 176c31dfe190a + + + + + + org.apache.maven.plugins + maven-site-plugin + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [2.10,) + install + + copy-dependencies + + + + + + + + + + + + + + + + docker + + false + false + true + + + + + com.spotify + docker-maven-plugin + ${docker.maven.plugin.version} + + java:openjdk-8-jre + ${onap.nexus.dockerregistry.daily}/${docker.image} + ["./bin/dmaapbc", "deploy"] + ${onap.nexus.dockerregistry.daily} + false + + ${artifact.version} + latest + + + /opt/app/dmaapbc/log + + true + root + + + /opt/app/dmaapbc/lib + ${multiproject.basedir}/dmaap-bc/target + dmaap-bc.jar + + + /opt/app/dmaapbc/etc + ${multiproject.basedir}/dmaap-bc/misc + LocalKey + logback.xml + org.onap.dmaap-bc.trust.jks + dbc-api.jks + + + /opt/app/dmaapbc/etc + ${multiproject.basedir}/dmaap-bc + version.properties + + + /opt/app/dmaapbc/misc + ${multiproject.basedir}/dmaap-bc/misc + opensource.env + *.tmpl + + + /opt/app/dmaapbc/misc + ${multiproject.basedir}/misc + cert-client-init.sh + + + /opt/app/dmaapbc/bin + ${multiproject.basedir}/dmaap-bc/misc + dmaapbc + doaction + + + + mv /opt/app/dmaapbc/etc/dbc-api.jks /opt/app/dmaapbc/etc/keystore + chmod 600 /opt/app/dmaapbc/etc/keystore + chmod 600 /opt/app/dmaapbc/etc/org.onap.dmaap-bc.trust.jks + chmod +x /opt/app/dmaapbc/misc/cert-client-init.sh + chmod +x /opt/app/dmaapbc/bin/* + mkdir /opt/app/dmaapbc/logs + mkdir /opt/app/dmaapbc/www + mkdir /opt/app/dmaapbc/www/doc + + /opt/app/dmaapbc + + + + default + + build + push + + + + + + + + + + + + org.glassfish.jersey + jersey-bom + ${jersey.version} + pom + import + + + + + + io.swagger + swagger-core + ${swagger.version} + + + io.swagger + swagger-jersey2-jaxrs + ${swagger.version} + + + io.swagger + swagger-annotations + ${swagger.version} + + + org.glassfish.jersey.containers + jersey-container-servlet-core + + + + + org.glassfish.jersey.media + jersey-media-moxy + + + log4j + log4j + 1.2.17 + + + org.eclipse.jetty + jetty-server + ${jettyVersion} + + + org.onap.aaf.authz + aaf-cadi-aaf + 2.1.7 + full + + + + org.eclipse.jetty + jetty-servlet + ${jettyVersion} + compile + + + org.eclipse.jetty + jetty-servlets + ${jettyVersion} + compile + + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + commons-codec + commons-codec + 1.11 + + + + org.postgresql + postgresql + 42.2.5 + + + + org.onap.dmaap.dbcapi + dbcapi + 1.0.23-SNAPSHOT + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + + + ecomp-site + dav:${nexusproxy}${sitePath} + + + + ${basedir}/.. + 1.0.0 + 2.16 + UTF-8 + 9.4.12.RC2 + 1.0.0 + 1.5.19 + 1.1.1 + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + + + onap/dmaap/dmaap-bc + + https://nexus.onap.org + 10.12.5.45:5000 + + + /content/sites/site/org/onap/dmaap/dmaap-bc/${artifact.version} + + Packaging Platform (DMaaP) Bus Controller API as a Docker container. + diff --git a/dmaap-bc/src/main/resources/docker-compose.yml b/dmaap-bc/src/main/resources/docker-compose.yml new file mode 100644 index 0000000..41bc473 --- /dev/null +++ b/dmaap-bc/src/main/resources/docker-compose.yml @@ -0,0 +1,25 @@ +version: '2' +services: + dbc-pg-primary: + image: crunchydata/crunchy-postgres:centos7-10.4-2.0.0 + ports: + - "5432:5432" + environment: + - PG_MODE=master + - PG_PRIMARY_USER="dmaap_admin" + - PG_PRIMARY_PASSWORD=onapdemodb + - PG_USER="dmaap_admin" + - PG_PASSWORD=onapdemodb + - PG_ROOT_PASSWORD=onapdemodb + - PG_DATABASE="dmaap" + - PG_PRIMARY_PORT=5432 + + dmaap-bc: + image: nexus3.onap.org:10001/onap/dmaap/buscontroller:latest + ports: + - "30241:8080" + - "30242:8443" + volumes: + - /var/tmp/docker-databus-controller.conf:/opt/app/config/conf + depends_on: + - dbc-pg-primary diff --git a/dmaap-bc/src/main/resources/docker-databus-controller.conf b/dmaap-bc/src/main/resources/docker-databus-controller.conf new file mode 100644 index 0000000..7214adf --- /dev/null +++ b/dmaap-bc/src/main/resources/docker-databus-controller.conf @@ -0,0 +1,12 @@ +DMAAPBC_WAIT_TO_EXIT=Y +DMAAPBC_PG_ENABLED=true +DMAAPBC_PGHOST=dbc-pg-primary +DMAAPBC_PGDBNAME=dmaap +DMAAPBC_PGCRED=onapdemodb +DMAAPBC_PGUSER=dmaap_admin +DMAAPBC_MR_CNAME=message-router +DMAAPBC_AAF_URL=https://aaf-authz/ +DMAAPBC_TOPICMGR_USER=m23456@dmaapbc.onap.org +DMAAPBC_TOPICMGR_PWD=onapdemo +DMAAPBC_ADMIN_USER=m12345@dmaapbc.onap.org +DMAAPBC_ADMIN_PWD=onapdemo \ No newline at end of file diff --git a/dmaap-bc/src/main/webapp/HelloJetty.html b/dmaap-bc/src/main/webapp/HelloJetty.html new file mode 100644 index 0000000..4d61636 --- /dev/null +++ b/dmaap-bc/src/main/webapp/HelloJetty.html @@ -0,0 +1,30 @@ + + + + + + +Index + + +Hello Jetty! + + diff --git a/dmaap-bc/src/main/webapp/WEB-INF/log4j.xml b/dmaap-bc/src/main/webapp/WEB-INF/log4j.xml new file mode 100644 index 0000000..4e4d5e9 --- /dev/null +++ b/dmaap-bc/src/main/webapp/WEB-INF/log4j.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dmaap-bc/src/main/webapp/WEB-INF/web.xml b/dmaap-bc/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..055fbf0 --- /dev/null +++ b/dmaap-bc/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,38 @@ + + + + + + + Jersey Web Application + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + org.openecomp.dmaapBC + + 1 + + + Jersey Web Application + /webapi/* + + diff --git a/dmaap-bc/src/main/webapp/index.jsp b/dmaap-bc/src/main/webapp/index.jsp new file mode 100644 index 0000000..3c20e06 --- /dev/null +++ b/dmaap-bc/src/main/webapp/index.jsp @@ -0,0 +1,28 @@ +<%-- + ============LICENSE_START======================================================= + org.onap.dcae + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --%> + + + +

Jersey RESTful Web Application!

+

Jersey resource +

Visit Project Jersey website + for more information on Jersey! + + diff --git a/dmaap-bc/version.properties b/dmaap-bc/version.properties new file mode 100644 index 0000000..67e2f3a --- /dev/null +++ b/dmaap-bc/version.properties @@ -0,0 +1,35 @@ +### +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END============================================ +# =================================================================== +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +### + +# Versioning variables +# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) +# because they are used in Jenkins, whose plug-in doesn't support + +major=1 +minor=1 +patch=1 +base_version=${major}.${minor}.${patch} + +# Release must be completed with git revision # in Jenkins +release_version=${base_version} +snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg