Merge "Fix for UEB connectivity to SDC"
authorMike Elliott <mike.elliott@amdocs.com>
Mon, 30 Apr 2018 14:27:40 +0000 (14:27 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 30 Apr 2018 14:27:40 +0000 (14:27 +0000)
34 files changed:
kubernetes/dcaegen2/Makefile [new file with mode: 0644]
kubernetes/dcaegen2/charts/dcae-bootstrap/requirements.yaml
kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_engine-inputs.yaml
kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-holmes_rules-input.yaml
kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml
kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml [new file with mode: 0644]
kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-tca-inputs.yaml
kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-ves-inputs.yaml
kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml
kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/service.yaml
kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh
kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml
kubernetes/onap/resources/environments/dev.yaml
kubernetes/onap/values.yaml
kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/music.properties
kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/portal.properties
kubernetes/portal/charts/portal-app/resources/config/deliveries/properties/ONAPPORTAL/system.properties
kubernetes/portal/charts/portal-app/values.yaml
kubernetes/portal/charts/portal-mariadb/resources/config/mariadb/oom_updates.sql
kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/music.properties
kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/portal.properties
kubernetes/portal/charts/portal-sdk/resources/config/deliveries/properties/ONAPPORTALSDK/system.properties
kubernetes/portal/charts/portal-sdk/templates/deployment.yaml
kubernetes/portal/charts/portal-sdk/values.yaml
kubernetes/portal/charts/portal-widget/resources/config/deliveries/properties/ONAPWIDGETMS/application.properties
kubernetes/portal/charts/portal-widget/templates/deployment.yaml
kubernetes/portal/charts/portal-widget/values.yaml
kubernetes/portal/charts/portal-zookeeper/values.yaml
kubernetes/portal/launch-onap-portal.sh [new file with mode: 0755]
kubernetes/portal/resources/config/log/filebeat/filebeat.yml
kubernetes/portal/values.yaml
kubernetes/sdnc/charts/dmaap-listener/resources/config/dhcpalert.properties
kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml
kubernetes/sdnc/charts/dmaap-listener/values.yaml

diff --git a/kubernetes/dcaegen2/Makefile b/kubernetes/dcaegen2/Makefile
new file mode 100644 (file)
index 0000000..c16f23b
--- /dev/null
@@ -0,0 +1,2 @@
+make-dmaap:
+       cd charts && helm dep up dcae-bootstrap
index d031e2e..9f53d90 100644 (file)
@@ -20,3 +20,6 @@ dependencies:
   - name: common
     version: ~2.0.0
     repository: '@local'
+  - name: postgres
+    version: ~2.0.0
+    repository: '@local'
index 6205f1e..dac0ffa 100644 (file)
@@ -23,6 +23,6 @@
   "msb_hostname": "{{ .Values.config.address.msb_discovery }}.{{include "common.namespace" . }}",
   "dcae_CL_publish_url": "http://{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}:3904/events/unauthenticated.DCAE_CL_OUTPUT",
   "ves_fault_publish_url": "http://{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT",
-  "pgaas_cluster_name" : "pgvm",
+  "pgaas_cluster_name" : "{{ .Values.postgres.service.name2 }}.{{include "common.namespace" . }}",
   "database_name":"holmes"
 }
index 75dbbf9..1a808d4 100644 (file)
@@ -18,6 +18,6 @@
 
 {
   "msb_hostname": "{{ .Values.config.address.msb_discovery }}.{{include "common.namespace" . }}",
-  "pgaas_cluster_name" : "pgvm",
+  "pgaas_cluster_name" : "{{ .Values.postgres.service.name2 }}.{{include "common.namespace" . }}",
   "database_name":"holmes"
 }
index 4e42b11..8b5da2e 100644 (file)
 # limitations under the License.
 # ============LICENSE_END=========================================================
 
-sdc_config.address: '{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
+sdc_address: '{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
 sdc_uri: 'https://{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
 sdc_user: "dcae"
 sdc_password: !!str Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
 sdc_environment_name: "AUTO"
-sdc_msg_bus_config.address: '{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}'
+sdc_msg_bus_address: '{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}'
 postgres_user_inventory: "postgres"
 postgres_password_inventory: "onap123"
 service_change_handler_image: {{ .Values.componentImages.service_change_handler }}
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-pgaas-initdb-inputs.yaml
new file mode 100644 (file)
index 0000000..b201247
--- /dev/null
@@ -0,0 +1,19 @@
+#=================================================================================
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2018 Amdocs, Bell Canada
+# ================================================================================
+# 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=========================================================
+
+k8s_pgaas_instance_fqdn: {{ .Values.postgres.service.name2 }}.{{include "common.namespace" . }}
+k8s_initial_password: {{ .Values.postgres.config.pgRootPassword }}
index 7dc66f4..f3a6cca 100644 (file)
@@ -22,3 +22,7 @@ tca_image: {{ .Values.componentImages.tca }}
 dmaap_host: {{ .Values.config.address.message_router }}.{{include "common.namespace" . }}
 consul_host: {{ .Values.config.address.consul.host }}.{{include "common.namespace" . }}
 cbs_host: config-binding-service
+enableRedisCaching:  {{ .Values.config.redisCaching }}
+{{ if .Values.config.redisHosts }}
+redisHosts: {{ .Values.config.redisHosts }}
+{{ end }}
index 5385d07..2e41d1c 100644 (file)
@@ -19,7 +19,7 @@
 {{ if .Values.componentImages.ves }}
 tag_version: {{ .Values.componentImages.ves }}
 {{ end }}
-external_port : "30280"
+external_port : "30235"
 ves_other_publish_url: "http://{{ .Values.config.address.message_router }}:3904/events/unauthenticated.SEC_OTHER_OUTPUT/"
 ves_heartbeat_publish_url: "http://{{ .Values.config.address.message_router }}:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/"
 ves_fault_publish_url: "http://{{ .Values.config.address.message_router }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT/"
index fc89c6c..6df05b1 100644 (file)
@@ -40,17 +40,34 @@ config:
     msb_discovery: msb-discovery
     policy_pdp: pdp
     sdc: sdc-be
+  # redisCaching is a string not a boolean!
+  redisCaching: "false"
+
+# postgres values--overriding defaults in the postgres subchart
+postgres:
+  nameOverride: dcae-db
+  service:
+    name: dcae-postgres
+    name2: dcae-pg-primary
+    name3: dcae-pg-replica
+  container:
+    name:
+      primary: dcae-pg-primary
+      replica: dcae-pg-replica
+  config:
+    pgPrimaryPassword: onapdemodb
+    pgRootPassword: onapdemodb
 
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.1.5
+image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.1.8
 
 # DCAE component images to be deployed via Cloudify Manager
 # Use to override default setting in blueprints
 componentImages:
   #TODO for further investigation: input template expansion issues if we comment this out
-  config_binding_service: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.1.4
+  config_binding_service: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.1.5
 #  deployment_handler: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.deployment-handler:2.1.1
 #  holmes_engine: nexus3.onap.org:10001//onap/holmes/engine-management:v1.0.0
 #  holmes_rules: nexus3.onap.org:10001/onap/holmes/rule-management:v1.0.0
index c6b24ee..4b76523 100644 (file)
@@ -63,4 +63,13 @@ spec:
   type: ExternalName
   externalName: {{ .Values.service.name }}.{{ include "common.namespace" . }}.svc.cluster.local
 {{ end }}
-
+# Provide alternate name for consul in common namespace to support CM plugin discovery
+apiVersion: v1
+kind: Service
+metadata:
+  name: consul
+  namespace: {{ include "common.namespace" . }}
+spec:
+  type: ExternalName
+  externalName: {{ .Values.config.address.consul.host }}.{{ include "common.namespace" . }}.svc.cluster.local
+---
index 3431e7e..f454752 100755 (executable)
@@ -15,8 +15,9 @@
 # limitations under the License.
 # ============LICENSE_END=========================================================
 
