From ed957a4fd4dc7edaf0a980f6f7e8f6a974b6dbca Mon Sep 17 00:00:00 2001 From: HuabingZhao Date: Mon, 12 Mar 2018 03:29:20 -0400 Subject: Deploy kube2msb along with msb containers Issue-ID: OOM-280 Deploy kube2msb along with msb contianers, so the ONAP services can be sync to MSB after MSB is restarted Change-Id: I408e27c72c4b2169c0babe2562e74d4a645683de Signed-off-by: HuabingZhao --- kubernetes/kube2msb/Chart.yaml | 4 -- .../templates/kube2msb-registrator-deployment.yaml | 33 --------------- kubernetes/kube2msb/values.yaml | 6 --- .../templates/kube2msb-registrator-deployment.yaml | 48 ++++++++++++++++++++++ kubernetes/msb/values.yaml | 4 ++ kubernetes/onap/requirements.yaml | 6 +-- kubernetes/onap/values.yaml | 4 +- kubernetes/oneclick/setenv.bash | 4 +- 8 files changed, 56 insertions(+), 53 deletions(-) delete mode 100644 kubernetes/kube2msb/Chart.yaml delete mode 100644 kubernetes/kube2msb/templates/kube2msb-registrator-deployment.yaml delete mode 100644 kubernetes/kube2msb/values.yaml create mode 100644 kubernetes/msb/templates/kube2msb-registrator-deployment.yaml (limited to 'kubernetes') diff --git a/kubernetes/kube2msb/Chart.yaml b/kubernetes/kube2msb/Chart.yaml deleted file mode 100644 index b648adc701..0000000000 --- a/kubernetes/kube2msb/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -description: A Helm chart for Kubernetes -name: kube2msb -version: 0.1.0 diff --git a/kubernetes/kube2msb/templates/kube2msb-registrator-deployment.yaml b/kubernetes/kube2msb/templates/kube2msb-registrator-deployment.yaml deleted file mode 100644 index d6b194008b..0000000000 --- a/kubernetes/kube2msb/templates/kube2msb-registrator-deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -#{{ if not .Values.disableKube2MsbKube2MsbRegistrator }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: kube2msb-registrator - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: 1 - selector: - matchLabels: - app: kube2msb-registrator - template: - metadata: - labels: - app: kube2msb-registrator - name: kube2msb-registrator - spec: - hostname: kube2msb-registrator - containers: - - args: - image: {{ .Values.image.kube2msb }} - name: kube2msb-registrator - env: - - name: KUBE_MASTER_URL - value: {{ .Values.kubeMasterUrl }} - - name: AUTH_TOKEN - value: {{ .Values.kubeMasterAuthToken }} - - name: MSB_URL - value: {{tpl $.Values.discoveryUrl .}} - imagePullPolicy: {{ .Values.pullPolicy }} - imagePullSecrets: - - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} diff --git a/kubernetes/kube2msb/values.yaml b/kubernetes/kube2msb/values.yaml deleted file mode 100644 index 92694482e8..0000000000 --- a/kubernetes/kube2msb/values.yaml +++ /dev/null @@ -1,6 +0,0 @@ -nsPrefix: onap -pullPolicy: IfNotPresent -image: - kube2msb: nexus3.onap.org:10001/onap/oom/kube2msb -kubeMasterUrl: https://kubernetes.default.svc.cluster.local:443 -discoveryUrl: http://msb-discovery.{{ .Values.nsPrefix }}:10081 diff --git a/kubernetes/msb/templates/kube2msb-registrator-deployment.yaml b/kubernetes/msb/templates/kube2msb-registrator-deployment.yaml new file mode 100644 index 0000000000..f95faf69d0 --- /dev/null +++ b/kubernetes/msb/templates/kube2msb-registrator-deployment.yaml @@ -0,0 +1,48 @@ +#{{ if not .Values.disableKube2MsbKube2MsbRegistrator }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: kube2msb-registrator + namespace: "{{ .Values.nsPrefix }}" +spec: + replicas: 1 + selector: + matchLabels: + app: kube2msb-registrator + template: + metadata: + labels: + app: kube2msb-registrator + name: kube2msb-registrator + spec: + hostname: kube2msb-registrator + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - msb-discovery + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ .Values.image.readiness }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: kube2msb-registrator-readiness + containers: + - args: + image: {{ .Values.image.kube2msb }} + name: kube2msb-registrator + env: + - name: KUBE_MASTER_URL + value: {{ .Values.kubeMasterUrl }} + - name: AUTH_TOKEN + value: {{ .Values.kubeMasterAuthToken }} + - name: MSB_URL + value: {{tpl $.Values.discoveryUrl .}} + imagePullPolicy: {{ .Values.pullPolicy }} + imagePullSecrets: + - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }} diff --git a/kubernetes/msb/values.yaml b/kubernetes/msb/values.yaml index 8c50e37e2b..10e3be4230 100644 --- a/kubernetes/msb/values.yaml +++ b/kubernetes/msb/values.yaml @@ -5,6 +5,7 @@ image: consul: consul:0.9.3 discovery: nexus3.onap.org:10001/onap/msb/msb_discovery:1.1.0-SNAPSHOT-latest apigateway: nexus3.onap.org:10001/onap/msb/msb_apigateway:1.1.0-SNAPSHOT-latest + kube2msb: nexus3.onap.org:10001/onap/oom/kube2msb consulPort: 8500 consulNodePort: 30500 @@ -25,3 +26,6 @@ eagPort_https: 443 eagNodePort: 30082 eagNodePort_https: 30446 eagReplicas: 1 + +kubeMasterUrl: https://kubernetes.default.svc.cluster.local:443 +discoveryUrl: http://msb-discovery.{{ .Values.nsPrefix }}:10081 diff --git a/kubernetes/onap/requirements.yaml b/kubernetes/onap/requirements.yaml index 4a3dc3a310..a8fd3eb785 100644 --- a/kubernetes/onap/requirements.yaml +++ b/kubernetes/onap/requirements.yaml @@ -38,10 +38,6 @@ dependencies: version: ~1.1.0 repository: '@local' condition: esr.enabled - - name: kube2msb - version: ~0.1.0 - repository: '@local' - condition: kube2msb.enabled - name: log version: ~0.1.0 repository: '@local' @@ -104,4 +100,4 @@ dependencies: - name: vnfsdk version: ~1.1.0 repository: '@local' - condition: vnfsdk.enabled \ No newline at end of file + condition: vnfsdk.enabled diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml index a1d901ac0f..96455a0156 100644 --- a/kubernetes/onap/values.yaml +++ b/kubernetes/onap/values.yaml @@ -49,8 +49,6 @@ dcaegen2: enabled: false esr: enabled: false -kube2msb: - enabled: false log: enabled: false message-router: @@ -103,4 +101,4 @@ vfc: vid: enabled: false vnfsdk: - enabled: false \ No newline at end of file + enabled: false diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash index 312d2c45fb..3f1af4de8a 100644 --- a/kubernetes/oneclick/setenv.bash +++ b/kubernetes/oneclick/setenv.bash @@ -1,7 +1,7 @@ #!/bin/bash -# Deploying MSB first and kube2msb last will ensure all the ONAP services can be registered to MSB -HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'vnfsdk' 'uui' 'aaf' 'vfc' 'kube2msb' 'esr') +# Deploying MSB first so the started ONAP services can be registered to MSB +HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'vnfsdk' 'uui' 'aaf' 'vfc' 'esr') ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001} ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker} ONAP_DOCKER_PASS=${ONAP_DOCKER_PASS:-docker} -- cgit 1.2.3-korg