diff options
author | Mandeep Khinda <mandeep.khinda@amdocs.com> | 2017-09-14 11:37:33 +0000 |
---|---|---|
committer | Mandeep Khinda <mandeep.khinda@amdocs.com> | 2017-09-14 11:37:33 +0000 |
commit | 126102491526b5ba06092855b84ffe359b117df0 (patch) | |
tree | c4a7a95cca36b43d5281c96586d7dcbe85dcfd52 | |
parent | 4b7026e95b93f2077f18d0681d55bbac022b5396 (diff) |
move policy config to onap 1.1
was the cause of the robot failure for policy in oom
Issue-ID: OOM-297
Change-Id: Iabb24cc7a007ef852cde3ebe2cbb9226bb4153b3
Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
Signed-off-by: Ahmed Alabulrahman <ahmed.alabdulrahman@amdocs.com>
16 files changed, 289 insertions, 144 deletions
diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/base.conf b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/base.conf index 164c03821c..f531c0fa85 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/base.conf +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/base.conf @@ -1,43 +1,39 @@ +### +# ============LICENSE_START======================================================= +# ONAP POLICY +# ================================================================================ +# 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========================================================= +### + + +# SYSTEM software configuration + POLICY_HOME=/opt/app/policy JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 KEYSTORE_PASSWD=PolicyR0ck$ +# Telemetry credentials + ENGINE_MANAGEMENT_PORT=9696 ENGINE_MANAGEMENT_HOST=localhost ENGINE_MANAGEMENT_USER=@1b3rt -ENGINE_MANAGEMENT_PASSWORD=31nst@1n - -JDBC_DRIVER=org.mariadb.jdbc.Driver -JDBC_URL=jdbc:mysql://mariadb.onap-policy:3306/ecomp_sdk -JDBC_DROOLS_URL=jdbc:mysql://mariadb.onap-policy:3306/drools -JDBC_USER=policy_user -JDBC_PASSWORD=policy_user - -# Integrity Monitor properties -site_name=site_1 -fp_monitor_interval=30 -failed_counter_threshold=3 -test_trans_interval=20 -write_fpc_interval=5 -max_fpc_update_interval=60 -test_via_jmx=false -jmx_fqdn= -node_type=pdp_drools -# Dependency groups are groups of resources upon which a node operational state is dependent upon. -# Each group is a comma-separated list of resource names and groups are separated by a semicolon. -dependency_groups= -resource_name=pdpd_1 - -# The (optional) period of time in seconds between executions of the integrity audit. -# Value < 0 : Audit does not run (default value if property is not present = -1) -# Value = 0 : Audit runs continuously -# Value > 0 : The period of time in seconds between execution of the audit on a particular node -integrity_audit_period_seconds=-1 - -host_port=0.0.0.0:9981 - -# To use a Nexus repository for rules artifacts, -# following properties must be uncommented and set: +ENGINE_MANAGEMENT_PASSWORD=31nst31n + +# nexus repository + snapshotRepositoryID=policy-nexus-snapshots snapshotRepositoryUrl=http://nexus:8081/nexus/content/repositories/snapshots/ releaseRepositoryID=policy-nexus-releases @@ -45,6 +41,14 @@ releaseRepositoryUrl=http://nexus:8081/nexus/content/repositories/releases/ repositoryUsername=admin repositoryPassword=admin123 +# Relational (SQL) DB access + +SQL_HOST=mariadb.onap-policy +SQL_USER=policy_user +SQL_PASSWORD=policy_user + +# PDP-D DMaaP configuration channel + PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION PDPD_CONFIGURATION_SERVERS=dmaap.onap-message-router PDPD_CONFIGURATION_API_KEY= @@ -52,3 +56,24 @@ PDPD_CONFIGURATION_API_SECRET= PDPD_CONFIGURATION_CONSUMER_GROUP= PDPD_CONFIGURATION_CONSUMER_INSTANCE= PDPD_CONFIGURATION_PARTITION_KEY= + +# PAP + +PAP_HOST=pap.onap-policy +PAP_USERNAME=testpap +PAP_PASSWORD=alpha123 + +# PDP-X + +PDP_HOST=pdp.onap-policy +PDP_USERNAME=testpdp +PDP_PASSWORD=alpha123 + +# DCAE DMaaP + +DCAE_TOPIC=unauthenticated.TCA_EVENT_OUTPUT +DCAE_SERVERS=dcae-controller.onap-dcae + +# Open DMaaP + +DMAAP_SERVERS=dmaap.onap-message-router diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/drools-tweaks.sh b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/drools-tweaks.sh index edf5e9d563..8bff59c2e7 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/drools-tweaks.sh +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/drools-tweaks.sh @@ -1,30 +1,23 @@ #! /bin/bash -# changes for health check -options enable policy-healthcheck -sedArgs=("-i") -while read var value ; do - if [[ "${var}" == "" ]] ; then - continue - fi - sedArgs+=("-e" "s@\${{${var}}}@${value}@g") -done <<-EOF - PAP_HOST pap - PAP_USERNAME testpap - PAP_PASSWORD alpha123 - PDP_HOST pdp - PDP_USERNAME testpdp - PDP_PASSWORD alpha123 -EOF +### +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# 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========================================================= +### -# convert file -sed "${sedArgs[@]}" ${POLICY_HOME}/config/*health* - -cat >>${POLICY_HOME}/config/*health* <<-'EOF' - http.server.services.HEALTHCHECK.userName=healthcheck - http.server.services.HEALTHCHECK.password=zb!XztG34 -EOF - -sed -i -e 's/DCAE-CL-EVENT/unauthenticated.TCA_EVENT_OUTPUT/' \ - -e '/TCA_EVENT_OUTPUT\.servers/s/servers=.*$/servers=10.0.4.102/' \ - $POLICY_HOME/config/v*-controller.properties +${POLICY_HOME}/bin/features enable healthcheck diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/feature-healthcheck.conf b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/feature-healthcheck.conf new file mode 100644 index 0000000000..31baed21e3 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/feature-healthcheck.conf @@ -0,0 +1,2 @@ +HEALTHCHECK_USER=healthcheck +HEALTHCHECK_PASSWORD=zb!XztG34 diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/base.conf b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/base.conf index bd4b433179..9c87d9ca72 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/base.conf +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/base.conf @@ -3,8 +3,8 @@ POLICY_HOME=/opt/app/policy KEYSTORE_PASSWD=PolicyR0ck$ JDBC_DRIVER=org.mariadb.jdbc.Driver -JDBC_URL=jdbc:mariadb://mariadb.onap-policy:3306/ecomp_sdk -JDBC_LOG_URL=jdbc:mariadb://mariadb.onap-policy:3306/log +JDBC_URL=jdbc:mariadb://mariadb.onap-policy:3306/onap_sdk?failOverReadOnly=false&autoReconnect=true +JDBC_LOG_URL=jdbc:mariadb://mariadb.onap-policy:3306/log?failOverReadOnly=false&autoReconnect=true JDBC_USER=policy_user JDBC_PASSWORD=policy_user @@ -18,3 +18,7 @@ test_via_jmx=false jmx_fqdn= ENVIRONMENT=TEST + +#Micro Service Model Properties +policy_msOnapName= +policy_msPolicyName=
\ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw-tweaks.sh b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw-tweaks.sh index 350b9c7039..d318d4d189 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw-tweaks.sh +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw-tweaks.sh @@ -13,14 +13,26 @@ fi source "${POLICY_HOME}/etc/build.info" +if [ -z "${version}" ]; then + echo "error: no version information present" + exit 1 +fi + for CONFIG in ${PROPS_RUNTIME} ${PROPS_INSTALL}; do if [ ! -f "${CONFIG}" ]; then echo "warning: configuration does not exist: ${CONFIG}" else - if [ -n "${version}" ]; then - /bin/sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}" - else - echo "error: no version information present" - fi + sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}" + fi +done + +DEPS_JSON_RUNTIME="${POLICY_HOME}/servers/brmsgw/dependency.json" +DEPS_JSON_INSTALL="${POLICY_HOME}/install/servers/brmsgw/dependency.json" + +for DEP in ${DEPS_JSON_RUNTIME} ${DEPS_JSON_INSTALL}; do + if [ ! -f "${DEP}" ]; then + echo "warning: configuration does not exist: ${DEP}" + else + sed -i -e "s/\"version\":.*/\"version\": \"${version}\"/g" "${DEP}" fi done diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw.conf b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw.conf index 8c70090550..3cafc32a4c 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw.conf +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw.conf @@ -26,11 +26,11 @@ UEB_TOPIC=PDPD-CONFIGURATION UEB_API_KEY= UEB_API_SECRET= -groupID=org.openecomp.policy-engine +groupID=org.onap.policy-engine artifactID=drlPDPGroup -VFW_GROUP_ID=org.openecomp.policy-engine.drools.vFW +VFW_GROUP_ID=org.onap.policy-engine.drools.vFW VFW_ARTIFACT_ID=policy-vFW-rules -VDNS_GROUP_ID=org.openecomp.policy-engine.drools.vDNS +VDNS_GROUP_ID=org.onap.policy-engine.drools.vDNS VDNS_ARTIFACT_ID=policy-vDNS-rules @@ -38,6 +38,19 @@ VDNS_ARTIFACT_ID=policy-vDNS-rules resource_name=brmsgw_1 node_type=brms_gateway -CLIENT_ID=PyPDPServer -CLIENT_KEY=test +#Environment should be Set either DEV, TEST or PROD ENVIRONMENT=TEST + +#Notification Properties... type can be either websocket, ueb, or dmaap +BRMS_NOTIFICATION_TYPE=websocket +BRMS_UEB_URL=dmaap.onap-message-router +BRMS_UEB_TOPIC=PDPD-CONFIGURATION +BRMS_UEB_DELAY= +BRMS_CLIENT_ID=python +BRMS_CLIENT_KEY=dGVzdA== +BRMS_UEB_API_KEY= +BRMS_UEB_API_SECRET= + +#Dependency.json file version +BRMS_DEPENDENCY_VERSION=1.1.0-SNAPSHOT + diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/console.conf b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/console.conf index 35867eb220..d5be80a675 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/console.conf +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/console.conf @@ -77,7 +77,7 @@ REFRESH_RATE=40000 # -REST_PAP_URL=http://pap:9091/pap/ +REST_PAP_URL=http://pap.onap-policy:9091/pap/ # # Config/Action Properties location. @@ -102,7 +102,7 @@ resource_name=console_1 # Value > 0 : The period of time in seconds between execution of the audit on a particular node integrity_audit_period_seconds=-1 -#Automatic Policy Distribution +#Automatic Policy Distribution automatic_push=false #Diff of policies for Firewall feature @@ -112,24 +112,21 @@ FW_PROXY= FW_PORT= #SMTP Server Details for Java Mail -ecomp_smtp_host= -ecomp_smtp_port=25 -ecomp_smtp_userName= -ecomp_smtp_password= -ecomp_application_name= - -#-----------------------ECOMP-PORTAL-Properties---------------------- - -ECOMP_REDIRECT_URL=http://portalapps.onap-portal:8989/ECOMPPORTAL/login.htm -ECOMP_REST_URL= -ECOMP_UEB_URL_LIST= -ECOMP_PORTAL_INBOX_NAME= -ECOMP_UEB_APP_KEY= -ECOMP_UEB_APP_SECRET= -ECOMP_UEB_APP_MAILBOX_NAME= -APP_DISPLAY_NAME=OpenECOMP Policy -ECOMP_SHARED_CONTEXT_REST_URL=http://portalapps.onap-portal:8989/ECOMPPORTAL/context - -#Add the Rest PAP url and pap auth password on adding delimiter @Auth@ - -REST_PAPURL_WITH_AUTH_PASSWORD=http://pap.onap-policy:9091/pap/@Auth@dGVzdHBhcDphbHBoYTEyMw== +onap_smtp_host= +onap_smtp_port=25 +onap_smtp_userName= +onap_smtp_password= +onap_smtp_emailExtension= +onap_application_name= + +#-----------------------ONAP-PORTAL-Properties---------------------- + +ONAP_REDIRECT_URL=http://portalapps.onap-portal:8989/ECOMPPORTAL/login.htm +ONAP_REST_URL= +ONAP_UEB_URL_LIST= +ONAP_PORTAL_INBOX_NAME= +ONAP_UEB_APP_KEY= +ONAP_UEB_APP_SECRET= +ONAP_UEB_APP_MAILBOX_NAME= +APP_DISPLAY_NAME=ONAP Policy +ONAP_SHARED_CONTEXT_REST_URL=http://portalapps.onap-portal:8989/ECOMPPORTAL/context diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/elk.conf b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/elk.conf new file mode 100644 index 0000000000..938954ce63 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/elk.conf @@ -0,0 +1,3 @@ +# elasticsearch + +ELK_JMX_PORT=9995
\ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pap-tweaks.sh b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pap-tweaks.sh index be8a905af0..36ac3689b1 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pap-tweaks.sh +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pap-tweaks.sh @@ -1,15 +1 @@ #! /bin/bash - -# config directory may contain an ip_addr.txt file that specifies -# the VM IP address. Substitute this value in the URL in the -# config.json file, overriding the hostname that came from the -# REST_PAPURL_WITH_AUTH_PASSWORD property in console.conf. This is -# to avoid hardcoding an IP address in console.conf that can change -# from one VM instance to the next. - -if [[ -f config/ip_addr.txt ]]; then - vm_ip=$(<config/ip_addr.txt) - echo "Substituting VM IP address $vm_ip in console config.json file" - sed -i -e "s@http:.*:@http://$vm_ip:@" \ - $POLICY_HOME/servers/console/webapps/ecomp/app/policyApp/Properties/config.json -fi diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pdp.conf b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pdp.conf index 9d56d49f96..d1dee77a11 100755 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pdp.conf +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pdp.conf @@ -32,5 +32,22 @@ PDP_PAP_PDP_HTTP_PASSWORD=alpha123 node_type=pdp_xacml resource_name=pdp_1 -dependency_groups=pdplp_1;pypdp_1;brmsgw_1 +dependency_groups=pdplp_1;brmsgw_1 test_via_jmx=true + +# +# Notification Properties +# Notification type: websocket, ueb or dmaap... if left blank websocket is the default +PDP_NOTIFICATION_TYPE=websocket +PDP_UEB_CLUSTER= +PDP_UEB_TOPIC= +PDP_UEB_DELAY= +PDP_UEB_API_KEY= +PDP_UEB_API_SECRET= +PDP_DMAAP_AAF_LOGIN= +PDP_DMAAP_AAF_PASSWORD= + +#AAF Policy Name space +#Required only, when we use AAF +POLICY_AAF_NAMESPACE= +POLICY_AAF_RESOURCE= diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh new file mode 100644 index 0000000000..7a71639595 --- /dev/null +++ b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh @@ -0,0 +1,121 @@ +#! /bin/bash + + +echo "Pushing default policies" + +# Sometimes brmsgw gets an error when trying to retrieve the policies on initial push, +# so for the BRMS policies we will do a push, then delete from the pdp group, then push again. +# Second push should be successful. + +echo "pushPolicy : PUT : com.vFirewall" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.vFirewall", + "policyType": "MicroService" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + +sleep 2 + +echo "pushPolicy : PUT : com.vLoadBalancer" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.vLoadBalancer", + "policyType": "MicroService" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + +sleep 2 + +echo "pushPolicy : PUT : com.BRMSParamvLBDemoPolicy" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.BRMSParamvLBDemoPolicy", + "policyType": "BRMS_Param" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + +sleep 2 + +echo "pushPolicy : PUT : com.BRMSParamvFWDemoPolicy" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.BRMSParamvFWDemoPolicy", + "policyType": "BRMS_Param" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + +sleep 2 + +echo "deletePolicy : DELETE : com.vFirewall" +curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ +"pdpGroup": "default", +"policyComponent": "PDP", +"policyName": "com.vFirewall", +"policyType": "MicroService" +}' 'http://pdp.onap-policy:8081/pdp/api/deletePolicy' + + +sleep 2 + +echo "deletePolicy : DELETE : com.vLoadBalancer" +curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ +"pdpGroup": "default", +"policyComponent": "PDP", +"policyName": "com.vLoadBalancer", +"policyType": "MicroService" +}' 'http://pdp.onap-policy:8081/pdp/api/deletePolicy' + +sleep 2 + +echo "deletePolicy : DELETE : com.BRMSParamvFWDemoPolicy" +curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ +"pdpGroup": "default", +"policyComponent": "PDP", +"policyName": "com.BRMSParamvFWDemoPolicy", +"policyType": "BRMS_Param" +}' 'http://pdp.onap-policy:8081/pdp/api/deletePolicy' + + +sleep 2 + +echo "deletePolicy : DELETE : com.BRMSParamvLBDemoPolicy" +curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ +"pdpGroup": "default", +"policyComponent": "PDP", +"policyName": "com.BRMSParamvLBDemoPolicy", +"policyType": "BRMS_Param" +}' 'http://pdp.onap-policy:8081/pdp/api/deletePolicy' + +sleep 2 + +echo "pushPolicy : PUT : com.vFirewall" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.vFirewall", + "policyType": "MicroService" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + +sleep 2 + +echo "pushPolicy : PUT : com.vLoadBalancer" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.vLoadBalancer", + "policyType": "MicroService" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + +sleep 2 + +echo "pushPolicy : PUT : com.BRMSParamvLBDemoPolicy" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.BRMSParamvLBDemoPolicy", + "policyType": "BRMS_Param" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + +sleep 2 + +echo "pushPolicy : PUT : com.BRMSParamvFWDemoPolicy" +curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ + "pdpGroup": "default", + "policyName": "com.BRMSParamvFWDemoPolicy", + "policyType": "BRMS_Param" +}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' + diff --git a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pypdp-tweaks.sh b/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pypdp-tweaks.sh deleted file mode 100755 index 5d899bd18c..0000000000 --- a/kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pypdp-tweaks.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash - - diff --git a/kubernetes/policy/templates/all-services.yaml b/kubernetes/policy/templates/all-services.yaml index cd01b54ee8..0d9a68ac25 100644 --- a/kubernetes/policy/templates/all-services.yaml +++ b/kubernetes/policy/templates/all-services.yaml @@ -102,22 +102,6 @@ spec: apiVersion: v1 kind: Service metadata: - name: pypdp - namespace: "{{ .Values.nsPrefix }}-policy" - labels: - app: pypdp -spec: - ports: - - name: tcp-31032-8480-bm91k - port: 8480 - nodePort: {{ .Values.nodePortPrefix }}21 - selector: - app: pypdp - type: NodePort ---- -apiVersion: v1 -kind: Service -metadata: name: brmsgw namespace: "{{ .Values.nsPrefix }}-policy" labels: diff --git a/kubernetes/policy/templates/dep-maria.yaml b/kubernetes/policy/templates/dep-maria.yaml index 30d0db3af5..368d6381c8 100644 --- a/kubernetes/policy/templates/dep-maria.yaml +++ b/kubernetes/policy/templates/dep-maria.yaml @@ -4,7 +4,6 @@ metadata: name: mariadb namespace: "{{ .Values.nsPrefix }}-policy" spec: - replicas: 1 selector: matchLabels: app: mariadb @@ -15,11 +14,7 @@ spec: spec: hostname: mariadb containers: - - command: - - /bin/bash - - -c - - exec bash /tmp/do-start.sh - image: "{{ .Values.image.policyDb }}:{{ .Values.image.policyDbVersion }}" + - image: "{{ .Values.image.policyDb }}:{{ .Values.image.policyDbVersion }}" imagePullPolicy: {{ .Values.pullPolicy }} name: mariadb ports: diff --git a/kubernetes/policy/templates/dep-nexus.yaml b/kubernetes/policy/templates/dep-nexus.yaml index de067b162f..f777d0cabd 100644 --- a/kubernetes/policy/templates/dep-nexus.yaml +++ b/kubernetes/policy/templates/dep-nexus.yaml @@ -40,11 +40,7 @@ spec: ]' spec: containers: - - command: - - /bin/bash - - -c - - bash -c "/opt/nexus/nexus-2.14.2-01/bin/nexus start && sleep 1000d" - image: "{{ .Values.image.policyNexus }}:{{ .Values.image.policyNexusVersion }}" + - image: "{{ .Values.image.policyNexus }}:{{ .Values.image.policyNexusVersion }}" imagePullPolicy: {{ .Values.pullPolicy }} name: nexus imagePullSecrets: diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml index 1b2ed0f880..62e91f88f5 100644 --- a/kubernetes/policy/values.yaml +++ b/kubernetes/policy/values.yaml @@ -4,12 +4,12 @@ nodePortPrefix: 302 image: readiness: oomk8s/readiness-check readinessVersion: 1.0.0 - policyPe: nexus3.onap.org:10001/openecomp/policy/policy-pe + policyPe: nexus3.onap.org:10001/onap/policy/policy-pe policyPeVersion: 1.1-STAGING-latest - policyDrools: nexus3.onap.org:10001/openecomp/policy/policy-drools + policyDrools: nexus3.onap.org:10001/onap/policy/policy-drools policyDroolsVersion: 1.1-STAGING-latest - policyDb: nexus3.onap.org:10001/openecomp/policy/policy-db + policyDb: nexus3.onap.org:10001/onap/policy/policy-db policyDbVersion: 1.1-STAGING-latest - policyNexus: nexus3.onap.org:10001/openecomp/policy/policy-nexus + policyNexus: nexus3.onap.org:10001/onap/policy/policy-nexus policyNexusVersion: 1.1-STAGING-latest ubuntu: ubuntu:16.04 |