summaryrefslogtreecommitdiffstats
path: root/deployments
diff options
context:
space:
mode:
Diffstat (limited to 'deployments')
-rwxr-xr-xdeployments/build.sh2
-rw-r--r--deployments/helm/v2/emco/README.md23
-rw-r--r--deployments/helm/v2/emco/dcm/Chart.yaml18
-rw-r--r--deployments/helm/v2/emco/dcm/requirements.yaml18
-rw-r--r--deployments/helm/v2/emco/dcm/resources/config/config.json8
-rw-r--r--deployments/helm/v2/emco/dcm/templates/configmap.yaml28
-rw-r--r--deployments/helm/v2/emco/dcm/templates/deployment.yaml16
-rw-r--r--deployments/helm/v2/emco/dcm/templates/service.yaml16
-rw-r--r--deployments/helm/v2/emco/dcm/values.yaml84
-rw-r--r--deployments/helm/v2/emco/emco-services/requirements.yaml3
-rwxr-xr-xdeployments/kubernetes/cleanup-emco.sh3
-rw-r--r--deployments/kubernetes/monitor-deploy.yaml11
-rw-r--r--deployments/kubernetes/onap4k8s.yaml72
13 files changed, 289 insertions, 13 deletions
diff --git a/deployments/build.sh b/deployments/build.sh
index 2304b12b..a6d24586 100755
--- a/deployments/build.sh
+++ b/deployments/build.sh
@@ -13,7 +13,7 @@ set -o pipefail
k8s_path="$(git rev-parse --show-toplevel)"
-VERSION="0.6.0-SNAPSHOT"
+VERSION="0.7.0-SNAPSHOT"
export IMAGE_NAME="nexus3.onap.org:10003/onap/multicloud/k8s"
function _compile_src {
diff --git a/deployments/helm/v2/emco/README.md b/deployments/helm/v2/emco/README.md
index 3534f5a5..407f4509 100644
--- a/deployments/helm/v2/emco/README.md
+++ b/deployments/helm/v2/emco/README.md
@@ -34,31 +34,31 @@ Pacakges helm charts in tar.gz format. All packages are in **dist/packages** dir
**4. Deploy tools (Optional)**
-`$ helm install dist/packages/emco-tools-0.1.0.tgz --name rel-tools --namespace emco`
+`$ helm install dist/packages/emco-tools-0.1.0.tgz --name emco-tools --namespace emco`
NOTE: Deploy the Chart emco-0.1.0.tgz to deploy all packages including database, services and tools.
-`$ helm install dist/packages/emco-0.1.0.tgz --name rel --namespace emco`
+`$ helm install dist/packages/emco-0.1.0.tgz --name emco --namespace emco`
**5. To check logs of the different Microservices check fluentd logs**
-`kubectl logs rel-fluentd-0 -n emco | grep orchestrator`
+`kubectl logs emco-tools-fluentd-0 -n emco | grep orchestrator`
**6. Delete all packages**
-`$ helm delete rel-services --purge`
+`$ helm delete emco-services --purge`
-`$ helm delete rel-db --purge`
+`$ helm delete emco-db --purge`
Optional if tools were installed
-`$ helm delete rel-tools --purge`
+`$ helm delete emco-tools --purge`
NOTE: If the Chart emco-0.1.0.tgz was deployed
-`$ helm delete rel --purge`
+`$ helm delete emco --purge`
**7. Delete local helm repo**
@@ -69,10 +69,9 @@ NOTE: If the Chart emco-0.1.0.tgz was deployed
After deleting the db package and before installing the package again following error happens:
-`Error: release rel-db failed: object is being deleted: persistentvolumes "rel-db-emco-etcd-data-0" already exists`
+`Error: release emco-db failed: object is being deleted: persistentvolumes "emco-db-emco-etcd-data-0" already exists`
-Workaround :
+Workarounds:
-`kubectl edit persistentvolumes rel-db-emco-etcd-data-0`
-
-and remover finalizers section
+* remove the finalizers section using `kubectl edit persistentvolumes emco-db-emco-etcd-data-0`
+* or, if appropriate, delete the entire namespace using `kubectl delete namespace emco` \ No newline at end of file
diff --git a/deployments/helm/v2/emco/dcm/Chart.yaml b/deployments/helm/v2/emco/dcm/Chart.yaml
new file mode 100644
index 00000000..9cd356e0
--- /dev/null
+++ b/deployments/helm/v2/emco/dcm/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+
+apiVersion: v1
+description: Distributed Cloud Manager
+name: dcm
+version: 0.1.0
diff --git a/deployments/helm/v2/emco/dcm/requirements.yaml b/deployments/helm/v2/emco/dcm/requirements.yaml
new file mode 100644
index 00000000..a3792606
--- /dev/null
+++ b/deployments/helm/v2/emco/dcm/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+
+dependencies:
+ - name: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/emco/dcm/resources/config/config.json b/deployments/helm/v2/emco/dcm/resources/config/config.json
new file mode 100644
index 00000000..7478656e
--- /dev/null
+++ b/deployments/helm/v2/emco/dcm/resources/config/config.json
@@ -0,0 +1,8 @@
+{
+
+ "database-type": "mongo",
+ "database-ip": "emco-mongo",
+ "etcd-ip": "emco-etcd",
+ "service-port": "9077"
+}
+
diff --git a/deployments/helm/v2/emco/dcm/templates/configmap.yaml b/deployments/helm/v2/emco/dcm/templates/configmap.yaml
new file mode 100644
index 00000000..998e0389
--- /dev/null
+++ b/deployments/helm/v2/emco/dcm/templates/configmap.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+
+apiVersion: v1
+kind: ConfigMap
+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 }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/deployments/helm/v2/emco/dcm/templates/deployment.yaml b/deployments/helm/v2/emco/dcm/templates/deployment.yaml
new file mode 100644
index 00000000..cf73fe21
--- /dev/null
+++ b/deployments/helm/v2/emco/dcm/templates/deployment.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.deployment" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/emco/dcm/templates/service.yaml b/deployments/helm/v2/emco/dcm/templates/service.yaml
new file mode 100644
index 00000000..c9ab68d3
--- /dev/null
+++ b/deployments/helm/v2/emco/dcm/templates/service.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.servicemco" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/emco/dcm/values.yaml b/deployments/helm/v2/emco/dcm/values.yaml
new file mode 100644
index 00000000..dffa85e9
--- /dev/null
+++ b/deployments/helm/v2/emco/dcm/values.yaml
@@ -0,0 +1,84 @@
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ nodePortPrefixExt: 304
+ persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: registry.hub.docker.com
+image: emcov2/emco:stable
+pullPolicy: Always
+command: "/opt/emco/entrypoint"
+args: "dcm"
+workingDir: /opt/emco
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+
+service:
+ type: NodePort
+ name: dcm
+ portName: dcm
+ internalPort: 9077
+ externalPort: 9077
+ nodePort: 77
+
+ingress:
+ enabled: false
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/emco/emco-services/requirements.yaml b/deployments/helm/v2/emco/emco-services/requirements.yaml
index 9cd7b475..dbb14661 100644
--- a/deployments/helm/v2/emco/emco-services/requirements.yaml
+++ b/deployments/helm/v2/emco/emco-services/requirements.yaml
@@ -31,3 +31,6 @@ dependencies:
- name: ovnaction
version: ~0.x-0
repository: '@local'
+ - name: dcm
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/kubernetes/cleanup-emco.sh b/deployments/kubernetes/cleanup-emco.sh
index a8aef470..4572350d 100755
--- a/deployments/kubernetes/cleanup-emco.sh
+++ b/deployments/kubernetes/cleanup-emco.sh
@@ -3,14 +3,17 @@ kubectl -n onap4k8s delete deployment clm
kubectl -n onap4k8s delete deployment orchestrator
kubectl -n onap4k8s delete deployment ncm
kubectl -n onap4k8s delete deployment ovnaction
+kubectl -n onap4k8s delete deployment dcm
kubectl -n onap4k8s delete deployment rsync
kubectl -n onap4k8s delete service clm
kubectl -n onap4k8s delete service orchestrator
kubectl -n onap4k8s delete service ncm
kubectl -n onap4k8s delete service ovnaction
+kubectl -n onap4k8s delete service dcm
kubectl -n onap4k8s delete service rsync
kubectl -n onap4k8s delete configmap clm
kubectl -n onap4k8s delete configmap orchestrator
kubectl -n onap4k8s delete configmap ncm
kubectl -n onap4k8s delete configmap ovnaction
+kubectl -n onap4k8s delete configmap dcm
kubectl -n onap4k8s delete configmap rsync
diff --git a/deployments/kubernetes/monitor-deploy.yaml b/deployments/kubernetes/monitor-deploy.yaml
index 29bb1eb6..ef8e5ec3 100644
--- a/deployments/kubernetes/monitor-deploy.yaml
+++ b/deployments/kubernetes/monitor-deploy.yaml
@@ -77,6 +77,10 @@ spec:
items:
type: object
type: array
+ csrStatuses:
+ items:
+ type: object
+ type: array
required:
- ready
- resourceCount
@@ -89,6 +93,7 @@ spec:
- ingressStatuses
- jobStatuses
- statefulSetStatuses
+ - csrStatuses
type: object
version: v1alpha1
versions:
@@ -169,6 +174,12 @@ rules:
- '*'
verbs:
- '*'
+- apiGroups:
+ - certificates.k8s.io
+ resources:
+ - '*'
+ verbs:
+ - '*'
---
apiVersion: rbac.authorization.k8s.io/v1
diff --git a/deployments/kubernetes/onap4k8s.yaml b/deployments/kubernetes/onap4k8s.yaml
index 6e404873..1d0c55f7 100644
--- a/deployments/kubernetes/onap4k8s.yaml
+++ b/deployments/kubernetes/onap4k8s.yaml
@@ -361,3 +361,75 @@ spec:
- key: config.json
path: config.json
+---
+# DCM Config Map
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: dcm
+ labels:
+ app: dcm
+data:
+ config.json: |
+ {
+ "database-type": "mongo",
+ "database-ip": "mongo",
+ "etcd-ip": "etcd",
+ "service-port": "9077"
+ }
+
+---
+# DCM Service
+apiVersion: v1
+kind: Service
+metadata:
+ name: dcm
+ labels:
+ app: dcm
+spec:
+ selector:
+ app: dcm
+ type: NodePort
+ ports:
+ - name: http
+ port: 9077
+ nodePort: 31877
+ protocol: TCP
+ targetPort: 9077
+
+---
+# DCM Deployment
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: dcm
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: dcm
+ template:
+ metadata:
+ labels:
+ app: dcm
+ spec:
+ containers:
+ - name: dcm
+ image: emcov2/emco:stable
+ imagePullPolicy: Always
+ command: ["/opt/emco/entrypoint", "dcm"]
+ workingDir: /opt/emco
+ ports:
+ - containerPort: 9077
+ volumeMounts:
+ - name: config
+ mountPath: /opt/emco/config.json
+ subPath: config.json
+ volumes:
+ - name: config
+ configMap:
+ name: dcm
+ items:
+ - key: config.json
+ path: config.json
+