Created
June 11, 2019 05:03
-
-
Save beekhof/7d0a9d61aedf8657594573f54ed19dfe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 5ed03647285915b8fcd0e41df6ff14b3f6079848 | |
Author: Andrew Beekhof <[email protected]> | |
Date: Tue Jun 11 01:02:27 2019 -0400 | |
Beginnings of etcd provisioning on the bootstrap node | |
Signed-off-by: Andrew Beekhof <[email protected]> | |
diff --git a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template | |
index ecb30c8..a57992e 100755 | |
--- a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template | |
+++ b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template | |
@@ -1,5 +1,5 @@ | |
#!/usr/bin/env bash | |
-set -e | |
+set -ex | |
mkdir --parents /etc/kubernetes/{manifests,bootstrap-configs,bootstrap-manifests} | |
@@ -23,6 +23,7 @@ MACHINE_CONFIG_DAEMON_IMAGE=$(podman run --quiet --rm ${release} image machine-c | |
MACHINE_CONFIG_OSCONTENT=$(podman run --quiet --rm ${release} image machine-os-content) | |
MACHINE_CONFIG_ETCD_IMAGE=$(podman run --quiet --rm ${release} image etcd) | |
MACHINE_CONFIG_SETUP_ETCD_ENV_IMAGE=$(podman run --quiet --rm ${release} image setup-etcd-environment) | |
+MACHINE_CONFIG_ETCD_OPERATOR_IMAGE=$(podman run --rm ${release} image cluster-etcd-operator) | |
MACHINE_CONFIG_KUBE_CLIENT_AGENT_IMAGE=$(podman run --quiet --rm ${release} image kube-client-agent) | |
MACHINE_CONFIG_INFRA_IMAGE=$(podman run --quiet --rm ${release} image pod) | |
@@ -52,6 +53,33 @@ systemctl restart cri-o.service | |
mkdir --parents ./{bootstrap-manifests,manifests} | |
+if [ ! -d etcd-bootstrap.done ] | |
+then | |
+ echo "Rendering etcd Operator Manifests..." | |
+ rm -rf etcd-bootstrap | |
+ #ls -al /opt/openshift/tls | |
+ podman run \ | |
+ --quiet \ | |
+ --volume "$PWD:/assets:z" \ | |
+ "${MACHINE_CONFIG_ETCD_OPERATOR_IMAGE}" \ | |
+ /usr/bin/cluster-etcd-operator render \ | |
+ --etcd-ca=/assets/tls/etcd-ca-bundle.crt \ | |
+ --etcd-metric-ca=/assets/tls/etcd-metric-ca-bundle.crt \ | |
+ --manifest-etcd-image "${MACHINE_CONFIG_ETCD_IMAGE}" \ | |
+ --etcd-discovery-domain "sbatsche.hexfusion.local" \ | |
+ --manifest-setup-etcd-env-image "${MACHINE_CONFIG_SETUP_ETCD_ENV_IMAGE}" \ | |
+ --manifest-image-pull-policy "TEST" \ | |
+ --manifest-kube-client-agent-image "${MACHINE_CONFIG_KUBE_CLIENT_AGENT_IMAGE}" \ | |
+ --asset-input-dir /assets/tls \ | |
+ --asset-output-dir /assets/etcd-bootstrap \ | |
+ --config-output-file /assets/etcd-bootstrap/config | |
+ | |
+ cp etcd-bootstrap/bootstrap/* bootstrap-manifests/ | |
+ cp etcd-bootstrap/manifests/* manifests/ | |
+ touch etcd-bootstra.done | |
+fi | |
+ | |
+ | |
if [ ! -f cvo-bootstrap.done ] | |
then | |
echo "Rendering Cluster Version Operator Manifests..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment