kubernetes/config/onap-parameters.yaml
.idea/*
+kubernetes/dist/*
+requirements.lock
+**/charts/*.tgz
ONAP Operations Manager Project
###############################
+.. contents::
+ :depth: 3
+..
+
Introduction
============
Quick Start Guide
=================
-Once a kubernetes environment is available (check out `ONAP on Kubernetes <https://wiki.onap.org/display/DW/ONAP+on+Kubernetes>`__ if you're
-getting started) and the deployment artifacts have been customized for your location, ONAP is ready to be installed.
+Pre-requisites
+--------------
+
+* Your Kubernetes environment must be available. For more information see, `ONAP on Kubernetes <https://wiki.onap.org/display/DW/ONAP+on+Kubernetes>`__.
+* Deployment artifacts are customized for your location.
+
+**Step 1**
+
+Review and optionally change configuration parameters:
+
+Setup the `/oom/kubernetes/config/onap-parameters.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters.yaml;h=7ddaf4d4c3dccf2fad515265f0da9c31ec0e64b1;hb=refs/heads/master>`__ file with key-value pairs specific to your OpenStack environment.
+
+OR
+
+There is a `sample <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters-sample.yaml;h=3a74beddbbf7f9f9ec8e5a6abaecb7cb238bd519;hb=refs/heads/master>`__ that may help you out or even be usable directly if you don't intend to actually use OpenStack resources.
+
+**Step 2**
+
+In-order to be able to support multiple ONAP instances within a single kubernetes environment, a configuration set is required. To do this, execute the `createConfig.sh <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/createConfig.sh;h=f226ccae47ca6de15c1da49be4b8b6de974895ed;hb=refs/heads/master>`__ script::
+
+ oom/kubernetes/config/createConfig.sh -n onap
+
+Where:
+
+* onap' refers to the name of the instance. This serves as the Namespace prefix for each deployed ONAP component (for example, onap-mso).
+
+**Step 3**
+
+The bash script `createAll.bash <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/oneclick/createAll.bash;h=5e5f2dc76ea7739452e757282e750638b4e3e1de;hb=refs/heads/master>`__ is used to create an ONAP deployment with kubernetes. It has two primary functions:
+
+* Creating the namespaces used to encapsulate the ONAP components, and
+* Creating the services, pods and containers within each of these namespaces that provide the core functionality of ONAP.
+
+Before you execute the createAll.bash. script, pod config-init (`pod-config-init.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/pod-config-init.yaml;h=b1285ce21d61815c082f6d6aa3c43d00561811c7;hb=refs/heads/master>`__) may need editing to match your environment and deployment into the default namespace.
+
+To deploy the containers and create your ONAP system, execute the following command::
+
+ oom/kubernetes/oneclick/createAll.bash -n onap
+
+Additional information on usage of createAll.bash
+-------------------------------------------------
+
+Namespaces provide isolation between ONAP components as ONAP release 1.0 contains duplicate application (for example, mariadb) and port usage.
-The first step is to setup
-the \ `/oom/kubernetes/config/onap-parameters.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters.yaml;h=7ddaf4d4c3dccf2fad515265f0da9c31ec0e64b1;hb=refs/heads/master>`__
-file with key-value pairs specific to your OpenStack environment. There is a
-`sample <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters-sample.yaml;h=3a74beddbbf7f9f9ec8e5a6abaecb7cb238bd519;hb=refs/heads/master>`__
-that may help you out or even be usable directly if you don't intend to actually use OpenStack resources.
+As such createAll.bash requires the user to enter a namespace prefix string that can be used to separate multiple deployments of onap. The result will be set of 10 namespaces (for example, onap-sdc, onap-aai, onap-mso, onap-message-router, onap-robot, onap-vid, onap-sdnc, onap-portal, onap-policy, onap-appc) being created within the kubernetes environment.
-In-order to be able to support multiple ONAP instances within a single kubernetes environment a configuration set is required.
- The `createConfig.sh <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/createConfig.sh;h=f226ccae47ca6de15c1da49be4b8b6de974895ed;hb=refs/heads/master>`__ script
-is used to do this.::
+Deploying multiple ONAP instances within the same Kubernetes cluster
+--------------------------------------------------------------------
- > ./createConfig.sh -n onapTrial
+To deploy multiple ONAP instances, you must specify the number of Instances you would like to create in a Kubernetes cluster using createAllbash.
-The bash script
-\ `createAll.bash <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/oneclick/createAll.bash;h=5e5f2dc76ea7739452e757282e750638b4e3e1de;hb=refs/heads/master>`__ is
-used to create an ONAP deployment with kubernetes. It has two primary
-functions:
+This is currently required due to the use of NodePort ranges. NodePorts allow external IP:Port access to containers that are running inside a Kubernetes cluster.
-- Creating the namespaces used to encapsulate the ONAP components, and
+To create multiple instances of an ONAP deployment in the cluster, use the following commands::
+
+ oom/kubernetes/config/createConfig.sh -n onap
+
+ oom/kubernetes/oneclick/createAll.bash -n onap -i 2
+
+Where:
-- Creating the services, pods and containers within each of these
- namespaces that provide the core functionality of ONAP.
+* 'onap' refers to the name of the instance.
+* ‘i 2’ refers to the number of instances of an ONAP deployment in the cluster.
-To deploy the containers and create your ONAP system enter::
+To delete a deployed instance
+-----------------------------
- > ./createAll.bash -n onapTrial
+To delete a deployed instance, use the following command::
+
+ oom/kubernetes/oneclick/deleteAll.bash -n onap
+
+**Note**: Deleting the runtime containers does not remove the configuration created in step 2.
-Namespaces provide isolation between ONAP components as ONAP release 1.0
-contains duplicate application (e.g. mariadb) and port usage. As
-such createAll.bash requires the user to enter a namespace prefix string
-that can be used to separate multiple deployments of onap. The result
-will be set of 10 namespaces (e.g. onapTrial-sdc, onapTrial-aai,
-onapTrial-mso, onapTrial-message-router, onapTrial-robot, onapTrial-vid,
-onapTrial-sdnc, onapTrial-portal, onapTrial-policy, onapTrial-appc)
-being created within the kubernetes environment. A prerequisite pod
-config-init (\ `pod-config-init.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/pod-config-init.yaml;h=b1285ce21d61815c082f6d6aa3c43d00561811c7;hb=refs/heads/master>`__)
-may need editing to match your environment and deployment into the
-default namespace before running createAll.bash.
+For more information on OOM project documentation, refer to `Quick Start Guide on Wiki <https://wiki.onap.org/display/DW/ONAP+Operations+Manager+Project#ONAPOperationsManagerProject-QuickStartGuide>`__.
Demo Video
----------
PARENT_CHART := onap
COMMON_CHARTS_DIR := common
-
+SETUP_CHARTS_DIR := setup
# FIXME OOM-765
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
OUTPUT_DIR := $(ROOT_DIR)/dist
PACKAGE_DIR := $(OUTPUT_DIR)/packages
SECRET_DIR := $(OUTPUT_DIR)/secrets
-EXCLUDES := $(COMMON_CHARTS_DIR) config oneclick readiness test dist $(PARENT_CHART) dcae
-HELM_CHARTS := $(COMMON_CHARTS_DIR) $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
+EXCLUDES := $(SETUP_CHARTS_DIR) $(COMMON_CHARTS_DIR) config oneclick readiness test dist $(PARENT_CHART) dcae
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
-all: $(HELM_CHARTS)
+all: $(COMMON_CHARTS_DIR) $(SETUP_CHARTS_DIR) $(HELM_CHARTS)
+
+common:
+ @echo "\n[$@]"
+ @make package-$@
+
+setup:
+ @echo "\n[$@]"
+ @make package-$@
$(HELM_CHARTS):
@echo "\n[$@]"
name: aaf-cs
namespace: "{{ .Values.nsPrefix }}"
spec:
- replicas: 1
+ replicas: {{ .Values.aafcsReplicas }}
selector:
matchLabels:
app: aaf-cs
name: aaf
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.aafReplicas }}
selector:
matchLabels:
app: aaf
nsPrefix: onap
pullPolicy: Always
nodePortPrefix: 302
+aafcsReplicas: 1
+aafReplicas: 1
image:
readiness: oomk8s/readiness-check:1.1.0
aafImage: nexus3.onap.org:10001/onap/aaf/authz-service
###
org.onap.ccsdk.sli.dbtype = jdbc
-org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01.{{.Values.nsPrefix}}:3306/sdnctl
org.onap.ccsdk.sli.jdbc.database = sdnctl
org.onap.ccsdk.sli.jdbc.user = sdnctl
org.onap.ccsdk.sli.jdbc.password = gamma
###
org.onap.ccsdk.sli.dbtype = jdbc
-org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01.{{.Values.nsPrefix}}:3306/sdnctl
org.onap.ccsdk.sli.jdbc.database = sdnctl
org.onap.ccsdk.sli.jdbc.user = sdnctl
org.onap.ccsdk.sli.jdbc.password = gamma
apiVersion: v1
kind: Service
metadata:
- name: dgbuilder
+ name: appc-dgbuilder
namespace: "{{ .Values.nsPrefix }}"
labels:
app: appc-dgbuilder
metadata:
name: clamp
namespace: "{{ .Values.nsPrefix }}"
+ annotations:
+ msb.onap.org/service-info: '[
+ {
+ "serviceName": "clamp",
+ "version": "v1",
+ "url": "/restservices/clds/v1",
+ "protocol": "REST",
+ "port": "8080",
+ "visualRange":"1"
+ }
+ ]'
spec:
ports:
- name: clamp
name: clamp
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.clampReplicas }}
selector:
matchLabels:
app: clamp
name: clamp-mariadb
namespace: "{{ .Values.nsPrefix }}"
spec:
- replicas: 1
+ replicas: {{ .Values.clampMariaDbReplicas }}
selector:
matchLabels:
app: clamp-mariadb
nodePortPrefix: 302
mysqlPassword: strong_pitchou
dataRootDir: /dockerdata-nfs
+clampReplicas: 1
+clampMariaDbReplicas: 1
image:
readiness: oomk8s/readiness-check:1.1.0
clampImage: nexus3.onap.org:10001/onap/clamp
apiVersion: v1
description: Common templates for inclusion in other charts
-name: common-templates
+name: common
version: 2.0.0
+++ /dev/null
-EXCLUDES := test
-HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
-
-.PHONY: $(EXCLUDES) $(HELM_CHARTS)
-
-all: $(HELM_CHARTS)
-
-$(HELM_CHARTS):
- @echo "\n[$@]"
- @make lint-$@
-
-make-%:
- @if [ -f $*/Makefile ]; then make -C $*; fi
-
-dep-%: make-%
- @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
-
-lint-%: dep-%
- @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
-
-clean:
- @rm -f */requirements.lock
- @rm -f *tgz */charts/*tgz
-%:
- @:
\ No newline at end of file
using the following value:
- .Values.nsPrefix : override namespace prefix
- - .Values.nsSuffix : override namespace suffix
*/}}
{{- define "common.namespace" -}}
- {{- $prefix := default .Release.Name .Values.nsPrefix -}}
- {{- $suffix := default .Chart.Name .Values.nsSuffix -}}
- {{- printf "%s-%s" $prefix $suffix -}}
+ {{- default .Release.Namespace .Values.nsPrefix -}}
{{- end -}}
{
"id": "appc-dgbuilder",
"name": "APPC-Dgbuilder Server Health Check",
- "http": "http://dgbuilder.namespace-placeholder:3000/",
+ "http": "http://appc-dgbuilder.namespace-placeholder:3000/",
"method": "HEAD",
"header": {
"Authorization": ["Basic ZGd1c2VyOnRlc3QxMjM="],
"name": "Health Check: APPC-SDN-CTL-DB-02",
"checks": [
{
- "id": "sdnctldb02.namespace-placeholder",
+ "id": "appc-sdnctldb02.namespace-placeholder",
"name": "APPC SDNCTLDB02 Health Check",
- "tcp": "sdnctldb02.namespace-placeholder:3306",
+ "tcp": "appc-sdnctldb02.namespace-placeholder:3306",
"interval": "10s",
"timeout": "1s"
}
-NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "mariadb[^[:space:]]*")
+NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "mso-mariadb[^[:space:]]*")
if [ -n "$NAME" ]; then
if /consul/config/bin/kubectl -n namespace-placeholder exec -it $NAME -- bash -c 'mysqladmin status -u root -p$MYSQL_ROOT_PASSWORD' > /dev/null; then
-NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "sparky-be[^[:space:]]*")
+NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "aai-sparky-be[^[:space:]]*")
if [ -n "$NAME" ]; then
if /consul/config/bin/kubectl -n namespace-placeholder exec -it $NAME -- ps -efww | grep 'java' | grep 'sparky' > /dev/null; then
# Query the Hbase service for the cluster status.
-GET_CLUSTER_STATUS_RESPONSE=$(curl -si -X GET -H "Accept: text/xml" http://hbase.namespace-placeholder:8080/status/cluster)
+GET_CLUSTER_STATUS_RESPONSE=$(curl -si -X GET -H "Accept: text/xml" http://aai-hbase.namespace-placeholder:8080/status/cluster)
if [ -z "$GET_CLUSTER_STATUS_RESPONSE" ]; then
echo "Tabular store is unreachable."
spec:
containers:
- name: {{ .Chart.Name }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ image: "{{ .Values.image.repository }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
fieldRef:
fieldPath: metadata.namespace
- name: NAMESPACE_PREFIX
- value: {{ .Values.nsPrefix }}
+ value: {{ .Values.nsPrefix }}
- name: DOCKER_SHARE_PATH
value: {{ .Values.dockerSharePath }}
volumeMounts:
- name: config-init-root
hostPath:
path: {{ .Values.dockerSharePath }}
- restartPolicy: Never
\ No newline at end of file
+ restartPolicy: Never
nsPrefix: onap
dockerSharePath: /dockerdata-nfs
image:
- repository: oomk8s/config-init
- #master => Beijing (major release uprev)
- tag: 2.0.0-SNAPSHOT
+ repository: oomk8s/config-init:2.0.0-SNAPSHOT
pullPolicy: Always
name: consul-agent
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.consulAgentReplicas }}
selector:
matchLabels:
app: consul-agent
name: consul-server
namespace: "{{ .Values.nsPrefix }}"
spec:
- replicas: 3
+ replicas: {{ .Values.consulServerReplicas }}
selector:
matchLabels:
app: consul-server
consuldockerTag: "latest"
rootHostPath: "/dockerdata-nfs"
consulimageRegistry: "docker.io/consul"
+consulAgentReplicas: 1
+consulServerReplicas: 3
service:
type: NodePort
"url": "/api/aai-esr-server/v1",
"protocol": "REST",
"port": "{{.Values.esrserver.port}}",
+ "enable_ssl": true,
"visualRange":"1"
}
]'
name: log-elasticsearch
namespace: {{ .Values.nsPrefix }}
spec:
+ replicas: {{ .Values.elasticsearchReplicas }}
selector:
matchLabels:
app: elasticsearch
name: log-kibana
namespace: {{ .Values.nsPrefix }}
spec:
+ replicas: {{ .Values.kibanaReplicas }}
selector:
matchLabels:
app: kibana
name: log-logstash
namespace: {{ .Values.nsPrefix }}
spec:
+ replicas: {{ .Values.logstashReplicas }}
selector:
matchLabels:
app: logstash
pullPolicy: Always
nodePortPrefix: 302
dataRootDir: /dockerdata-nfs
+elasticsearchReplicas: 1
+kibanaReplicas: 1
+logstashReplicas: 1
image:
readiness: oomk8s/readiness-check:1.1.0
logstash: docker.elastic.co/logstash/logstash:5.4.3
name: msb-consul
namespace: "{{ .Values.nsPrefix }}"
spec:
- replicas: 1
+ replicas: {{ .Values.msbConsulReplicas }}
selector:
matchLabels:
app: msb-consul
initialDelaySeconds: 5
periodSeconds: 10
imagePullPolicy: {{ .Values.pullPolicy }}
-#{{ end }}
\ No newline at end of file
+#{{ end }}
consulPort: 8500
consulNodePort: 30500
+msbConsulReplicas: 1
discoveryPort: 10081
discoveryNodePort: 30081
<subsystem xmlns="urn:jboss:domain:datasources:4.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/mso-requests" pool-name="mso-requests" enabled="true" use-ccm="true">
- <connection-url>jdbc:mariadb://mso-mariadb:3306/mso_requests?autoReconnect=true&connectTimeout=60000&socketTimeout=60000</connection-url>
+ <connection-url>jdbc:mariadb://mso-mariadb.{{.Values.nsPrefix}}:3306/mso_requests?autoReconnect=true&connectTimeout=60000&socketTimeout=60000</connection-url>
<driver>mariadb</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
</timeout>
</datasource>
<datasource jndi-name="java:jboss/datasources/mso-catalog" pool-name="mso-catalog" enabled="true" use-ccm="true">
- <connection-url>jdbc:mariadb://mso-mariadb:3306/mso_catalog?autoReconnect=true&connectTimeout=60000&socketTimeout=60000</connection-url>
+ <connection-url>jdbc:mariadb://mso-mariadb.{{.Values.nsPrefix}}:3306/mso_catalog?autoReconnect=true&connectTimeout=60000&socketTimeout=60000</connection-url>
<driver>mariadb</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
</timeout>
</datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
- <connection-url>jdbc:mariadb://mso-mariadb:3306/camundabpmn?autoReconnect=true&connectTimeout=60000&socketTimeout=60000</connection-url>
+ <connection-url>jdbc:mariadb://mso-mariadb.{{.Values.nsPrefix}}:3306/camundabpmn?autoReconnect=true&connectTimeout=60000&socketTimeout=60000</connection-url>
<driver>mariadb</driver>
<new-connection-sql>set autocommit=1</new-connection-sql>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
dataRootDir: /dockerdata-nfs
image:
readiness: oomk8s/readiness-check:1.1.0
- mso: nexus3.onap.org:10001/openecomp/mso:v1.1.1
+ mso: nexus3.onap.org:10001/openecomp/mso:v1.1.2
mariadb: nexus3.onap.org:10001/mariadb:10.1.11
filebeat: docker.elastic.co/beats/filebeat:5.5.0
name: multicloud-framework
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.frameworkReplicas }}
selector:
matchLabels:
app: framework
name: multicloud-ocata
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.ocataReplicas }}
selector:
matchLabels:
app: multicloud-ocata
name: multicloud-vio
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.vioReplicas }}
selector:
matchLabels:
app: multicloud-vio
name: multicloud-windriver
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.windRiverReplicas }}
selector:
matchLabels:
app: multicloud-windriver
pullPolicy: Always
nodePortPrefix: 302
dataRootDir: /dockerdata-nfs
+frameworkReplicas: 1
+ocataReplicas: 1
+vioReplicas: 1
+windRiverReplicas: 1
image:
readiness: oomk8s/readiness-check:1.1.0
framework: nexus3.onap.org:10001/onap/multicloud/framework:latest
version: ~0.1.0
repository: '@local'
condition: cli.enabled
+ - name: common
+ version: ~2.0.0
+ repository: '@local'
- name: consul
version: ~1.1.0
repository: '@local'
version: ~0.1.0
repository: '@local'
condition: sdnc.enabled
+ - name: setup
+ version: ~2.0.0
+ repository: '@local'
- name: so
version: ~2.0.0
repository: '@local'
# flag to enable debugging - application support required
debugEnabled: false
+
#################################################################
# Enable/disable and configure helm charts (ie. applications)
# to customize the ONAP deployment.
}
create_service_account() {
-# cmd=`echo kubectl create clusterrolebinding $1-$2-admin-binding --clusterrole=cluster-admin --serviceaccount=$1-$2:default`
- cmd=`echo kubectl create clusterrolebinding $1-$2-admin-binding --clusterrole=cluster-admin --serviceaccount=$1:default`
+ cmd=`echo kubectl create clusterrolebinding $1-admin-binding --clusterrole=cluster-admin --serviceaccount=$1:default`
eval ${cmd}
check_return_code $cmd
}
}
create_registry_key() {
-# cmd=`echo kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7`
cmd=`echo kubectl --namespace $1 create secret docker-registry $2 --docker-server=$3 --docker-username=$4 --docker-password=$5 --docker-email=$6`
eval ${cmd}
check_return_code $cmd
printf "\nCreating registry secret **********\n"
create_registry_key $NS ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL
+
+ printf "\nCreating service account **********\n"
+ create_service_account $NS
fi
printf "\n\n********** Creating deployments for ${HELM_APPS[*]} ********** \n"
for i in ${HELM_APPS[@]}; do
- printf "\nCreating service account **********\n"
- create_service_account $NS $i
-
printf "\nCreating deployments and services **********\n"
create_onap_helm $NS $i $start
}
delete_service_account() {
- kubectl delete clusterrolebinding $1-$2-admin-binding
- printf "Service account $1-$2-admin-binding deleted.\n\n"
+ kubectl delete clusterrolebinding $1-admin-binding
}
delete_registry_key() {
- kubectl --namespace $1-$2 delete secret ${1}-docker-registry-key
+ kubectl --namespace $1 delete secret ${1}-docker-registry-key
}
delete_app_helm() {
for i in ${HELM_APPS[@]}; do
delete_app_helm $NS $i
- delete_service_account $NS $i
done
if [ "$SINGLE_COMPONENT" == "false" ]
then
delete_app_helm $NS "config"
delete_namespace $NS
+ delete_registry_key $NS
+ delete_service_account $NS
fi
if $WAIT_TERMINATE; then
name: robot
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.robotReplicas }}
selector:
matchLabels:
app: robot
nsPrefix: onap
pullPolicy: Always
nodePortPrefix: 302
+robotReplicas: 1
image:
testsuite: nexus3.onap.org:10001/openecomp/testsuite:1.1-STAGING-latest
--- /dev/null
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
--- /dev/null
+apiVersion: v1
+description: An ONAP environment setup chart
+name: setup
+version: 2.0.0
--- /dev/null
+dependencies:
+ - name: common
+ version: ~2.0.0
+ # local reference to common chart, as it is
+ # a part of this chart's package and will not
+ # be published independently to a repo (at this point)
+ repository: '@local'
\ No newline at end of file
-
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.namespace" . }}-binding
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
apiVersion: v1
kind: Secret
metadata:
- name: {{ include "common.name" . }}-docker-registry-key
+ name: {{ include "common.namespace" . }}-docker-registry-key
namespace: {{ include "common.namespace" . }}
labels:
- app: {{ include "common.fullname" . }}
+ app: {{ include "common.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
--- /dev/null
+global:
+ # image repositories
+ repository: nexus3.onap.org:10001
+ repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
http://{{ . }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
- export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
- export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+ export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
- You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
- export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+ You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
- export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
{{- end }}
hostPath:
path: /etc/localtime
imagePullSecrets:
- - name: "{{ include "common.name" . }}-docker-registry-key"
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
name: {{ include "common.fullname" . }}
namespace: {{ include "common.namespace" . }}
labels:
- app: {{ include "common.fullname" . }}
+ app: {{ include "common.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
name: {{ include "common.fullname" . }}
namespace: {{ include "common.namespace" . }}
labels:
- app: {{ include "common.fullname" . }}
+ app: {{ include "common.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
name: {{ include "common.fullname" . }}
namespace: {{ include "common.namespace" . }}
labels:
- app: {{ include "common.fullname" . }}
+ app: {{ include "common.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
type: Opaque
data:
db-root-password: {{ .Values.config.mariadbRootPassword | b64enc | quote }}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ include "common.name" . }}-docker-registry-key
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.fullname" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
- .dockercfg: {{ .Values.global.repositorySecret | default .Values.repositorySecret }}
-type: kubernetes.io/dockercfg
\ No newline at end of file
dependencies:
- - name: common-templates
+ - name: common
version: ~2.0.0
# local reference to common chart, as it is
# a part of this chart's package and will not
# be published independently to a repo (at this point)
- repository: file://../common/common-templates
\ No newline at end of file
+ repository: '@local'
\ No newline at end of file
http://{{ . }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
- export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
- export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+ export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
- You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
- export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+ You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
- export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
{{- end }}
+++ /dev/null
-
-apiVersion: rbac.authorization.k8s.io/v1beta1
-kind: ClusterRoleBinding
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: cluster-admin
-subjects:
- - kind: ServiceAccount
- name: default
- namespace: {{ include "common.namespace" . }}
\ No newline at end of file
path: start-jboss-server.sh
mode: 0755
imagePullSecrets:
- - name: "{{ include "common.name" . }}-docker-registry-key"
\ No newline at end of file
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
+++ /dev/null
-apiVersion: v1
-kind: Namespace
-metadata:
- name: {{ include "common.namespace" . }}
\ No newline at end of file
loggingRepository: docker.elastic.co
loggingImage: beats/filebeat:5.5.0
+subChartsOnly:
+ enabled: true
# application image
repository: nexus3.onap.org:10001
{
"serviceName": "usecaseui-gui",
"version": "v1",
- "url": "/iui/usecaseui",
+ "url": "/usecase-ui",
+ "path":"/iui/usecaseui",
"protocol": "UI"
"port": "8080",
"visualRange":"1|0"
name: uui
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.uuiReplicas }}
selector:
matchLabels:
app: uui
name: uui-server
namespace: "{{ .Values.nsPrefix }}"
spec:
+ replicas: {{ .Values.uuiServerReplicas }}
selector:
matchLabels:
app: uui-server
uuiPortPrefix: 303
msbaddr: msb-iag.{{ .Values.nsPrefix }}:80
mraddr: dmaap.{{ .Values.nsPrefix }}:3904
+uuiReplicas: 1
+uuiServerReplicas: 1
image:
uuiImage: nexus3.onap.org:10001/onap/usecase-ui
uuiVersion: v1.0.1