aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/pnda/charts
diff options
context:
space:
mode:
authorAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-09-27 23:58:02 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-27 23:58:02 +0000
commitace6718b20c2983dfbd3b1211c7824d63dc400e6 (patch)
tree0e04bcdf90363b83d788f2ffbe9b17eb8e48e057 /kubernetes/pnda/charts
parentd4f5885411f1b58a1bfd29403626ffa46dbf7de6 (diff)
parentb4b9a05017c7c6a337a67e6500edb3c2aad656bc (diff)
Merge changes from topic 'oom-dcae-pnda'
* changes: Add PNDA bootstrap job to dcaegen2 chart Add PNDA mirror container to dcaegen2 chart
Diffstat (limited to 'kubernetes/pnda/charts')
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/Chart.yaml20
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/requirements.yaml20
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/inputs/pnda_env.yaml230
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/scripts/bootstrap.sh67
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/configmap.yaml43
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml94
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/pv.yaml40
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-bootstrap/values.yaml97
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-mirror/.helmignore21
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-mirror/Chart.yaml20
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-mirror/requirements.yaml20
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-mirror/templates/deployment.yaml54
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-mirror/templates/service.yaml42
-rw-r--r--kubernetes/pnda/charts/dcae-pnda-mirror/values.yaml75
14 files changed, 843 insertions, 0 deletions
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/Chart.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/Chart.yaml
new file mode 100644
index 0000000000..e252d404ae
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/Chart.yaml
@@ -0,0 +1,20 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+apiVersion: v1
+description: ONAP DCAE PNDA Bootstrap
+name: dcae-pnda-bootstrap
+version: 3.0.0
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/requirements.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/requirements.yaml
new file mode 100644
index 0000000000..f06f73574a
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/requirements.yaml
@@ -0,0 +1,20 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+dependencies:
+ - name: common
+ version: ~3.0.0
+ repository: '@local'
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/inputs/pnda_env.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/inputs/pnda_env.yaml
new file mode 100644
index 0000000000..555b9e4de4
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/inputs/pnda_env.yaml
@@ -0,0 +1,230 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+infrastructure :
+ # infrastructure used for pnda deployment
+ # Valid Values are:
+ # - aws
+ # - openstack
+ # - existing-machines
+ # - terraform
+ INFRASTRUCTURE_TYPE: openstack
+
+ # The user name to use when logging into the instances
+ # For aws target user-name allowed :
+ # Target AWS Openstack
+ #
+ # Distro Redhat: ec2-user cloud-user
+ # CentOS: centos cloud-user
+ OS_USER: {{ .Values.pnda.osUser }}
+
+ # CIDR specifying the address range for the network containing all PNDA instances
+ networkCidr: {{ .Values.pnda.networkCidr }}
+
+openstack_parameters:
+ # KEYSTONE_USER: Username for the openstack clients to use
+ KEYSTONE_USER: {{ .Values.openstack.keystoneUser }}
+
+ # KEYSTONE_PASSWORD: Password for the openstack clients to use
+ KEYSTONE_PASSWORD: {{ .Values.openstack.keystonePassword }}
+
+ # KEYSTONE_TENANT: Name of the tenant / project in the openstack environment. The
+ # PNDA stack will be created in this project.
+ KEYSTONE_TENANT: {{ .Values.openstack.keystoneTenant }}
+
+ # KEYSTONE_AUTH_URL: Keystone authentication URL. The Openstack console provides this
+ # under the Access & Security section.
+ KEYSTONE_AUTH_URL: {{ .Values.openstack.keystoneAuthUrl }}
+
+ # KEYSTONE_AUTH_VERSION: Keystone authentication version. The Openstack console provides this
+ # under the Access & Security section.
+ KEYSTONE_AUTH_VERSION: '2'
+
+ # KEYSTONE_REGION_NAME: Keystone region. The Openstack console provides this
+ # under the Access & Security section.
+ KEYSTONE_REGION_NAME: {{ .Values.openstack.keystoneRegion }}
+
+ # imageId: Base image to use for the created instances. It should be created by
+ # following the guide in https://github.com/pndaproject/pnda-dib-elements
+ #
+ imageId: {{ .Values.openstack.imageId }}
+
+ # CIDR specifying the address range that may access the created PNDA instances
+ whitelistSshAccess: {{ .Values.openstack.whitelistSshAccess }}
+
+ # UUID of the public network in openstack to use
+ externalPublicNetworkId: {{ .Values.openstack.publicNetworkId }}
+
+ useExistingNetwork: {{ .Values.openstack.useExistingNetwork }}
+
+ existingNetworkId: {{ .Values.openstack.existingNetworkId }}
+
+ existingSubnetId: {{ .Values.openstack.existingSubnetId }}
+
+ # CIDR specifying the address range for the public subnet (bastion access)
+ publicSubnetCidr: {{ .Values.openstack.publicSubnetCidr }}
+
+platform_salt:
+ # Use either PLATFORM_GIT_REPO_URI + PLATFORM_GIT_BRANCH or PLATFORM_SALT_LOCAL
+ PLATFORM_SALT_LOCAL: /platform-salt
+
+pnda_application_repo:
+ # Type of storage to use for PNDA application packages
+ # s3 - AWS S3. Also set PNDA_APPS_CONTAINER, PNDA_APPS_FOLDER, PNDA_APPS_REGION, PNDA_APPS_ACCESS_KEY_ID, PNDA_APPS_SECRET_ACCESS_KEY
+ # sshfs - standard file system. Also set PR_FS_LOCATION_PATH, PR_SSHFS_USER, PR_SSHFS_HOST, PR_SSHFS_PATH and PR_SSHFS_KEY
+ # local - local filesystem on the package repository service server. Also set PR_FS_LOCATION_PATH.
+ # swift - Openstack swift. Also set PNDA_APPS_CONTAINER and PNDA_APPS_FOLDER
+ PR_FS_TYPE: {{ .Values.pnda.apps.fsType }}
+
+ # S3 container to use for PNDA application packages
+ PNDA_APPS_CONTAINER: {{ .Values.pnda.apps.s3container }}
+
+ # Name of folder within PNDA_APPS_CONTAINER that contains the PNDA application packages
+ PNDA_APPS_FOLDER: {{ .Values.pnda.apps.s3folder }}
+
+ # AWS region that contains the PNDA_APPS_CONTAINER bucket
+ PNDA_APPS_REGION: {{ .Values.pnda.apps.s3region }}
+
+ # API key for s3 access to PNDA_APPS_CONTAINER. These keys are stored on the cloud instances so should be restricted
+ # only allow access to the PNDA_APPS_CONTAINER bucket
+ PNDA_APPS_ACCESS_KEY_ID: {{ .Values.pnda.apps.s3keyid }}
+ PNDA_APPS_SECRET_ACCESS_KEY: {{ .Values.pnda.apps.s3secret }}
+
+ # Path on file system if PR_FS_TYPE is 'local' or 'sshfs'
+ PR_FS_LOCATION_PATH: {{ .Values.pnda.apps.fsLocation | print "/opt/pnda/packages" }}
+
+ # SSH accessed file system to use for PNDA application packages
+ PR_SSHFS_USER: centos
+ PR_SSHFS_HOST: 127.0.0.1
+ PR_SSHFS_PATH: /mnt/packages
+ PR_SSHFS_KEY: key.pem
+
+pnda_data_archive:
+ # S3 container to use for archiving PNDA datasets
+ PNDA_ARCHIVE_CONTAINER: pnda-archive
+
+ # AWS region that contains the PNDA_ARCHIVE_CONTAINER bucket
+ PNDA_ARCHIVE_REGION: eu-west-1
+
+ # API key for s3 access to PNDA_ARCHIVE_CONTAINER. These keys are stored on the cloud instances so should be restricted
+ # only allow access to the PNDA_ARCHIVE_CONTAINER bucket
+ PNDA_ARCHIVE_ACCESS_KEY_ID: xxxx
+ PNDA_ARCHIVE_SECRET_ACCESS_KEY: xxxx
+
+ntp:
+ # Optional ntp servers. Use this if the standard NTP servers on the Internet cannot be reached
+ # and a local NTP server has been configured. PNDA will not work without NTP.
+ # example format: 'xxx.ntp.org'
+ #For REJECT_OUTBOUND="YES" then NTP server/s must.
+ NTP_SERVERS:
+ - {{ .Values.pnda.ntp }}
+
+dns:
+ # External DNS servers list
+ nameServers:
+ - {{ .Values.pnda.nameserver }}
+
+mirrors:
+ # Mirror of resources required for provisioning PNDA, see PNDA guide for instructions on how to set this up
+ PNDA_MIRROR:
+
+hadoop:
+ # Hadoop distribution to install
+ # Valid values are:
+ # - HDP
+ # - CDH
+ HADOOP_DISTRO: HDP
+ # Spark version to enable for oozie (HDP only)
+ # Valid values are:
+ # - 1
+ # - 2
+ OOZIE_SPARK_VERSION: 1
+
+connectivity:
+ # The IP address of the client that created PNDA
+ CLIENT_IP: {{ .Values.pnda.outboundCidr }}
+ # Add online repositories for yum, apt-get, pip, etc alongside PNDA mirror
+ ADD_ONLINE_REPOS: "YES"
+ # RPM Extras repository to enable when ADD_ONLINE_REPOS=YES
+ RPM_EXTRAS_REPO_NAME: rhui-REGION-rhel-server-optional
+ # RPM Optional repository to enable when ADD_ONLINE_REPOS=YES
+ RPM_OPTIONAL_REPO_NAME: rhui-REGION-rhel-server-extras
+
+network_interfaces:
+ PNDA_INTERNAL_NETWORK: eth0
+ PNDA_INGEST_NETWORK: eth0
+
+cli:
+ # Maximum number of outbound connections that the CLI will attempt to open at once
+ # Consider increasing this when creating clusters with more than 100 nodes to speed
+ # up PNDA creation time.
+ MAX_SIMULTANEOUS_OUTBOUND_CONNECTIONS: 100
+
+security:
+ # The path were to find the security material (certificate/key).
+ # The directory should be structured as defined in this' repo's directory structure with the same name.
+ # The security material should conform to the guidelines defined in the README.md file in
+ # the containing sub directory.
+ SECURITY_MATERIAL_PATH: ./platform-certificates/
+
+ # Address of LDAP server
+ # All instances will have PAM configured to authenticate with this LDAP server if set
+ # Leave blank to disable LDAP-PAM integration
+ LDAP_SERVER: ''
+
+ # Base DN for LDAP server to use when enabling client PAM integration with LDAP
+ LDAP_BASE_DN: dc=nodomain
+
+features:
+ # Include experimental features.
+ # Set to "NO", omit setting or omit features section entirely to turn off experimental features
+ EXPERIMENTAL_FEATURES: "NO"
+
+domain:
+ # Top-level domain
+ TOP_LEVEL_DOMAIN: pnda.local
+
+ # Second-level domain
+ SECOND_LEVEL_DOMAIN: dc1
+
+dataset_compaction:
+ # Enable/Disable compaction on datasets.
+ # "YES" to enable.
+ # "NO" to disable.
+ COMPACTION: "NO"
+ # If compaction is enabled, PATTERN sets the frequency of compaction.
+ # H - hourly compaction.
+ # d - daily compaction.
+ # M - monthly compaction.
+ # Y - yearly compaction.
+ PATTERN: d
+
+datanode:
+ # DATANODE_VOLUME_COUNT sets the number of data volumes on each hadoop datanode
+ DATA_VOLUME_COUNT: 1
+ # DEVICE_ROOT sets the disk device root name
+ DEVICE_ROOT: xvdb
+
+kafka:
+ # DATA_DIRS sets the data dirs on kafka node
+ KAFKA_DATA_DIRS:
+ - /var/kafka-logs
+ # DEVICE_ROOT sets the disk device root name
+ KAFKA_DEVICE_ROOT: xvdb
+
+generic:
+ #GENERIC_DEVICE_ROOT sets the disk device root name for generic instances.
+ GENERIC_DEVICE_ROOT: xvdb
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/scripts/bootstrap.sh b/kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/scripts/bootstrap.sh
new file mode 100644
index 0000000000..61b584240d
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/resources/scripts/bootstrap.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+# Install PNDA in Openstack with Heat templates
+# Expects:
+# Input files for components to be installed in /inputs
+
+if [ "z{{ .Values.enabled }}" != "ztrue" ]
+then
+ echo
+ echo "PNDA bootstrap is disabled - skipping pnda-cli launch"
+ echo
+ exit 0
+fi
+
+set -ex
+
+CLUSTER_PREFIX="{{ include "common.namespace" . }}-pnda"
+DATANODES="{{ .Values.pnda.dataNodes }}"
+KAFKANODES="{{ .Values.pnda.kafkaNodes }}"
+VERSION="{{ .Values.pnda.version }}"
+KEYPAIR_NAME="{{ .Values.pnda_keypair_name }}"
+KEYFILE="$KEYPAIR_NAME.pem"
+
+cd /pnda-cli
+
+cp /inputs/pnda_env.yaml .
+cp /secrets/pnda.pem $KEYFILE
+chmod 600 $KEYFILE
+
+(cd tools && ./gen-certs.py)
+
+KUBE_API="https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT_HTTPS/api/v1"
+KUBE_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
+
+for i in 1 2 3 4 5 6 7 8 9
+do
+ MIRROR_IP=$(curl -s $KUBE_API/namespaces/{{ include "common.namespace" . }}/services/dcae-pnda-mirror \
+ --header "Authorization: Bearer $KUBE_TOKEN" \
+ --insecure | jq -r '.status.loadBalancer.ingress[0].ip')
+
+ if [ "$MIRROR_IP" != "null" ]; then
+ break
+ fi
+ sleep 5
+done
+
+PNDA_MIRROR="http://$MIRROR_IP:80"
+
+sed -i -e 's?CLIENT_IP/32?CLIENT_IP?' bootstrap-scripts/package-install.sh
+
+./cli/pnda-cli.py create -e $CLUSTER_PREFIX -f pico -n $DATANODES -k $KAFKANODES \
+ -b $VERSION -s $KEYPAIR_NAME --set "mirrors.PNDA_MIRROR=$PNDA_MIRROR"
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/configmap.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/configmap.yaml
new file mode 100644
index 0000000000..d1f00027c3
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/configmap.yaml
@@ -0,0 +1,43 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-inputs
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/inputs/*").AsConfig . | indent 2 }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-scripts
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/scripts/*").AsConfig . | indent 2 }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-secrets
+ namespace: {{ include "common.namespace" . }}
+data:
+ pnda.pem: |
+{{ .Values.pnda_secret | indent 4 }}
+
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml
new file mode 100644
index 0000000000..a98761ffc6
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/job.yaml
@@ -0,0 +1,94 @@
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+apiVersion: batch/v1
+kind: Job
+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 }}
+spec:
+ completions: 1
+ backoffLimit: 0
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ restartPolicy: Never
+ initContainers:
+ - name: {{ include "common.name" . }}-readiness
+ image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - dcae-pnda-mirror
+ - "-t"
+ - "75"
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /inputs
+ name: {{ include "common.fullname" . }}-inputs
+ - mountPath: /scripts
+ name: {{ include "common.fullname" . }}-scripts
+ - mountPath: /secrets
+ name: {{ include "common.fullname" . }}-secrets
+ - mountPath: /pnda-cli/cli/logs
+ name: {{ include "common.fullname" . }}-logs
+ command:
+ - "/scripts/bootstrap.sh"
+ volumes:
+ - name: {{ include "common.fullname" . }}-inputs
+ configMap:
+ name: {{ include "common.fullname" . }}-inputs
+ - name: {{ include "common.fullname" . }}-scripts
+ configMap:
+ name: {{ include "common.fullname" . }}-scripts
+ defaultMode: 0755
+ - name: {{ include "common.fullname" . }}-secrets
+ configMap:
+ name: {{ include "common.fullname" . }}-secrets
+ - name: {{ include "common.fullname" . }}-logs
+ persitentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}-logs
+ volumeClaimTemplates:
+ - metadata:
+ name: {{ include "common.fullname" . }}-logs
+ labels:
+ name: {{ include "common.fullname" . }}
+ spec:
+ accessModes: [ {{ .Values.persistence.accessMode }} ]
+ storageClassName: manual
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size }}
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/pv.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/pv.yaml
new file mode 100644
index 0000000000..bf2d40bc65
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/templates/pv.yaml
@@ -0,0 +1,40 @@
+{{/*
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+*/}}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" . }}-logs
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+ name: {{ include "common.fullname" . }}
+spec:
+ storageClassName: manual
+ capacity:
+ storage: {{ .Values.persistence.size }}
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+ hostPath:
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}0
+
+{{- end -}}
diff --git a/kubernetes/pnda/charts/dcae-pnda-bootstrap/values.yaml b/kubernetes/pnda/charts/dcae-pnda-bootstrap/values.yaml
new file mode 100644
index 0000000000..17fb936c48
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-bootstrap/values.yaml
@@ -0,0 +1,97 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:2.0.0
+ loggingRepository: docker.elastic.co
+ loggingImage: beats/filebeat:5.5.0
+ persistence: {}
+
+#################################################################
+# PNDA configuration defaults.
+#################################################################
+
+enabled: false
+
+pnda:
+ version: develop
+ dataNodes: 2
+ kafkaNodes: 1
+ osUser: centos
+ nameserver: 8.8.8.8
+ ntp: pool.ntp.org
+ mirrorNodePort: 88
+ apps:
+ fsType: local
+ networkCidr: 10.0.0.0/16
+ outboundCidr: 0.0.0.0/0
+
+pnda_keypair_name: pnda
+pnda_secret: replace-me
+
+#################################################################
+# Openstack connection params.
+#################################################################
+
+openstack:
+ keystoneUser: onap
+ keystonePassword: onap
+ keystoneTenant: onap
+ keystoneAuthUrl: 'http://10.60.18.18:5000/v2.0/'
+ keystoneRegion: regionOne
+ imageId: id_of_image
+ publicNetworkId: id_of_public_network
+ useExistingNetwork: true
+ existingNetworkId: id_of_onap_network
+ existingSubnetId: id_of_onap_subnet
+ whitelistSshAccess: 0.0.0.0/0
+ publicSubnetCidr: 10.0.0.0/24
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+
+
+repository: pndareg.ctao6.net
+image: pnda-cli:develop
+pullPolicy: Always
+
+## Persist data to a persitent volume
+persistence:
+ enabled: true
+
+ ## A manually managed Persistent Volume and Claim
+ ## Requires persistence.enabled: true
+ ## If defined, PVC must be created manually before volume will be bound
+ # existingClaim:
+ volumeReclaimPolicy: Retain
+
+ ## database data Persistent Volume Storage Class
+ ## If defined, storageClassName: <storageClass>
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ accessMode: ReadWriteOnce
+ size: 10Mi
+ mountPath: /dockerdata-nfs
+ mountSubPath: dcae-pnda-bootstrap/logs
diff --git a/kubernetes/pnda/charts/dcae-pnda-mirror/.helmignore b/kubernetes/pnda/charts/dcae-pnda-mirror/.helmignore
new file mode 100644
index 0000000000..f0c1319444
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-mirror/.helmignore
@@ -0,0 +1,21 @@
+# 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
diff --git a/kubernetes/pnda/charts/dcae-pnda-mirror/Chart.yaml b/kubernetes/pnda/charts/dcae-pnda-mirror/Chart.yaml
new file mode 100644
index 0000000000..feb310420c
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-mirror/Chart.yaml
@@ -0,0 +1,20 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+apiVersion: v1
+description: ONAP DCAE PNDA Mirror
+name: dcae-pnda-mirror
+version: 3.0.0
diff --git a/kubernetes/pnda/charts/dcae-pnda-mirror/requirements.yaml b/kubernetes/pnda/charts/dcae-pnda-mirror/requirements.yaml
new file mode 100644
index 0000000000..f06f73574a
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-mirror/requirements.yaml
@@ -0,0 +1,20 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+dependencies:
+ - name: common
+ version: ~3.0.0
+ repository: '@local'
diff --git a/kubernetes/pnda/charts/dcae-pnda-mirror/templates/deployment.yaml b/kubernetes/pnda/charts/dcae-pnda-mirror/templates/deployment.yaml
new file mode 100644
index 0000000000..0063031091
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-mirror/templates/deployment.yaml
@@ -0,0 +1,54 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+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 }}
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end -}}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
diff --git a/kubernetes/pnda/charts/dcae-pnda-mirror/templates/service.yaml b/kubernetes/pnda/charts/dcae-pnda-mirror/templates/service.yaml
new file mode 100644
index 0000000000..b233a17348
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-mirror/templates/service.yaml
@@ -0,0 +1,42 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+ annotations:
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.externalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.portName }}
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ {{- end}}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
diff --git a/kubernetes/pnda/charts/dcae-pnda-mirror/values.yaml b/kubernetes/pnda/charts/dcae-pnda-mirror/values.yaml
new file mode 100644
index 0000000000..38024b5d9a
--- /dev/null
+++ b/kubernetes/pnda/charts/dcae-pnda-mirror/values.yaml
@@ -0,0 +1,75 @@
+# ================================================================================
+# Copyright (c) 2018 Cisco Systems. 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=========================================================
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:2.0.0
+ loggingRepository: docker.elastic.co
+ loggingImage: beats/filebeat:5.5.0
+ persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+
+repository: pndareg.ctao6.net
+image: pnda-mirror:develop
+pullPolicy: Always
+
+# application configuration
+# Example:
+config: {}
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 10
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 15
+ periodSeconds: 10
+
+service:
+ type: LoadBalancer
+ name: dcae-pnda-mirror
+ portName: client
+ externalPort: 80
+ internalPort: 80
+
+## Persist data to a persitent volume
+persistence:
+ enabled: false
+
+ingress:
+ enabled: false
+
+resources: {}