-
-if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
+(if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
+  echo "delay by 10 seconds for redis server starting"
+  sleep 10
 
   NODES=""
   echo "====> wait for all {{.Values.replicaCount}} redis pods up"
@@ -24,11 +25,16 @@ if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
   do
     echo "======> $(echo $NODES |wc -w) / {{.Values.replicaCount}} pods up"
     sleep 5
-    RESP=$(wget -vO- --ca-certificate /var/run/secrets/kubernetes.io/serviceaccount/ca.crt  --header "Authorization: Bearer $(</var/run/secrets/kubernetes.io/serviceaccount/token)" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCP_PORT/api/v1/namespaces/{{.Release.Namespace}}/pods?labelSelector=app={{.Chart.Name}})
+    RESP=$(wget -vO- --ca-certificate /var/run/secrets/kubernetes.io/serviceaccount/ca.crt  --header "Authorization
+: Bearer $(</var/run/secrets/kubernetes.io/serviceaccount/token)" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT
+_443_TCP_PORT/api/v1/namespaces/{{.Release.Namespace}}/pods?labelSelector=app={{.Chart.Name}})
 
     IPS=$(echo $RESP | jq -r '.items[].status.podIP')
+    IPS2=$(echo $IPS | sed -e 's/[a-zA-Z]*//g')
+    echo "======> IPs: ["$IPS2"]"
     NODES=""
-    for I in $IPS; do NODES="$NODES $I:{{.Values.service.externalPort}}"; done
+    for I in $IPS2; do NODES="$NODES $I:{{.Values.service.externalPort}}"; done
+    echo "======> nodes: ["$NODES"]"
   done
   echo "====> all {{.Values.replicaCount}} redis cluster pods are up. wait 10 seconds before the next step"; echo
   sleep 10
@@ -36,6 +42,9 @@ if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
   echo "====> Configure the cluster"
 
   # $NODES w/o quotes
+  echo "======> nodes: [$(echo $NODES |paste -s)]"
   redis-trib create --replicas 1 $(echo $NODES |paste -s)
+fi ) &
+
+redis-server /conf/redis.conf
 
-fi
index 4724714..63d921a 100644 (file)
@@ -41,8 +41,7 @@ spec:
           - /bin/sh
           - -c
           - |
-            /opt/scripts/redis-cluster-config.sh &
-            /usr/local/bin/redis-server-config.sh
+            /opt/scripts/redis-cluster-config.sh
           ports:
           - containerPort: {{ .Values.service.internalPort }}
             name: {{ .Values.service.name }}
index a8dd524..651cb91 100644 (file)
@@ -93,10 +93,6 @@ sdnc:
   config:
     enableClustering: false
 
-  dmaap-listener:
-    config:
-      dmaapPort: 3904
-
   mysql:
     disableNfsProvisioner: false
     replicaCount: 1
index a242771..470fdfb 100644 (file)
@@ -94,10 +94,6 @@ sdnc:
   config:
     enableClustering: false
 
-  dmaap-listener:
-    config:
-      dmaapPort: 3904
-
   mysql:
     disableNfsProvisioner: true
     replicaCount: 1
index e375ac7..10bfa47 100644 (file)
@@ -13,7 +13,7 @@ music.serialize.compress = true
 #By default it's eventual
 music.atomic.get = false
 music.atomic.put = true
-cassandra.host={{.Values.cassandra.chart.name}}.{{.Release.Namespace}}
-zookeeper.host={{.Values.zookeeper.chart.name}}.{{.Release.Namespace}}
+cassandra.host={{.Values.cassandra.service.name}}
+zookeeper.host={{.Values.zookeeper.service.name}}
 cassandra.user={{.Values.cassandra.config.cassandraUsername}}
 cassandra.password={{.Values.cassandra.config.cassandraPassword}}
index 0e3381c..6157f29 100755 (executable)
@@ -16,7 +16,7 @@ ueb_app_key = 7GkVcrO6sIDb3ngW
 ueb_app_secret = uCYgKjWKK5IxPGNNZzYSSWo9
 ueb_app_mailbox_name = ECOMP-PORTAL-INBOX
 
-ueb_url_list = {{.Values.messageRouter.chart.name}}.{{.Release.Namespace}}
+ueb_url_list = message-router
 ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX
 
 # Consumer group name for UEB topic.
index 29149bc..47c73cd 100755 (executable)
@@ -1,6 +1,6 @@
 #mysql
 db.driver = org.mariadb.jdbc.Driver
-db.connectionURL = jdbc:mariadb:failover://{{.Values.mariadb.chart.name}}.{{.Release.Namespace}}:3306/portal
+db.connectionURL = jdbc:mariadb:failover://portal-db:3306/portal
 db.userName =root
 db.password =Aa123456
 db.hib.dialect = org.hibernate.dialect.MySQLDialect
@@ -82,7 +82,7 @@ notification_update_duration = 900
 
 #Microservices Related Properties for Portal
 microservices.widget.protocol = http
-microservices.widget.hostname = {{.Values.widget.chart.name}}.{{.Release.Namespace}}
+microservices.widget.hostname = portal-widget
 microservices.widget.username = widget_user
 microservices.widget.password = M+KcrCMVrR1rAxtiFE49n1uXC3FCkNBqFgeYsubEC/U=
 #This property won't be needed after consul is functional on VMs -
