summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAreli, Fuss (af732p) <af732p@att.com>2018-03-19 17:15:48 +0200
committerMichael Lando <ml636r@att.com>2018-03-19 18:17:54 +0000
commit7d437b6680047df7540beb79e8a84e33919553af (patch)
tree8a5a9c93a704d402efd7e7f46859fa8a2ed497d2
parent19c9bdace397ae740f17aa4739caf9c211833b4c (diff)
Add K8S deployment above Vagrant
Set deployment manifest files and scripts for deploy SDC over Kubernetes inside Vagrant Preparation for OOM integration Change-Id: Ia192b0b2047c88c0b758d1a974c0c49a66030f8c Issue-ID: SDC-907 Signed-off-by: Areli, Fuss (af732p) <af732p@att.com>
-rw-r--r--sdc-os-chef/kubernetes/README.md19
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/configmaps/sdc-environment-configmap.yaml52
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml2
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml1
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml4
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml2
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml9
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-config-be.yaml50
-rw-r--r--sdc-os-chef/kubernetes/sdc/values.yaml6
9 files changed, 110 insertions, 35 deletions
diff --git a/sdc-os-chef/kubernetes/README.md b/sdc-os-chef/kubernetes/README.md
new file mode 100644
index 0000000000..01128b3c9f
--- /dev/null
+++ b/sdc-os-chef/kubernetes/README.md
@@ -0,0 +1,19 @@
+### Create Kubernetes environment for SDC
+```sh
+$ cd ../scripts/k8s
+$ sh kubernetes_run.sh
+```
+
+
+### Run Deployment:
+```sh
+$ sudo helm install sdc --name onap-sdc
+```
+### Update Deployment
+```sh
+$ sudo helm upgrade onap-sdc sdc
+```
+### Delete Deployment
+```sh
+$ sudo helm del --purge onap-sdc
+``` \ No newline at end of file
diff --git a/sdc-os-chef/kubernetes/sdc/templates/configmaps/sdc-environment-configmap.yaml b/sdc-os-chef/kubernetes/sdc/templates/configmaps/sdc-environment-configmap.yaml
index 966180022b..abc1d209ba 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/configmaps/sdc-environment-configmap.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/configmaps/sdc-environment-configmap.yaml
@@ -14,23 +14,25 @@ data:
},
"json_class": "Chef::Environment",
"chef_type": "environment",
-
+
"default_attributes": {
- "CS_VIP": "{{ .Values.env.vip }}",
- "BE_VIP": "{{ .Values.env.vip }}",
- "FE_VIP": "{{ .Values.env.vip }}",
- "ES_VIP": "{{ .Values.env.vip }}",
+ "disableHttp": false,
+ "CS_VIP": "sdc-cs.{{ .Values.nsPrefix }}",
+ "BE_VIP": "sdc-be.{{ .Values.nsPrefix }}",
+ "FE_VIP": "sdc-fe.{{ .Values.nsPrefix }}",
+ "ES_VIP": "sdc-es.{{ .Values.nsPrefix }}",
+ "KB_VIP": "sdc-es.{{ .Values.nsPrefix }}",
"interfaces": {
"application": "eth0",
- "private": "eth0"
+ "private": "eth1"
},
"ECompP": {
- "ecomp_rest_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi",
- "ueb_url_list": "dmaap.onap-message-router,dmaap.onap-message-router",
+ "ecomp_rest_url": "http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi",
+ "ueb_url_list": "dmaap.{{.Values.nsPrefix}}, dmaap.{{.Values.nsPrefix}}",
"app_secret": "XftIATw9Jr3VzAcPqt3NnJOu",
"app_key": "x9UfO7JsDn8BESVX",
"inbox_name": "ECOMP-PORTAL-INBOX",
- "ecomp_redirect_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm",
+ "ecomp_redirect_url": "http://portal.api.simpledemo.onap.org:8989/ECOMPPORTAL/login.htm",
"app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1",
"decryption_key": "AGLDdG4D04BKm2IxIWEr8o=="
},
@@ -40,25 +42,26 @@ data:
"fqdn": ["dmaap.onap-message-router", "dmaap.onap-message-router"]
},
"Nodes": {
- "CS": "{{ .Values.env.nodeCS }}",
- "BE": "{{ .Values.env.nodeBE }}",
- "FE": "{{ .Values.env.nodeFE }}",
- "ES": "{{ .Values.env.nodeES }}"
+ "CS": "sdc-cs",
+ "BE": "sdc-be",
+ "FE": "sdc-fe",
+ "ES": "sdc-es",
+ "KB": "sdc-kb"
},
- "Designers": {
+ "Plugins": {
"DCAE": {
- "dcae_host": "yyy",
- "dcae_port": "yyy",
- "dcae_path": "yyy",
- "dcae_protocol": "yyy"
+ "dcae_discovery_url": "10.0.2.15",
+ "dcae_source_url": "10.0.2.15"
},
"WORKFLOW": {
- "workflow_host": "yyy",
- "workflow_port": "yyy",
- "workflow_path": "yyy",
- "workflow_protocol": "yyy"
+ "workflow_discovery_url": "10.0.2.15",
+ "workflow_source_url": "10.0.2.15"
}
- }
+ },
+ "VnfRepo": {
+ "vnfRepoPort": "8702",
+ "vnfRepoHost": "192.168.50.5"
+ }
},
"override_attributes": {
"FE": {
@@ -76,7 +79,7 @@ data:
"num_of_replicas": "0",
"num_of_shards": "1"
},
-
+
"cassandra": {
"concurrent_reads": "32",
"num_tokens": "256",
@@ -97,3 +100,4 @@ data:
}
}
}
+
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml
index 7c3a91c350..c0ff9e13a1 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml
@@ -87,6 +87,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
+ - name: JAVA_OPTIONS
+ value: ""
lifecycle:
postStart:
exec:
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml
index 4fa9e69345..61efd8ba9a 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml
@@ -15,6 +15,7 @@ spec:
labels:
app: sdc-cs
name: sdc-cs
+ spec:
containers:
- name: sdc-cs
image: "{{ .Values.image.sdcCassandra }}"
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml
index bc6d786e06..1122c48922 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml
@@ -48,6 +48,8 @@ spec:
initialDelaySeconds: 60
timeoutSeconds: 5
periodSeconds: 5
+ imagePullSecrets:
+ - name: "{{ .Values.nsPrefix }}-docker-registry-key"
volumes:
- name: sdc-environments
configMap:
@@ -58,6 +60,4 @@ spec:
- name: sdc-logs
hostPath:
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml
index da5fa290f7..874db48f58 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml
@@ -76,6 +76,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
+ - name: JAVA_OPTIONS
+ value: ""
volumeMounts:
# - mountPath: /usr/share/elasticsearch/data/
# name: sdc-sdc-es-es
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml
index 95294a37f6..3ebe762196 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml
@@ -15,15 +15,16 @@ spec:
labels:
app: sdc-kb
name: sdc-kb
+ spec:
containers:
- - env:
+ - name: sdc-kb
+ image: "{{ .Values.image.sdcKibana }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ env:
- name: ENVNAME
value: "{{ .Values.env.name }}"
- name: ELASTICSEARCH_URL
value: http://sdc-es:9200
- image: "{{ .Values.image.sdcKibana }}"
- imagePullPolicy: "{{ .Values.pullPolicy }}"
- name: sdc-kb
volumeMounts:
- mountPath: /root/chef-solo/environments/
name: sdc-environments
diff --git a/sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-config-be.yaml b/sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-config-be.yaml
new file mode 100644
index 0000000000..9087b0773a
--- /dev/null
+++ b/sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-config-be.yaml
@@ -0,0 +1,50 @@
+---
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: sdc-config-backend
+ namespace: "{{ .Values.nsPrefix }}-sdc"
+ labels:
+ app: sdc-config-backend
+spec:
+ template:
+ metadata:
+ name: sdc-backend-init
+ spec:
+ initContainers:
+ - name: sdc-init-be-readiness
+ image: "{{ .Values.image.readiness }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - sdc-be
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ containers:
+ - name: sdc-config-be
+ image: "{{ .Values.image.sdcBackendInit }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+# command:
+# - /bin/sh
+# args:
+# - "-c"
+# - "sleep 30000000000m"
+ volumeMounts:
+ - mountPath: /root/chef-solo/environments/
+ name: sdc-environments
+ env:
+ - name: ENVNAME
+ value: "{{ .Values.env.name }}"
+ volumes:
+ - name: sdc-environments
+ configMap:
+ name: sdc-environment
+ imagePullSecrets:
+ - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+ restartPolicy: Never
diff --git a/sdc-os-chef/kubernetes/sdc/values.yaml b/sdc-os-chef/kubernetes/sdc/values.yaml
index 61aaa9a781..eea6b56707 100644
--- a/sdc-os-chef/kubernetes/sdc/values.yaml
+++ b/sdc-os-chef/kubernetes/sdc/values.yaml
@@ -10,15 +10,11 @@ image:
sdcBackend: nexus3.onap.org:10001/onap/sdc-backend:1.2-STAGING-latest
sdcElasticsearchInit: nexus3.onap.org:10001/onap/sdc-init-elasticsearch:1.2-STAGING-latest
sdcCassandraInit: nexus3.onap.org:10001/onap/sdc-cassandra-init:1.2-STAGING-latest
+ sdcBackendInit: nexus3.onap.org:10001/onap/sdc-backend-init:1.2-STAGING-latest
filebeat: docker.elastic.co/beats/filebeat:5.5.0
env:
name: AUTO
- vip: sdc-cs.onap-sdc
- nodeCS: sdc-cs.onap-sdc
- nodeES: sdc-es.onap-sdc
- nodeBE: sdc-be.onap-sdc
- nodeFe: sdc-fe.onap-sdc
secrets:
sdc_user: YXNkY191c2Vy