Skip to content

Commit

Permalink
Fix directory locations in install guides (#176)
Browse files Browse the repository at this point in the history
- Moves `popd` out of Terraform directory to after the last Terraform command.
- Create dynamic facts after moving to the tenant repo.
  • Loading branch information
bastjan authored Apr 13, 2022
1 parent c4574af commit a98f774
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
2 changes: 2 additions & 0 deletions docs/modules/ROOT/partials/install/bootstrap-nodes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ endif::[]
----
rm override.tf
terraform apply

popd
----

. Approve worker certs
Expand Down
1 change: 0 additions & 1 deletion docs/modules/ROOT/partials/install/finalize_part1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,5 @@ You can find the password in the file `target/auth/kubeadmin-password` and the k
+
[source,bash]
----
popd
ls -l ${INSTALLER_DIR}/auth/
----
42 changes: 21 additions & 21 deletions docs/modules/ROOT/partials/install/prepare-terraform.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@
TEAM=<team-name>
----

. Bootstrap dynamic facts
+
[source,bash,subs="attributes+"]
----
yq eval -i ".parameters.dynamic_facts.kubernetesVersion.major = \"$(echo "{k8s-minor-version}" | awk -F. '{print $1}')\"" \
${CLUSTER_ID}.yml
yq eval -i ".parameters.dynamic_facts.kubernetesVersion.minor = \"$(echo "{k8s-minor-version}" | awk -F. '{print $2}')\"" \
${CLUSTER_ID}.yml

yq eval -i ".parameters.dynamic_facts.openshiftVersion.Major = \"$(echo "{ocp-minor-version}" | awk -F. '{print $1}')\"" \
${CLUSTER_ID}.yml
yq eval -i ".parameters.dynamic_facts.openshiftVersion.Minor = \"$(echo "{ocp-minor-version}" | awk -F. '{print $2}')\"" \
${CLUSTER_ID}.yml
----
+
[NOTE]
--
Some components rely on dynamic facts fetched from the cluster at runtime.
Those facts aren't available before Steward is installed on the cluster.
--

. Prepare Terraform cluster config
+
[source,bash,subs="attributes+"]
Expand Down Expand Up @@ -101,3 +80,24 @@ yq eval -i ".parameters.openshift4_terraform.gitlab_ci.git.username = \"GitLab C
yq eval -i ".parameters.openshift4_terraform.gitlab_ci.git.email = \"tech+${CLUSTER_ID}@vshn.ch\"" \
${CLUSTER_ID}.yml
----

. Bootstrap dynamic facts
+
[NOTE]
--
Some components rely on dynamic facts fetched from the cluster at runtime.
Those facts aren't available before Steward is installed on the cluster.
--
+
[source,bash,subs="attributes+"]
----
yq eval -i ".parameters.dynamic_facts.kubernetesVersion.major = \"$(echo "{k8s-minor-version}" | awk -F. '{print $1}')\"" \
${CLUSTER_ID}.yml
yq eval -i ".parameters.dynamic_facts.kubernetesVersion.minor = \"$(echo "{k8s-minor-version}" | awk -F. '{print $2}')\"" \
${CLUSTER_ID}.yml

yq eval -i ".parameters.dynamic_facts.openshiftVersion.Major = \"$(echo "{ocp-minor-version}" | awk -F. '{print $1}')\"" \
${CLUSTER_ID}.yml
yq eval -i ".parameters.dynamic_facts.openshiftVersion.Minor = \"$(echo "{ocp-minor-version}" | awk -F. '{print $2}')\"" \
${CLUSTER_ID}.yml
----

0 comments on commit a98f774

Please sign in to comment.