index 1663674..b0ea028 100644 (file)
@@ -68,22 +68,22 @@ service:
   nodePort3: 14
 
 mariadb:
-  chart:
+  service:
     name: portal-db
 widget:
-  chart:
+  service:
     name: portal-widget
 cassandra:
-  chart:
+  service:
     name: portal-cassandra
   config:
     cassandraUsername: root
     cassandraPassword: Aa123456
 zookeeper:
-  chart:
+  service:
     name: portal-zookeeper
 messageRouter:
-  chart:
+  service:
     name: message-router
 
 ingress:
index 781b046..0163d31 100644 (file)
@@ -4,5 +4,21 @@ Any updates required by OOM to the portaldb are made here.
 1. split up SDC-FE and SDC-BE.  Originally both FE and BE point to the same IP
 while the OOM K8s version has these service split up.
 */
-UPDATE fn_app SET app_rest_endpoint = 'http://sdc.api.be.simpledemo.onap.org:8080/api/v2' where app_name = 'SDC';
-UPDATE fn_app SET app_url = 'http://cli.api.simpledemo.onap.org:8080', app_type = 1 where app_name='CLI';
+-- app_url is the FE, app_rest_endpoint is the BE
+--portal-sdk => doesnt have a node port so this won't work
+update fn_app set app_url = 'http://portal-sdk.simpledemo.onap.org:8990/ONAPPORTALSDK/welcome.htm', app_rest_endpoint = 'http://portal-sdk:8990/ONAPPORTALSDK/api/v2' where app_name = 'xDemo App';
+--dmaap-bc => the dmaap-bc chart actually opens 8080 and 8443, not 8989.  the chart isnt merged yet either. confirm the service name after bc chart merge
+update fn_app set app_url = 'http://dmaap-bc.simpledemo.onap.org:8989/ECOMPDBCAPP/dbc#/dmaap', app_rest_endpoint = 'http://dmaap-bc:8989/ECOMPDBCAPP/api/v2' where app_name = 'DMaaP Bus Ctrl';
+--sdc-be => 8443:30204, 8080:30205
+--sdc-fe => 8181:30206, 9443:30207
+update fn_app set app_url = 'http://sdc.api.fe.simpledemo.onap.org:8181/sdc1/portal', app_rest_endpoint = 'http://sdc-be:8080/api/v2' where app_name = 'SDC';
+--pap => 8443:30219
+update fn_app set app_url = 'http://policy.api.simpledemo.onap.org:8443/onap/policy', app_rest_endpoint = 'http://pap:8443/onap/api/v2' where app_name = 'Policy';
+--vid => 8080:30200
+update fn_app set app_url = 'http://vid.api.simpledemo.onap.org:8080/vid/welcome.htm', app_rest_endpoint = 'http://vid:8080/vid/api/v2' where app_name = 'Virtual Infrastructure Deployment';
+--sparky => sparky doesn't open a node port..
+update fn_app set app_url = 'http://aai.api.sparky.simpledemo.onap.org:8080/services/aai/webapp/index.html#/viewInspect', app_rest_endpoint = 'http://aai-sparky-be.{{.Release.Namespace}}:9517/api/v2' where app_name = 'A&AI UI';
+--cli => 8080:30260
+update fn_app set app_url = 'http://cli.api.simpledemo.onap.org:8080/', app_type = 1 where app_name = 'CLI';
+--msb-discovery => 10081:30281  this is clearly incorrect
+update fn_app set app_url = 'http://msb.api.discovery.simpledemo.onap.org:8080/iui/microservices/default.html' where app_name = 'MSB';
\ No newline at end of file
index 72e9700..b177976 100644 (file)
@@ -14,7 +14,7 @@ music.serialize.compress = true
 music.atomic.get = false
 music.atomic.put = true
 
-cassandra.host={{.Values.cassandra.chart.name}}.{{.Release.Namespace}}
-zookeeper.host={{.Values.zookeeper.chart.name}}.{{.Release.Namespace}}
+cassandra.host={{.Values.cassandra.service.name}}
+zookeeper.host={{.Values.zookeeper.service.name}}
 cassandra.user={{.Values.cassandra.config.cassandraUsername}}
 cassandra.password={{.Values.cassandra.config.cassandraPassword}}
