aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-os-chef/kubernetes')
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/configmaps/sdc-environment-configmap.yaml16
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml23
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml4
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml48
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml131
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-onboard-cassandra-init.yaml86
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml32
-rw-r--r--sdc-os-chef/kubernetes/sdc/values.yaml2
8 files changed, 303 insertions, 39 deletions
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 abc1d209ba..29215a0748 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
@@ -17,11 +17,12 @@ data:
"default_attributes": {
"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 }}",
+ "CS_VIP": "sdc-cs.{{ .Values.nsPrefix }}-sdc",
+ "BE_VIP": "sdc-be.{{ .Values.nsPrefix }}-sdc",
+ "ONBOARDING_BE_VIP": "sdc-onboard-be.{{ .Values.nsPrefix }}-sdc",
+ "FE_VIP": "sdc-fe.{{ .Values.nsPrefix }}-sdc",
+ "ES_VIP": "sdc-es.{{ .Values.nsPrefix }}-sdc",
+ "KB_VIP": "sdc-es.{{ .Values.nsPrefix }}-sdc",
"interfaces": {
"application": "eth0",
"private": "eth1"
@@ -44,6 +45,7 @@ data:
"Nodes": {
"CS": "sdc-cs",
"BE": "sdc-be",
+ "ONBOARDING_BE": "sdc-onboard-be",
"FE": "sdc-fe",
"ES": "sdc-es",
"KB": "sdc-kb"
@@ -72,6 +74,10 @@ data:
"http_port": "8080",
"https_port": "8443"
},
+ "ONBOARDING_BE": {
+ "http_port": "8081",
+ "https_port": "8445"
+ },
"elasticsearch": {
"cluster_name": "SDC-ES-",
"ES_path_home": "/usr/share/elasticsearch",
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 c0ff9e13a1..8189bd9785 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-be.yaml
@@ -35,6 +35,8 @@ spec:
- sdc-cs
- --container-name
- sdc-kb
+ - --container-name
+ - sdc-onboard-backend
env:
- name: NAMESPACE
valueFrom:
@@ -67,8 +69,8 @@ spec:
- containerPort: 8443
- containerPort: 8080
volumeMounts:
- - mountPath: /usr/share/elasticsearch/data/
- name: sdc-sdc-es-es
+ #- mountPath: /usr/share/elasticsearch/data/
+ # name: sdc-sdc-es-es
- mountPath: /root/chef-solo/environments/
name: sdc-environments
- mountPath: /etc/localtime
@@ -88,14 +90,17 @@ spec:
fieldRef:
fieldPath: status.podIP
- name: JAVA_OPTIONS
- value: ""
+ value: "-Xmx1536m -Xms1536m"
+ - name: cassandra_ssl_enabled
+ value: "false"
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
readinessProbe:
- tcpSocket:
- port: 8443
+ exec:
+ command:
+ - "/var/lib/ready-probe.sh"
initialDelaySeconds: 120
periodSeconds: 10
failureThreshold: 30
@@ -110,9 +115,9 @@ spec:
- name: sdc-logback
hostPath:
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/be/logback.xml
- - name: sdc-sdc-es-es
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
+ #- name: sdc-sdc-es-es
+ # hostPath:
+ # path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
- name: sdc-environments
configMap:
name: sdc-environment
@@ -121,7 +126,7 @@ spec:
path: /etc/localtime
- name: sdc-logs
hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs/BE
- name: sdc-check-job-completion
configMap:
name: sdc-check-job-completion
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 61efd8ba9a..9dad280526 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml
@@ -30,6 +30,10 @@ spec:
- name: CS_PASSWORD
valueFrom:
secretKeyRef: {name: sdc-cs-secret, key: cs_password}
+ - name: MAX_HEAP_SIZE
+ value: 1536M
+ - name: HEAP_NEWSIZE
+ value: 512M
volumeMounts:
- mountPath: /var/lib/cassandra/
name: sdc-sdc-cs-cs
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 874db48f58..68493a7b84 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml
@@ -22,13 +22,11 @@ spec:
- /root/ready.py
args:
- --container-name
- - sdc-es
- - --container-name
- - sdc-cs
- - --container-name
- sdc-kb
- --container-name
- sdc-be
+ - --container-name
+ - sdc-onboard-backend
env:
- name: NAMESPACE
valueFrom:
@@ -37,6 +35,21 @@ spec:
fieldPath: metadata.namespace
image: "{{ .Values.image.readiness }}"
imagePullPolicy: "{{ .Values.pullPolicy }}"
+ - name: sdc-job-completion
+ image: "{{ .Values.image.readiness }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ command:
+ - python
+ args:
+ - /root/readiness/sdc_check_job_completion.py
+ - --job-name
+ - sdc-config-backend
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
volumes:
# - name: filebeat-conf
# hostPath:
@@ -45,24 +58,15 @@ spec:
emptyDir: {}
- name: sdc-data-filebeat
emptyDir: {}
-# - name: sdc-logback
-# hostPath:
-# path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/fe/logback.xml
-# - name: sdc-sdc-es-es
-# hostPath:
-# path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
- name: sdc-environments
configMap:
name: sdc-environment
- name: sdc-localtime
hostPath:
path: /etc/localtime
-# - name: sdc-logs
-# hostPath:
-# path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs
-# - name: sdc-fe-config
-# hostPath:
-# path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-fe/FE_2_setup_configuration.rb
+ - name: sdc-logs
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs/FE
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
containers:
@@ -77,23 +81,17 @@ spec:
fieldRef:
fieldPath: status.podIP
- name: JAVA_OPTIONS
- value: ""
+ value: "-Xmx256m -Xms256m"
volumeMounts:
-# - mountPath: /usr/share/elasticsearch/data/
-# name: sdc-sdc-es-es
- mountPath: /root/chef-solo/environments/
name: sdc-environments
- mountPath: /etc/localtime
name: sdc-localtime
readOnly: true
-# - mountPath: /var/lib/jetty/logs
-# name: sdc-logs
+ - mountPath: /var/lib/jetty/logs
+ name: sdc-logs
# - mountPath: /var/log/onap
# name: sdc-logs-2
-# - mountPath: /root/chef-solo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
-# name: sdc-fe-config
-# - mountPath: /tmp/logback.xml
-# name: sdc-logback
lifecycle:
postStart:
exec:
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml
new file mode 100644
index 0000000000..267b3bb3d2
--- /dev/null
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml
@@ -0,0 +1,131 @@
+#{{ if not .Values.disableSdcSdcBe }}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ labels:
+ app: sdc-onboard-backend
+ name: sdc-onboard-backend
+ namespace: "{{ .Values.nsPrefix }}-sdc"
+spec:
+ replicas: 1
+ strategy:
+ type: RollingUpdate
+ rollingUpdate:
+ maxSurge: 2
+ maxUnavailable: 0
+ selector:
+ matchLabels:
+ app: sdc-onboard-backend
+ template:
+ metadata:
+ labels:
+ app: sdc-onboard-backend
+ name: sdc-onboard-backend
+ spec:
+ initContainers:
+ - name: sdc-onboard-init-readiness
+ image: "{{ .Values.image.readiness }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - sdc-cs
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ - name: sdc-job-completion
+ image: "{{ .Values.image.readiness }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ command:
+ - python
+ args:
+ - /root/readiness/sdc_check_job_completion.py
+ - --job-name
+ - sdc-onboard-cassandra-init
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ volumeMounts:
+ - mountPath: /root/readiness
+ name: sdc-check-job-completion
+ containers:
+ - name: sdc-onboard-backend
+ image: "{{ .Values.image.sdcOnboardBackend }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ ports:
+ - containerPort: 8445
+ - containerPort: 8081
+ volumeMounts:
+ - mountPath: /root/chef-solo/environments/
+ name: sdc-environments
+ - mountPath: /etc/localtime
+ name: sdc-localtime
+ readOnly: true
+ - mountPath: /var/lib/jetty/logs
+ name: sdc-logs
+ - mountPath: /var/log/onap
+ name: sdc-logs-2
+ - mountPath: /tmp/logback.xml
+ name: sdc-logback
+ env:
+ - name: ENVNAME
+ value: "{{ .Values.env.name }}"
+ - name: HOST_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: SDC_CLUSTER_NAME
+ value: "SDC-CS-{{ .Values.env.name }}"
+ - name: SDC_USER
+ valueFrom:
+ secretKeyRef: {name: sdc-cs-secret, key: sdc_user}
+ - name: SDC_PASSWORD
+ valueFrom:
+ secretKeyRef: {name: sdc-cs-secret, key: sdc_password}
+ - name: JAVA_OPTIONS
+ value: "-Xdebug -agentlib:jdwp=transport=dt_socket,address=4001,server=y,suspend=n -Xmx1g -Xms1g"
+ - name: cassandra_ssl_enabled
+ value: "false"
+ lifecycle:
+ postStart:
+ exec:
+ command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/onboarding-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+ readinessProbe:
+ exec:
+ command:
+ - "/var/lib/ready-probe.sh"
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ volumes:
+ - name: filebeat-conf
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ - name: sdc-logs-2
+ emptyDir: {}
+ - name: sdc-data-filebeat
+ emptyDir: {}
+ - name: sdc-logback
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/onboard-be/logback.xml
+ - name: sdc-environments
+ configMap:
+ name: sdc-environment
+ - name: sdc-localtime
+ hostPath:
+ path: /etc/localtime
+ - name: sdc-logs
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs/ONBOARD
+ - name: sdc-check-job-completion
+ configMap:
+ name: sdc-check-job-completion
+ imagePullSecrets:
+ - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
diff --git a/sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-onboard-cassandra-init.yaml b/sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-onboard-cassandra-init.yaml
new file mode 100644
index 0000000000..2cf9ec3fd3
--- /dev/null
+++ b/sdc-os-chef/kubernetes/sdc/templates/jobs/sdc-onboard-cassandra-init.yaml
@@ -0,0 +1,86 @@
+---
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: sdc-onboard-cassandra-init
+ namespace: "{{ .Values.nsPrefix }}-sdc"
+ labels:
+ app: sdc-onboard-cassandra-init
+spec:
+ template:
+ metadata:
+ name: sdc-onboard-cassandra-init
+ spec:
+ initContainers:
+ - name: sdc-init-cs-readiness
+ image: "{{ .Values.image.readiness }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - sdc-cs
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ - name: sdc-job-completion
+ image: "{{ .Values.image.readiness }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ command:
+ - python
+ args:
+ - /root/readiness/sdc_check_job_completion.py
+ - --job-name
+ - sdc-config-cassandra
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ volumeMounts:
+ - mountPath: /root/readiness
+ name: sdc-check-job-completion
+
+ containers:
+ - name: sdc-onboard-cassandra-init
+ image: "{{ .Values.image.sdcOnboardBackendInit }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ volumeMounts:
+ - mountPath: /root/chef-solo/environments/
+ name: sdc-environments
+ - mountPath: /var/lib/cassandra/
+ name: sdc-sdc-cs-cs
+ env:
+ - name: ENVNAME
+ value: "{{ .Values.env.name }}"
+ - name: CS_HOST_IP
+ value: sdc-cs
+ - name: SDC_USER
+ valueFrom:
+ secretKeyRef: {name: sdc-cs-secret, key: sdc_user}
+ - name: SDC_PASSWORD
+ valueFrom:
+ secretKeyRef: {name: sdc-cs-secret, key: sdc_password}
+ - name: CS_PASSWORD
+ valueFrom:
+ secretKeyRef: {name: sdc-cs-secret, key: cs_password}
+ volumes:
+ - name: sdc-sdc-cs-cs
+ persistentVolumeClaim:
+ claimName: sdc-cs-db
+ - name: sdc-environments
+ configMap:
+ name: sdc-environment
+ - name: sdc-localtime
+ hostPath:
+ path: /etc/localtime
+ - name: sdc-check-job-completion
+ configMap:
+ name: sdc-check-job-completion
+ imagePullSecrets:
+ - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+ restartPolicy: Never
diff --git a/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml b/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml
index 4100dc24a4..d568e9c317 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml
@@ -124,4 +124,36 @@ spec:
selector:
app: sdc-fe
type: NodePort
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: sdc-onboard-be
+ name: sdc-onboard-be
+ namespace: "{{ .Values.nsPrefix }}-sdc"
+ annotations:
+ msb.onap.org/service-info: '[
+ {
+ "serviceName": "sdc-onboard-be",
+ "version": "v1",
+ "url": "/sdc/v1",
+ "protocol": "REST",
+ "port": "8081",
+ "visualRange":"1"
+ }
+ ]'
+spec:
+ ports:
+ - name: sdc-onboard-port-8445
+ nodePort: {{ .Values.nodePortPrefix }}09
+ port: 8445
+ - name: sdc-onboard-port-8081
+ nodePort: {{ .Values.nodePortPrefix }}08
+ port: 8081
+ selector:
+ app: sdc-onboard-be
+ type: NodePort
+#{{ end }}
+#{{ if not .Values.disableSdcSdcOnboardBE }}
#{{ end }} \ No newline at end of file
diff --git a/sdc-os-chef/kubernetes/sdc/values.yaml b/sdc-os-chef/kubernetes/sdc/values.yaml
index eea6b56707..d871190321 100644
--- a/sdc-os-chef/kubernetes/sdc/values.yaml
+++ b/sdc-os-chef/kubernetes/sdc/values.yaml
@@ -11,6 +11,8 @@ image:
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
+ sdcOnboardBackendInit: nexus3.onap.org:10001/onap/sdc-onboard-cassandra-init:1.2-STAGING-latest
+ sdcOnboardBackend: nexus3.onap.org:10001/onap/sdc-onboard-backend:1.2-STAGING-latest
filebeat: docker.elastic.co/beats/filebeat:5.5.0
env: