summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-14 11:32:08 +0000
committerGerrit Code Review <review@openstack.org>2018-06-14 11:32:08 +0000
commitb4ff157327e27ce18cc728e1c1e4a8b4872d8b31 (patch)
tree9e1876a9a47ab88704e1f8276b93d37f305c8af6
parent139dfefe90f7771e6fcb797b14b1640150d1c2eb (diff)
parent5404239dfc1689465eb4f42c6b59a7ff9028d1e6 (diff)
Merge "Remove the unused kolla_kubernetes script from keystone"
-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 8802dd9..0d8d3bc 100644
--- a/docker/keystone/keystone/extend_start.sh
+++ b/docker/keystone/keystone/extend_start.sh
@@ -1,16 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2 2
3function kolla_kubernetes {
4 KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token)
5 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
6 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'
7
8 if [[ "$KEYSTONE_BOOTSTRAPPED" != "Succeeded" ]]; then
9 echo "Keystone bootstrapping isn't complete"
10 exit 1
11 fi
12}
13
14# NOTE(pbourke): httpd will not clean up after itself in some cases which 3# NOTE(pbourke): httpd will not clean up after itself in some cases which
15# results in the container not being able to restart. (bug #1489676, 1557036) 4# results in the container not being able to restart. (bug #1489676, 1557036)
16if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then 5if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
@@ -67,10 +56,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
67fi 56fi
68 57
69ARGS="-DFOREGROUND" 58ARGS="-DFOREGROUND"
70
71#***** KOLLA-KUBERNETES *****
72# TODO: Add a kolla_kubernetes script at build time when templating is complete
73if [[ "${!KOLLA_KUBERNETES[@]}" ]]; then
74 kolla_kubernetes
75fi
76#***** KOLLA-KUBERNETES *****
diff --git a/docker/keystone/keystone/keystone_bootstrap.sh b/docker/keystone/keystone/keystone_bootstrap.sh
index 803cb46..c140e97 100644
--- a/docker/keystone/keystone/keystone_bootstrap.sh
+++ b/docker/keystone/keystone/keystone_bootstrap.sh
@@ -28,24 +28,6 @@ function exit_json {
28 echo '{"failed": false, "changed": '"${changed}"'}' 28 echo '{"failed": false, "changed": '"${changed}"'}'
29} 29}
30 30
31function kolla_kubernetes {
32 KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token)
33 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
34 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'
35
36 if [[ "$KEYSTONE_BOOTSTRAPPED" != "Succeeded" ]]; then
37 echo "Keystone bootstrapping isn't complete"
38 exit 1
39 fi
40}
41
42#***** KOLLA-KUBERNETES *****
43# TODO: Add a kolla_kubernetes script at build time when templating is complete
44if [[ "${!KOLLA_KUBERNETES[@]}" ]]; then
45 kolla_kubernetes
46fi
47#***** KOLLA-KUBERNETES *****
48
49changed="false" 31changed="false"
50keystone_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) 32keystone_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)
51if [[ $? != 0 ]]; then 33if [[ $? != 0 ]]; then