summaryrefslogtreecommitdiffstats
path: root/adapter
diff options
context:
space:
mode:
authorJack Lucas <jflucas@research.att.com>2020-04-09 11:39:04 -0400
committerJack Lucas <jflucas@research.att.com>2020-04-09 16:59:21 -0400
commit265ca90a26db6ffc5f0a0d9b67e4f533cf01b8bf (patch)
tree9458a2137333d064ab6702c528e4afdacb9c6230 /adapter
parentc80214e2f1d0176306b529d4ecde266762dce02e (diff)
Add Helm chart for Acumos adapter6.0.0-ONAPfrankfurt
Issue-ID: DCAEGEN2-2199 Signed-off-by: Jack Lucas <jflucas@research.att.com> Change-Id: Iffe4cb4ef9278815ddb6f8e275d6017bd859bbdf
Diffstat (limited to 'adapter')
-rw-r--r--adapter/acumos-deployment/Chart.yaml21
-rw-r--r--adapter/acumos-deployment/README.md20
-rw-r--r--adapter/acumos-deployment/requirements.yaml21
-rw-r--r--adapter/acumos-deployment/resources/config/config.yaml11
-rw-r--r--adapter/acumos-deployment/templates/configmap.yaml24
-rw-r--r--adapter/acumos-deployment/templates/deployment.yaml72
-rw-r--r--adapter/acumos-deployment/templates/ingress.yaml16
-rw-r--r--adapter/acumos-deployment/templates/secrets.yaml1
-rw-r--r--adapter/acumos-deployment/templates/service.yaml18
-rw-r--r--adapter/acumos-deployment/values.yaml112
10 files changed, 316 insertions, 0 deletions
diff --git a/adapter/acumos-deployment/Chart.yaml b/adapter/acumos-deployment/Chart.yaml
new file mode 100644
index 0000000..2b08a1c
--- /dev/null
+++ b/adapter/acumos-deployment/Chart.yaml
@@ -0,0 +1,21 @@
+#============LICENSE_START========================================================
+#=================================================================================
+# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+description: ONAP DCAE Acumos Adapter
+name: dcae-acumos-adapter
+version: 6.0.0
diff --git a/adapter/acumos-deployment/README.md b/adapter/acumos-deployment/README.md
new file mode 100644
index 0000000..f2d28fd
--- /dev/null
+++ b/adapter/acumos-deployment/README.md
@@ -0,0 +1,20 @@
+# Helm Chart for Acumos Adapter
+This directory contains a Helm chart for deploying the Acumos adapter component. The chart deploys an instance of the adapter into an existing ONAP deployment. Because the adapter depends on some external components that will be different for each deployment, it does not make sense to deploy the adapter automatically as part of an automated ONAP deployment using OOM. In addition, the Acumos adapter is still at the proof of concept stage for the ONAP R6 (Frankfurt) release, so it is not appropriate to include it in the OOM deployment.
+
+## Deployment method
+The chart creates the following Kubernetes entities:
+- A Deployment that manages a pod with the Acumos adapter container.
+- A ClusterIP Service that exposes the adapter's HTTP interface within the Kubernetes cluster.
+- An Ingress that configures the cluster's ingress controller to route traffic to the adapter service.
+- A ConfigMap with the adapter's configuration file, mounted as a volume on the adapter container.
+- A secret containing the TLS certificate materials that the adapter uses to authenticate to the Acumos instance. The contents of the secret come from values provided in an "override" file at deployment time. The secret is mounted as a volume on the adapter container at the location set in the adapter configuration in the ConfigMap.
+- A secret containing the password that the adapter needs to push images to the Docker registry. The content comes from a value provided in an "override" file at deployment time. The secret is mounted as a volume on the adapter container at the location set in the adapter configuration in the ConfigMap.
+
+## Helm dependencies
+The chart depends on the ONAP "common" chart. The chart uses elements from "common" to set various names. It also uses the "common" template for secrets. This keeps the chart consistent with ONAP practices.
+
+## Instructions for using the chart
+See [these instructions](https://wiki.onap.org/display/DW/Acumos+Adapter+Installation) for details on how to use the chart to deploy the adapter.
+
+## Future work
+Once the Acumos adapter is accepted as a standard component of ONAP, it might make sense to integrate this chart into the ONAP OOM structure, as an optional component. Enabling the component would require both setting a flag and providing additional information in an "overrides" file for the Acumos instance and the Docker registry. \ No newline at end of file
diff --git a/adapter/acumos-deployment/requirements.yaml b/adapter/acumos-deployment/requirements.yaml
new file mode 100644
index 0000000..54c2049
--- /dev/null
+++ b/adapter/acumos-deployment/requirements.yaml
@@ -0,0 +1,21 @@
+#============LICENSE_START========================================================
+#=================================================================================
+# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+dependencies:
+ - name: common
+ version: ~5.x-0
+ repository: '@local'
diff --git a/adapter/acumos-deployment/resources/config/config.yaml b/adapter/acumos-deployment/resources/config/config.yaml
new file mode 100644
index 0000000..434d458
--- /dev/null
+++ b/adapter/acumos-deployment/resources/config/config.yaml
@@ -0,0 +1,11 @@
+dcaeurl: https://git.onap.org/dcaegen2/platform/plain/mod
+dcaeuser: aoadapter
+onboardingurl: http://dcaemod-onboarding-api:8080/onboarding
+onboardinguser: ''
+onboardingpass: ''
+certfile: /run/certs/cert.pem
+dockerregistry: {{ .Values.dockerTargetRegistry }}
+dockeruser: {{ .Values.dockerUser }}
+dockerpass: '@/run/pass/dpass'
+{{ $firstPort := index .Values.service.ports 0 -}}
+port: {{ $firstPort.port }}
diff --git a/adapter/acumos-deployment/templates/configmap.yaml b/adapter/acumos-deployment/templates/configmap.yaml
new file mode 100644
index 0000000..33bf467
--- /dev/null
+++ b/adapter/acumos-deployment/templates/configmap.yaml
@@ -0,0 +1,24 @@
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-configmap
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/adapter/acumos-deployment/templates/deployment.yaml b/adapter/acumos-deployment/templates/deployment.yaml
new file mode 100644
index 0000000..c7c6e0e
--- /dev/null
+++ b/adapter/acumos-deployment/templates/deployment.yaml
@@ -0,0 +1,72 @@
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+apiVersion: apps/v1
+kind: Deployment
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
+spec:
+ replicas: 1
+ selector: {{- include "common.selectors" . | nindent 4 }}
+ template:
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+ spec:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports: {{ include "common.containerPorts" . | nindent 12 }}
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.liveness.port }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.readiness.port }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ resources: {{ include "common.resources" . | nindent 12 }}
+ volumeMounts:
+ - mountPath: /run/config
+ name: adapter-config
+ - mountPath: /run/certs
+ name: adapter-certs
+ - mountPath: /run/pass
+ name: adapter-pass
+ - name: {{ include "common.name" . }}-dind
+ image: "{{ .Values.dindRepository }}/{{ .Values.dindImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ securityContext:
+ privileged: true
+ command:
+ - "dockerd"
+ args:
+ - "--host=tcp://localhost:2375"
+ volumes:
+ - name: adapter-config
+ configMap:
+ name: {{ include "common.fullname" . }}-configmap
+ - name: adapter-certs
+ secret:
+ secretName: {{ include "common.secret.getSecretName" (dict "global" . "uid" "certs") }}
+ - name: adapter-pass
+ secret:
+ secretName: {{ include "common.secret.getSecretName" (dict "global" . "uid" "docker") }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/adapter/acumos-deployment/templates/ingress.yaml b/adapter/acumos-deployment/templates/ingress.yaml
new file mode 100644
index 0000000..6bc21e3
--- /dev/null
+++ b/adapter/acumos-deployment/templates/ingress.yaml
@@ -0,0 +1,16 @@
+# ================================================================================
+# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+{{ include "common.ingress" . }} \ No newline at end of file
diff --git a/adapter/acumos-deployment/templates/secrets.yaml b/adapter/acumos-deployment/templates/secrets.yaml
new file mode 100644
index 0000000..95117c3
--- /dev/null
+++ b/adapter/acumos-deployment/templates/secrets.yaml
@@ -0,0 +1 @@
+{{ include "common.secret" . }} \ No newline at end of file
diff --git a/adapter/acumos-deployment/templates/service.yaml b/adapter/acumos-deployment/templates/service.yaml
new file mode 100644
index 0000000..85d137b
--- /dev/null
+++ b/adapter/acumos-deployment/templates/service.yaml
@@ -0,0 +1,18 @@
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+{{ include "common.service" . }}
diff --git a/adapter/acumos-deployment/values.yaml b/adapter/acumos-deployment/values.yaml
new file mode 100644
index 0000000..78f4400
--- /dev/null
+++ b/adapter/acumos-deployment/values.yaml
@@ -0,0 +1,112 @@
+#============LICENSE_START========================================================
+#=================================================================================
+# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ persistence: {}
+ nodePortPrefix: 302
+ nodePortPrefixExt: 304
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:2.0.0
+
+ ingress:
+ enabled: true
+ virtualhost:
+ enabled: false
+
+config:
+ distributorAPIURL: /distributor
+
+
+# application image
+repository: nexus3.onap.org:10001
+image: onap/org.onap.dcaegen2.platform.adapter.acumos:1.0.2
+dindRepository: docker.io
+dindImage: docker:dind
+
+service:
+ type: ClusterIP
+ name: dcae-acumos-adapter
+ ports:
+ - name: http
+ port: 9000
+
+ingress:
+ enabled: true
+ service:
+ - baseaddr: "acumos-adapter"
+ name: "dcae-acumos-adapter"
+ port: 9000
+ annotations:
+ nginx.ingress.kubernetes.io/ssl-redirect: "false"
+ # Adapter can take a long time to respond, since
+ # it's building and pushing a Docker image
+ # Override default ingress controller timeouts
+ nginx.ingress.kubernetes.io/proxy-connect-timeout: "60"
+ nginx.ingress.kubernetes.io/proxy-send-timeout: "900"
+ nginx.ingress.kubernetes.io/proxy-read-timeout: "900"
+ # Want to set ssl-redirect to false with the values below,
+ # but template doesn't expand properly
+ #config:
+ # ssl: "none"
+
+liveness:
+ initialDelaySeconds: 90
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: false
+ port: http
+
+readiness:
+ initialDelaySeconds: 60
+ periodSeconds: 20
+ port: http
+
+secrets:
+ - uid: "certs"
+ type: genericKV
+ envs:
+ - name: cert.pem
+ value: '{{ tpl .Values.acumosCert . }}'
+ - uid: "docker"
+ type: genericKV
+ envs:
+ - name: dpass
+ value: '{{ tpl .Values.dockerPass . }}'
+
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+ small:
+ limits:
+ cpu: 2
+ memory: 2Gi
+ requests:
+ cpu: 1
+ memory: 1Gi
+ large:
+ limits:
+ cpu: 4
+ memory: 4Gi
+ requests:
+ cpu: 2
+ memory: 2Gi
+ unlimited: {}