index 4b6f251..2b199cc 100755 (executable)
@@ -30,7 +30,7 @@ ecomp_rest_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi
 ueb_listeners_enable = false
 
 # UEB Configuration
-ueb_url_list = {{.Values.messageRouter.chart.name}}.{{.Release.Namespace}}
+ueb_url_list = message-router
 # ECOMP Portal listens on this UEB topic
 ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX
 # Replace these 3 default values with the ones for your specific App,
index cec75f0..531c96c 100755 (executable)
@@ -24,7 +24,7 @@ decryption_key                                  = AGLDdG4D04BKm2IxIWEr8o==
 ##########################################################################
 
 db.driver = org.mariadb.jdbc.Driver
-db.connectionURL = jdbc:mariadb://{{.Values.mariadb.chart.name}}.{{.Release.Namespace}}:3306/ecomp_sdk
+db.connectionURL = jdbc:mariadb://portal-db:3306/ecomp_sdk
 db.userName = root
 db.password = Aa123456
 db.min_pool_size = 5
@@ -62,7 +62,7 @@ guard_notebook_url=
 
 #authenticate user server
 #TODO: what is this URL supposed to be pointing to?  Nothing in portal opens 8383
-authenticate_user_server=http://portal.onap.org:8383/openid-connect-server-webapp/allUsers
+authenticate_user_server=http://portal.api.simpledemo.onap.org:8383/openid-connect-server-webapp/allUsers
 
 #cookie domain
 cookie_domain = onap.org
index 1c94c78..3b1d1fd 100644 (file)
@@ -38,7 +38,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.mariadb.chart.name }}
+        - "portal-db"
         env:
         - name: NAMESPACE
           valueFrom:
index 1bb7e5a..4974ea2 100644 (file)
@@ -61,22 +61,22 @@ service:
   internalPort: 8080
 
 mariadb:
-  chart:
+  service:
     name: portal-db
 widget:
-  chart:
+  service:
     name: portal-widget
 cassandra:
-  chart:
+  service:
     name: portal-cassandra
   config:
     cassandraUsername: root
     cassandraPassword: Aa123456
 zookeeper:
-  chart:
+  service:
     name: portal-zookeeper
 messageRouter:
-  chart:
+  service:
     name: message-router
 
 ingress:
index e228e2b..547a882 100644 (file)
@@ -6,7 +6,7 @@ spring.http.multipart.max-request-size=128MB
 microservice.widget.location=/tmp
 
 ## App DB Properties
-spring.datasource.url=jdbc:mysql://{{.Values.mariadb.chart.name}}.{{include "common.namespace" .}}:3306/portal
+spring.datasource.url=jdbc:mysql://portal-db:3306/portal
 spring.datasource.username=root
 spring.datasource.password=Aa123456
 spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
index bff7924..6ce7d4e 100644 (file)
@@ -38,7 +38,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - {{ .Values.mariadb.chart.name }}
+        - "portal-db"
         env:
         - name: NAMESPACE
           valueFrom:
index dc73446..4f1a2a5 100644 (file)
@@ -55,7 +55,7 @@ readiness:
   periodSeconds: 10
 
 mariadb:
-  chart:
+  service:
     name: portal-db
 
 service:
index 52408a8..951acf5 100644 (file)
@@ -48,7 +48,7 @@ readiness:
 
 service:
   type: ClusterIP
-  name: portal-zk
+  name: portal-zookeeper
   portName: portal-zk
   externalPort: 2181
   internalPort: 2181
diff --git a/kubernetes/portal/launch-onap-portal.sh b/kubernetes/portal/launch-onap-portal.sh
new file mode 100755 (executable)
index 0000000..d9f64c1
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+usage () { echo "Usage : $0 <namespace> <helm release name>"; }
+
+READY_JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'
+
+NAMESPACE=$1
+RELEASE_NAME=$2
+
+if [ ! "$NAMESPACE" ] || [ ! "$RELEASE_NAME" ]
+then
+  usage
+  exit 1
+fi
+
+PORTAL_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=portal-app,release=$RELEASE_NAME \
+-o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True"|awk -F: '{print $1}' `
+SDC_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=sdc-fe,release=$RELEASE_NAME \
+-o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'`
+VID_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=vid,release=$RELEASE_NAME \
+-o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'`
+POLICY_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=pap,release=$RELEASE_NAME \
+-o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'`
+PORTALSDK_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=portal-sdk,release=$RELEASE_NAME \
+-o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'`
+
+#TODO: Add more as testing progresses
+[[ -z "$PORTAL_POD_NAME" ]] && { echo "WARNING: portal-app is not running in your Kubernetes cluster"; }
+[[ -z "$SDC_POD_NAME" ]] && { echo "WARNING: sdc-fe is not running in your Kubernetes cluster"; }
+[[ -z "$VID_POD_NAME" ]] && { echo "WARNING: vid is not running in your Kubernetes cluster"; }
+[[ -z "$POLICY_POD_NAME" ]] && { echo "WARNING: pap is not running in your Kubernetes cluster"; }
+[[ -z "$PORTALSDK_POD_NAME" ]] && { echo "WARNING: portal-sdk is not running in your Kubernetes cluster"; }
+
+if [ ! -z "$PORTAL_POD_NAME" ]
+then
+  kubectl -n $NAMESPACE port-forward "$PORTAL_POD_NAME" 8989:8080 &
+  PORTAL_PID=$!
+fi
+
+if [ ! -z "$VID_POD_NAME" ]
+then
+  kubectl -n $NAMESPACE port-forward "$VID_POD_NAME" 8080:8080 &
+  VID_PID=$!
+fi
+
+if [ ! -z "$SDC_POD_NAME" ]
+then
+  kubectl -n $NAMESPACE port-forward "$SDC_POD_NAME" 8181:8181 &
+  SDC_PID=$!
+fi
+
+if [ ! -z "$POLICY_POD_NAME" ]
+then
+  kubectl -n $NAMESPACE port-forward "$POLICY_POD_NAME" 8443:8443 &
+  POLICY_PID=$!
+fi
+
+if [ ! -z "$PORTALSDK_POD_NAME" ]
+then
+  kubectl -n $NAMESPACE port-forward "$PORTALSDK_POD_NAME" 8990:8080 &
+  PORTALSDK_PID=$!
+fi
+
+trap "{ kill -9 $PORTAL_PID $VID_PID $SDC_PID $POLICY_PID $PORTALSDK_PID; exit 0; }" INT
+echo -e $'Press Ctrl+C to exit...\n'
+
+while :
+do
+  sleep 60
+done
\ No newline at end of file
index b0d4690..0bc14ea 100644 (file)
@@ -21,7 +21,7 @@ output.logstash:
   #List of logstash server ip addresses with port number.
   #But, in our case, this will be the loadbalancer IP address.
   #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
-  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
+  hosts: ["{{.Values.config.logstashServiceName}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index e22b3f9..949efad 100644 (file)
@@ -23,21 +23,21 @@ portal-mariadb:
   nameOverride: portal-db
 
 mariadb:
-  chart:
+  service:
     name: portal-db
 widget:
-  chart:
+  service:
     name: portal-widget
 cassandra:
-  chart:
+  service:
     name: portal-cassandra
   config:
     cassandraUsername: root
     cassandraPassword: Aa123456
 zookeeper:
-  chart:
+  service:
     name: portal-zookeeper
 
 messageRouter:
-  chart:
+  service:
     name: message-router
\ No newline at end of file
index dc0deb2..de1346a 100644 (file)
@@ -14,7 +14,7 @@ password =admin
 contenttype =application/json
 authKey=fxoW4jZrO7mdLWWa:f4KxkoBtToyoEG7suMoV8KhnkwM=
 authDate=2016-02-18T13:57:37-0800
-host=dmaap.{{.Release.Namespace}}:3904
+host=message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}}
 topic=VCPE-DHCP-EVENT
 group=jmsgrp
 id=sdnc1
index e712a41..733b21e 100644 (file)
@@ -38,6 +38,8 @@ spec:
         - {{ .Values.config.mysqlChartName }}
         - --container-name
         - {{ .Values.config.sdncChartName }}
+        - --container-name
+        - {{ .Values.config.msgRouterContainerName }}
         env:
         - name: NAMESPACE
           valueFrom:
index 1a5ca2c..189aa72 100644 (file)
@@ -39,6 +39,7 @@ config:
   dmaapPort: 3904
   mysqlChartName: sdnc-dbhost
   sdncChartName: sdnc
+  msgRouterContainerName: dmaap
   configDir: /opt/onap/sdnc/data/properties
 
 # default number of instances
@@ -64,7 +65,7 @@ ingress:
   enabled: false
 
 service:
-  name: dmaap-listener
+  name: sdnc-dmaap-listener
 
 resources: {}
 #resources: