aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorzhulingjie <easyzlj@gmail.com>2018-06-08 11:50:29 -0400
committerzhulingjie <easyzlj@gmail.com>2018-06-08 12:04:28 -0400
commit5404239dfc1689465eb4f42c6b59a7ff9028d1e6 (patch)
tree3d31b009739bb8e607b92fa3e98e6498ecd7b91d /docker
parent91f5cca1863bb54695774a892c83ccb2ffaf9006 (diff)
downloadkolla-5404239dfc1689465eb4f42c6b59a7ff9028d1e6.tar.gz
kolla-5404239dfc1689465eb4f42c6b59a7ff9028d1e6.zip
Remove the unused kolla_kubernetes script from keystone
Change-Id: I9eda6e6279ff70598d4d20487edcb682121fd54d
Diffstat (limited to 'docker')
-rw-r--r--docker/keystone/keystone/extend_start.sh18
-rw-r--r--docker/keystone/keystone/keystone_bootstrap.sh18
2 files changed, 0 insertions, 36 deletions
diff --git a/docker/keystone/keystone/extend_start.sh b/docker/keystone/keystone/extend_start.sh
index 8802dd9d5..0d8d3bc43 100644
--- a/docker/keystone/keystone/extend_start.sh
+++ b/docker/keystone/keystone/extend_start.sh
@@ -1,16 +1,5 @@
#!/bin/bash
-function kolla_kubernetes {
- KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token)
- bootstrap_url=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT/api/v1/namespaces/default/pods | grep /api/v1/namespaces/default/pods/keystone-bootstrap | cut -d '"' -f 4) || true
- KEYSTONE_BOOTSTRAPPED=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT$bootstrap_url | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["status"]["phase"]') || KEYSTONE_BOOTSTRAPPED='Succeeded'
-
- if [[ "$KEYSTONE_BOOTSTRAPPED" != "Succeeded" ]]; then
- echo "Keystone bootstrapping isn't complete"
- exit 1
- fi
-}
-
# NOTE(pbourke): httpd will not clean up after itself in some cases which
# results in the container not being able to restart. (bug #1489676, 1557036)
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
@@ -67,10 +56,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
fi
ARGS="-DFOREGROUND"
-
-#***** KOLLA-KUBERNETES *****
-# TODO: Add a kolla_kubernetes script at build time when templating is complete
-if [[ "${!KOLLA_KUBERNETES[@]}" ]]; then
- kolla_kubernetes
-fi
-#***** KOLLA-KUBERNETES *****
diff --git a/docker/keystone/keystone/keystone_bootstrap.sh b/docker/keystone/keystone/keystone_bootstrap.sh
index 803cb46aa..c140e97c7 100644
--- a/docker/keystone/keystone/keystone_bootstrap.sh
+++ b/docker/keystone/keystone/keystone_bootstrap.sh
@@ -28,24 +28,6 @@ function exit_json {
echo '{"failed": false, "changed": '"${changed}"'}'
}
-function kolla_kubernetes {
- KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token)
- bootstrap_url=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT/api/v1/namespaces/default/pods | grep /api/v1/namespaces/default/pods/keystone-bootstrap | cut -d '"' -f 4) || true
- KEYSTONE_BOOTSTRAPPED=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT$bootstrap_url | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["status"]["phase"]') || KEYSTONE_BOOTSTRAPPED='Succeeded'
-
- if [[ "$KEYSTONE_BOOTSTRAPPED" != "Succeeded" ]]; then
- echo "Keystone bootstrapping isn't complete"
- exit 1
- fi
-}
-
-#***** KOLLA-KUBERNETES *****
-# TODO: Add a kolla_kubernetes script at build time when templating is complete
-if [[ "${!KOLLA_KUBERNETES[@]}" ]]; then
- kolla_kubernetes
-fi
-#***** KOLLA-KUBERNETES *****
-
changed="false"
keystone_bootstrap=$(keystone-manage bootstrap --bootstrap-username "${USERNAME}" --bootstrap-password "${PASSWORD}" --bootstrap-project-name "${PROJECT}" --bootstrap-role-name "${ROLE}" --bootstrap-admin-url "${ADMIN_URL}" --bootstrap-internal-url "${INTERNAL_URL}" --bootstrap-public-url "${PUBLIC_URL}" --bootstrap-service-name "keystone" --bootstrap-region-id "${REGION}" 2>&1)
if [[ $? != 0 ]]; then