diff options
author | Borislav Glozman <Borislav.Glozman@amdocs.com> | 2017-07-24 10:45:28 +0300 |
---|---|---|
committer | Borislav Glozman <Borislav.Glozman@amdocs.com> | 2017-08-03 13:05:45 +0000 |
commit | 5197e2e88144a536068fb75e912f91b20e39db2e (patch) | |
tree | 965bdfc496c5eef1286680996051afe8aba577c5 /kubernetes | |
parent | 097208524f1954a08e3c6d82d15bb4090678b2ed (diff) |
[OOM-3] Docker credentials secret missing
Change-Id: I30df3cc11315b757a1d3e3da832681682a970825
Signed-off-by: Borislav Glozman <Borislav.Glozman@amdocs.com>
Diffstat (limited to 'kubernetes')
36 files changed, 107 insertions, 9 deletions
diff --git a/kubernetes/aai/aai-deployment.yaml b/kubernetes/aai/aai-deployment.yaml index ccf5007de2..857044d0f3 100644 --- a/kubernetes/aai/aai-deployment.yaml +++ b/kubernetes/aai/aai-deployment.yaml @@ -85,3 +85,5 @@ spec: hostPath: path: /dockerdata-nfs/onapdemo/aai/aai-data/ restartPolicy: Always + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/aai/hbase-deployment.yaml b/kubernetes/aai/hbase-deployment.yaml index 99b4d3f1b4..d086061501 100644 --- a/kubernetes/aai/hbase-deployment.yaml +++ b/kubernetes/aai/hbase-deployment.yaml @@ -27,3 +27,5 @@ spec: port: 8020 initialDelaySeconds: 5 periodSeconds: 10 + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/aai/modelloader-deployment.yaml b/kubernetes/aai/modelloader-deployment.yaml index 7eacf7c1c8..e649fc0565 100644 --- a/kubernetes/aai/modelloader-deployment.yaml +++ b/kubernetes/aai/modelloader-deployment.yaml @@ -93,3 +93,5 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 restartPolicy: Always + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/appc/appc-deployment.yaml b/kubernetes/appc/appc-deployment.yaml index b0224d5ac0..e2f2b4ead4 100644 --- a/kubernetes/appc/appc-deployment.yaml +++ b/kubernetes/appc/appc-deployment.yaml @@ -72,3 +72,5 @@ spec: - name: sdnc-conf hostPath: path: /dockerdata-nfs/onapdemo/sdnc/conf + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/appc/db-deployment.yaml b/kubernetes/appc/db-deployment.yaml index 0af66cc91e..ee796faca3 100644 --- a/kubernetes/appc/db-deployment.yaml +++ b/kubernetes/appc/db-deployment.yaml @@ -34,3 +34,5 @@ spec: - name: appc-data hostPath: path: /dockerdata-nfs/onapdemo/appc/data + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/appc/dgbuilder-deployment.yaml b/kubernetes/appc/dgbuilder-deployment.yaml index 9122095f8c..de8149390c 100644 --- a/kubernetes/appc/dgbuilder-deployment.yaml +++ b/kubernetes/appc/dgbuilder-deployment.yaml @@ -62,3 +62,5 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 restartPolicy: Always + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/message-router/message-router-dmaap.yaml b/kubernetes/message-router/message-router-dmaap.yaml index 5730a13b60..43c39cde8c 100644 --- a/kubernetes/message-router/message-router-dmaap.yaml +++ b/kubernetes/message-router/message-router-dmaap.yaml @@ -70,3 +70,5 @@ spec: - name: mykey hostPath: path: /dockerdata-nfs/onapdemo/message-router/dmaap/mykey + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/message-router/message-router-kafka.yaml b/kubernetes/message-router/message-router-kafka.yaml index d2f0bb0e4a..3a2b4f06a4 100644 --- a/kubernetes/message-router/message-router-kafka.yaml +++ b/kubernetes/message-router/message-router-kafka.yaml @@ -78,3 +78,5 @@ spec: - name: start-kafka hostPath: path: /dockerdata-nfs/onapdemo/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/message-router/message-router-zookeeper.yaml b/kubernetes/message-router/message-router-zookeeper.yaml index d5db00eb1b..aca4806595 100644 --- a/kubernetes/message-router/message-router-zookeeper.yaml +++ b/kubernetes/message-router/message-router-zookeeper.yaml @@ -31,3 +31,5 @@ spec: - name: zookeeper-data hostPath: path: /dockerdata-nfs/onapdemo/message-router/dcae-startup-vm-message-router/docker_files/data-zookeeper + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/mso/db-deployment.yaml b/kubernetes/mso/db-deployment.yaml index e7d81d93ee..f57f4bac87 100644 --- a/kubernetes/mso/db-deployment.yaml +++ b/kubernetes/mso/db-deployment.yaml @@ -45,3 +45,5 @@ spec: - name: mso-mariadb-docker-entrypoint-initdb hostPath: path: /dockerdata-nfs/onapdemo/mso/mariadb/docker-entrypoint-initdb.d + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/mso/mso-deployment.yaml b/kubernetes/mso/mso-deployment.yaml index 53f1e01e28..fb052df734 100644 --- a/kubernetes/mso/mso-deployment.yaml +++ b/kubernetes/mso/mso-deployment.yaml @@ -70,3 +70,5 @@ spec: - name: mso-docker-files hostPath: path: /dockerdata-nfs/onapdemo/mso/docker-files + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash index 6e62c6bec4..af300f25cd 100755 --- a/kubernetes/oneclick/createAll.bash +++ b/kubernetes/oneclick/createAll.bash @@ -1,5 +1,7 @@ #!/bin/bash +. $(dirname "$0")/setenv.bash + usage() { cat <<EOF Usage: $0 [PARAMs] @@ -17,6 +19,10 @@ create_namespace() { kubectl create namespace $1-$2 } +create_registry_key() { + kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7 +} + create_service() { kubectl --namespace $1-$2 create -f ../$2/all-services.yaml } @@ -25,8 +31,10 @@ create_service() { NS= INCL_SVC=true APP= +DU=$ONAP_DOCKER_USER +DP=$ONAP_DOCKER_PASS -while getopts ":n:u:s:a:" PARAM; do +while getopts ":n:u:s:a:du:dp:" PARAM; do case $PARAM in u) usage @@ -45,6 +53,12 @@ while getopts ":n:u:s:a:" PARAM; do exit 1 fi ;; + du) + DU=${OPTARG} + ;; + dp) + DP=${OPTARG} + ;; ?) usage exit @@ -59,8 +73,6 @@ fi if [[ ! -z "$APP" ]]; then ONAP_APPS=($APP) -else - ONAP_APPS=('sdc' 'aai' 'mso' 'message-router' 'robot' 'vid' 'sdnc' 'portal' 'policy' 'appc') fi printf "\n********** Creating up ONAP: ${ONAP_APPS[*]}\n" @@ -79,6 +91,7 @@ done printf "\n\n********** Creating deployments for ${ONAP_APPS[*]} ********** \n" for i in ${ONAP_APPS[@]}; do + create_registry_key $NS $i $ONAP_DOCKER_REGISTRY_KEY $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL /bin/bash $i.sh $NS $i 'create' done diff --git a/kubernetes/oneclick/deleteAll.bash b/kubernetes/oneclick/deleteAll.bash index 8d145f945a..3d54aa80ae 100755 --- a/kubernetes/oneclick/deleteAll.bash +++ b/kubernetes/oneclick/deleteAll.bash @@ -1,6 +1,19 @@ #!/bin/bash + +. $(dirname "$0")/setenv.bash + delete_namespace() { - kubectl delete namespace $1-$2 + _NS=$1-$2 + kubectl delete namespace $_NS + printf "Waiting for namespace $_NS termination...\n" + while kubectl get namespaces $_NS > /dev/null 2>&1; do + sleep 2 + done + printf "Namespace $_NS deleted.\n\n" +} + +delete_registry_key() { + kubectl --namespace $1-$2 delete secret onap-docker-registry-key } delete_service() { @@ -58,23 +71,21 @@ fi if [[ ! -z "$APP" ]]; then ONAP_APPS=($APP) -else - ONAP_APPS=('sdc' 'aai' 'mso' 'message-router' 'robot' 'vid' 'sdnc' 'portal' 'policy' 'appc') fi printf "\n********** Cleaning up ONAP: ${ONAP_APPS[*]}\n" for i in ${ONAP_APPS[@]}; do + # delete the deployments + /bin/bash $i.sh $NS $i 'delete' + if [[ "$INCL_SVC" == true ]]; then printf "\nDeleting services **********\n" delete_service $NS $i delete_namespace $NS $i fi - # delete the deployments - /bin/bash $i.sh $NS $i 'delete' - done diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash new file mode 100644 index 0000000000..05a0d4760a --- /dev/null +++ b/kubernetes/oneclick/setenv.bash @@ -0,0 +1,8 @@ +#!/bin/bash + +ONAP_APPS=('sdc' 'aai' 'mso' 'message-router' 'robot' 'vid' 'sdnc' 'portal' 'policy' 'appc') +ONAP_DOCKER_REGISTRY_KEY=${ONAP_DOCKER_REGISTRY_KEY:-onap-docker-registry-key} +ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001} +ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker} +ONAP_DOCKER_PASS=${ONAP_DOCKER_PASS:-docker} +ONAP_DOCKER_MAIL=${ONAP_DOCKER_MAIL:-$USERNAME@$USERDOMAIN} diff --git a/kubernetes/policy/dep-brmsgw.yaml b/kubernetes/policy/dep-brmsgw.yaml index fc39fc3387..6758abf16a 100644 --- a/kubernetes/policy/dep-brmsgw.yaml +++ b/kubernetes/policy/dep-brmsgw.yaml @@ -61,3 +61,5 @@ spec: - name: pe hostPath: path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-drools.yaml b/kubernetes/policy/dep-drools.yaml index e32be052dc..fbc8e17601 100644 --- a/kubernetes/policy/dep-drools.yaml +++ b/kubernetes/policy/dep-drools.yaml @@ -75,3 +75,5 @@ spec: - name: drools hostPath: path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/drools/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-maria.yaml b/kubernetes/policy/dep-maria.yaml index e9f4fa2e3f..21914c8657 100644 --- a/kubernetes/policy/dep-maria.yaml +++ b/kubernetes/policy/dep-maria.yaml @@ -27,3 +27,5 @@ spec: port: 3306 initialDelaySeconds: 5 periodSeconds: 10 + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-nexus.yaml b/kubernetes/policy/dep-nexus.yaml index 78eefe3c1c..48c289e3e1 100644 --- a/kubernetes/policy/dep-nexus.yaml +++ b/kubernetes/policy/dep-nexus.yaml @@ -45,3 +45,5 @@ spec: - bash -c "/opt/nexus/nexus-2.14.2-01/bin/nexus start && sleep 1000d" image: nexus3.onap.org:10001/openecomp/policy/policy-nexus:1.0-STAGING-latest name: nexus + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-pap.yaml b/kubernetes/policy/dep-pap.yaml index 0a9d0c2150..11420da525 100644 --- a/kubernetes/policy/dep-pap.yaml +++ b/kubernetes/policy/dep-pap.yaml @@ -85,3 +85,5 @@ spec: - name: pe hostPath: path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-pdp.yaml b/kubernetes/policy/dep-pdp.yaml index e3d65d4d20..0efe5c3773 100644 --- a/kubernetes/policy/dep-pdp.yaml +++ b/kubernetes/policy/dep-pdp.yaml @@ -64,3 +64,5 @@ spec: - name: pe hostPath: path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/policy/dep-pypdp.yaml b/kubernetes/policy/dep-pypdp.yaml index 860dfb1dbb..91d71d56e8 100644 --- a/kubernetes/policy/dep-pypdp.yaml +++ b/kubernetes/policy/dep-pypdp.yaml @@ -66,3 +66,5 @@ spec: - name: pe hostPath: path: /dockerdata-nfs/onapdemo/policy/opt/policy/config/pe/ + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/portal/portal-apps-deployment.yaml b/kubernetes/portal/portal-apps-deployment.yaml index 0d39e23960..39f32caa47 100755 --- a/kubernetes/portal/portal-apps-deployment.yaml +++ b/kubernetes/portal/portal-apps-deployment.yaml @@ -130,3 +130,5 @@ spec: - name: portal-root hostPath: path: /dockerdata-nfs/onapdemo/portal + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/portal/portal-mariadb-deployment.yaml b/kubernetes/portal/portal-mariadb-deployment.yaml index f25e65bef8..f1dae14017 100755 --- a/kubernetes/portal/portal-mariadb-deployment.yaml +++ b/kubernetes/portal/portal-mariadb-deployment.yaml @@ -35,3 +35,5 @@ spec: - name: portal-mariadb-data hostPath: path: /dockerdata-nfs/onapdemo/portal/mariadb/data + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/portal/portal-vnc-dep.yaml b/kubernetes/portal/portal-vnc-dep.yaml index 3ad51cca9f..7751eeeaab 100644 --- a/kubernetes/portal/portal-vnc-dep.yaml +++ b/kubernetes/portal/portal-vnc-dep.yaml @@ -127,3 +127,5 @@ spec: volumes: - name: ubuntu-init emptyDir: {} + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/robot/robot-deployment.yaml b/kubernetes/robot/robot-deployment.yaml index a29e611e5a..ade71472fa 100644 --- a/kubernetes/robot/robot-deployment.yaml +++ b/kubernetes/robot/robot-deployment.yaml @@ -49,3 +49,5 @@ spec: - name: lighttpd-authorization hostPath: path: /dockerdata-nfs/onapdemo/robot/authorization + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdc/sdc-be.yaml b/kubernetes/sdc/sdc-be.yaml index 964a2470af..f23db779ab 100644 --- a/kubernetes/sdc/sdc-be.yaml +++ b/kubernetes/sdc/sdc-be.yaml @@ -107,3 +107,5 @@ spec: - name: sdc-logs hostPath: path: /dockerdata-nfs/onapdemo/sdc/logs + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdc/sdc-cs.yaml b/kubernetes/sdc/sdc-cs.yaml index d9857634f1..74874f9c35 100644 --- a/kubernetes/sdc/sdc-cs.yaml +++ b/kubernetes/sdc/sdc-cs.yaml @@ -82,3 +82,5 @@ spec: - name: sdc-logs hostPath: path: /dockerdata-nfs/onapdemo/sdc/logs + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdc/sdc-es.yaml b/kubernetes/sdc/sdc-es.yaml index 78577eecdd..5176b93d21 100644 --- a/kubernetes/sdc/sdc-es.yaml +++ b/kubernetes/sdc/sdc-es.yaml @@ -56,3 +56,5 @@ spec: - name: sdc-logs hostPath: path: /dockerdata-nfs/onapdemo/sdc/logs + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdc/sdc-fe.yaml b/kubernetes/sdc/sdc-fe.yaml index 9ac835021f..d984bbedb8 100644 --- a/kubernetes/sdc/sdc-fe.yaml +++ b/kubernetes/sdc/sdc-fe.yaml @@ -96,3 +96,5 @@ spec: - name: sdc-fe-config hostPath: path: /dockerdata-nfs/onapdemo/sdc/sdc-fe/FE_2_setup_configuration.rb + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdc/sdc-kb.yaml b/kubernetes/sdc/sdc-kb.yaml index d39386b77b..b79f4ca17b 100644 --- a/kubernetes/sdc/sdc-kb.yaml +++ b/kubernetes/sdc/sdc-kb.yaml @@ -74,3 +74,5 @@ spec: - name: sdc-logs hostPath: path: /dockerdata-nfs/onapdemo/sdc/logs + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdnc/db-deployment.yaml b/kubernetes/sdnc/db-deployment.yaml index bb8fda5190..685edec242 100644 --- a/kubernetes/sdnc/db-deployment.yaml +++ b/kubernetes/sdnc/db-deployment.yaml @@ -34,3 +34,5 @@ spec: - name: sdnc-data hostPath: path: /dockerdata-nfs/onapdemo/sdnc/data + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdnc/dgbuilder-deployment.yaml b/kubernetes/sdnc/dgbuilder-deployment.yaml index 2e6c9a5ffc..13781ff939 100644 --- a/kubernetes/sdnc/dgbuilder-deployment.yaml +++ b/kubernetes/sdnc/dgbuilder-deployment.yaml @@ -60,3 +60,5 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 restartPolicy: Always + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdnc/sdnc-deployment.yaml b/kubernetes/sdnc/sdnc-deployment.yaml index 50121bebb3..0dc48393e4 100644 --- a/kubernetes/sdnc/sdnc-deployment.yaml +++ b/kubernetes/sdnc/sdnc-deployment.yaml @@ -62,3 +62,5 @@ spec: - name: sdnc-conf hostPath: path: /dockerdata-nfs/onapdemo/sdnc/conf + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/sdnc/web-deployment.yaml b/kubernetes/sdnc/web-deployment.yaml index d1edb6f128..36df93beea 100644 --- a/kubernetes/sdnc/web-deployment.yaml +++ b/kubernetes/sdnc/web-deployment.yaml @@ -60,3 +60,5 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 restartPolicy: Always + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/vid/vid-mariadb-deployment.yaml b/kubernetes/vid/vid-mariadb-deployment.yaml index f2e7927bef..93a798a04d 100644 --- a/kubernetes/vid/vid-mariadb-deployment.yaml +++ b/kubernetes/vid/vid-mariadb-deployment.yaml @@ -50,3 +50,5 @@ spec: - name: my-cnf hostPath: path: /dockerdata-nfs/onapdemo/vid/vid/lf_config/vid-my.cnf + imagePullSecrets: + - name: onap-docker-registry-key diff --git a/kubernetes/vid/vid-server-deployment.yaml b/kubernetes/vid/vid-server-deployment.yaml index b6321d8dd0..1e6e9de80d 100644 --- a/kubernetes/vid/vid-server-deployment.yaml +++ b/kubernetes/vid/vid-server-deployment.yaml @@ -91,3 +91,5 @@ spec: port: 8080 initialDelaySeconds: 5 periodSeconds: 10 + imagePullSecrets: + - name: onap-docker-registry-key |