-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add GCP UPI install docs #17043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add GCP UPI install docs #17043
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
84 changes: 84 additions & 0 deletions
84
installing/installing_gcp_user_infra/installing-gcp-user-infra.adoc
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| [id="installing-gcp-user-infra"] | ||
| = Installing a cluster on GCP using Deployment Manager templates | ||
| include::modules/common-attributes.adoc[] | ||
| :context: installing-gcp-user-infra | ||
|
|
||
| toc::[] | ||
|
|
||
| In {product-title} version {product-version}, you can install a cluster on | ||
| Google Cloud Platform (GCP) by using infrastructure that you provide. | ||
|
|
||
| The steps for performing a user-provided infrastructure install are outlined here. Several | ||
| link:https://cloud.google.com/deployment-manager/docs[Deployment Manager] templates are provided to assist in | ||
| completing these steps or to help model your own. You are also free to create | ||
| the required resources through other methods; the templates are just an | ||
| example. | ||
|
|
||
| [id="installation-gcp-user-infra-config-project"] | ||
| == Configuring your GCP project | ||
|
|
||
| Before you can install {product-title}, you must configure a Google Cloud | ||
| Platform (GCP) project to host it. | ||
|
|
||
| include::modules/installation-gcp-dns.adoc[leveloffset=+2] | ||
| include::modules/installation-gcp-limits.adoc[leveloffset=+2] | ||
| include::modules/installation-gcp-service-account.adoc[leveloffset=+2] | ||
| include::modules/installation-gcp-permissions.adoc[leveloffset=+3] | ||
| include::modules/installation-gcp-enabling-api-services.adoc[leveloffset=+2] | ||
| include::modules/installation-gcp-regions.adoc[leveloffset=+2] | ||
| include::modules/installation-gcp-install-cli.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-user-infra-generate.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/installation-initializing.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-configure-proxy.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-user-infra-generate-k8s-manifest-ignition.adoc[leveloffset=+2] | ||
| .Additional resources | ||
|
|
||
| * xref:../../installing/installing_gcp_user_infra/installing-gcp-user-infra.adoc#installation-gcp-user-infra-adding-ingress_installing-gcp-user-infra[Optional: Adding the ingress DNS records] | ||
|
|
||
| [id="installation-gcp-user-infra-exporting-common-variables"] | ||
| == Exporting common variables | ||
|
|
||
| include::modules/installation-extracting-infraid.adoc[leveloffset=+2] | ||
| include::modules/installation-user-infra-exporting-common-variables.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-creating-gcp-vpc.adoc[leveloffset=+1] | ||
| include::modules/installation-deployment-manager-vpc.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-creating-gcp-dns.adoc[leveloffset=+1] | ||
| include::modules/installation-deployment-manager-dns.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-creating-gcp-security.adoc[leveloffset=+1] | ||
| include::modules/installation-deployment-manager-security.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-gcp-user-infra-rhcos.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/installation-creating-gcp-bootstrap.adoc[leveloffset=+1] | ||
| include::modules/installation-deployment-manager-bootstrap.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-creating-gcp-control-plane.adoc[leveloffset=+1] | ||
| include::modules/installation-deployment-manager-control-plane.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/installation-gcp-user-infra-wait-for-bootstrap.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/installation-creating-gcp-worker.adoc[leveloffset=+1] | ||
| include::modules/installation-deployment-manager-worker.adoc[leveloffset=+2] | ||
|
|
||
| include::modules/cli-installing-cli.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/cli-logging-in-kubeadmin.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/installation-approve-csrs.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/installation-gcp-user-infra-adding-ingress.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/installation-gcp-user-infra-completing.adoc[leveloffset=+1] | ||
|
|
||
| .Next steps | ||
|
|
||
| * xref:../../installing/install_config/customizations.adoc#customizations[Customize your cluster]. | ||
| * If necessary, you can | ||
| xref:../../support/remote_health_monitoring/opting-out-of-remote-health-reporting.adoc#opting-out-remote-health-reporting_opting-out-remote-health-reporting[opt out of remote health reporting]. | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * installing/installing_gcp_user_infra/installing-gcp-user-infra.adoc | ||
|
|
||
| [id="installation-creating-gcp-bootstrap_{context}"] | ||
| = Creating the bootstrap machine in GCP | ||
|
|
||
| You must create the bootstrap machine in Google Cloud Platform (GCP) to use during | ||
| {product-title} cluster initialization. One way to create this machine is | ||
| to modify the provided Deployment Manager template. | ||
adellape marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [NOTE] | ||
| ==== | ||
| If you do not use the provided Deployment Manager template to create your bootstrap | ||
| machine, you must review the provided information and manually create | ||
| the infrastructure. If your cluster does not initialize correctly, you might | ||
| have to contact Red Hat support with your installation logs. | ||
| ==== | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * Configure a GCP account. | ||
| * Generate the Ignition config files for your cluster. | ||
| * Create and configure a VPC and assocated subnets in GCP. | ||
| * Create and configure networking and load balancers in GCP. | ||
| * Create control plane and compute roles. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Copy the template from the *Deployment Manager template for the bootstrap machine* | ||
| section of this topic and save it as `04_bootstrap.py` on your computer. This | ||
| template describes the bootstrap machine that your cluster requires. | ||
|
|
||
| . Export the following variables required by the resource definition: | ||
| + | ||
| ---- | ||
| $ export CONTROL_SUBNET=`gcloud compute networks subnets describe ${INFRA_ID}-master-subnet --region=${REGION} --format json | jq -r .selfLink` | ||
| $ export CLUSTER_IMAGE=`gcloud compute images describe ${INFRA_ID}-rhcos-image --format json | jq -r .selfLink` | ||
| $ export ZONE_0=`gcloud compute regions describe ${REGION} --format=json | jq -r .zones[0] | cut -d "/" -f9` | ||
| $ export ZONE_1=`gcloud compute regions describe ${REGION} --format=json | jq -r .zones[1] | cut -d "/" -f9` | ||
| $ export ZONE_2=`gcloud compute regions describe ${REGION} --format=json | jq -r .zones[2] | cut -d "/" -f9` | ||
| ---- | ||
|
|
||
| . Create a bucket and upload the `bootstrap.ign` file: | ||
| + | ||
| ---- | ||
| $ gsutil mb gs://${INFRA_ID}-bootstrap-ignition | ||
| $ gsutil cp bootstrap.ign gs://${INFRA_ID}-bootstrap-ignition/ | ||
| ---- | ||
|
|
||
| . Create a signed URL for the bootstrap instance to use to access the Ignition | ||
| config. Export the URL from the output as a variable: | ||
| + | ||
| ---- | ||
| $ export BOOTSTRAP_IGN=`gsutil signurl -d 1h service-account-key.json \ | ||
| gs://${INFRA_ID}-bootstrap-ignition/bootstrap.ign | grep "^gs:" | awk '{print $5}'` | ||
adellape marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ---- | ||
|
|
||
| . Create a `04_bootstrap.yaml` resource definition file: | ||
| + | ||
| ---- | ||
| $ cat <<EOF >04_bootstrap.yaml | ||
| imports: | ||
| - path: 04_bootstrap.py | ||
|
|
||
| resources: | ||
| - name: cluster-bootstrap | ||
| type: 04_bootstrap.py | ||
| properties: | ||
| infra_id: '${INFRA_ID}' <1> | ||
| region: '${REGION}' <2> | ||
| zone: '${ZONE_0}' <3> | ||
|
|
||
| cluster_network: '${CLUSTER_NETWORK}' <4> | ||
| control_subnet: '${CONTROL_SUBNET}' <5> | ||
| image: '${CLUSTER_IMAGE}' <6> | ||
| machine_type: 'n1-standard-4' <7> | ||
| root_volume_size: '128' <8> | ||
|
|
||
| bootstrap_ign: '${BOOTSTRAP_IGN}' <9> | ||
| EOF | ||
| ---- | ||
| <1> `infra_id` is the `INFRA_ID` infrastructure name from the extraction step. | ||
| <2> `region` is the region to deploy the cluster into, for example `us-east1`. | ||
| <3> `zone` is the zone to deploy the bootstrap instance into, for example `us-east1-b`. | ||
| <4> `cluster_network` is the `selfLink` URL to the cluster network. | ||
| <5> `control_subnet` is the `selfLink` URL to the control subnet. | ||
| <6> `image` is the `selfLink` URL to the {op-system} image. | ||
| <7> `machine_type` is the machine type of the instance, for example `n1-standard-4`. | ||
| <8> `bootstrap_ign` is the URL output when creating a signed URL above. | ||
|
|
||
| . Create the deployment by using the `gcloud` CLI: | ||
| + | ||
| ---- | ||
| $ gcloud deployment-manager deployments create ${INFRA_ID}-bootstrap --config 04_bootstrap.yaml | ||
| ---- | ||
|
|
||
| . The templates do not manage load balancer membership due to limitations of Deployment | ||
| Manager, so you must add the bootstrap machine manually: | ||
| + | ||
| ---- | ||
| $ gcloud compute target-pools add-instances \ | ||
| ${INFRA_ID}-api-target-pool --instances-zone="${ZONE_0}" --instances=${INFRA_ID}-bootstrap | ||
| $ gcloud compute target-pools add-instances \ | ||
| ${INFRA_ID}-ign-target-pool --instances-zone="${ZONE_0}" --instances=${INFRA_ID}-bootstrap | ||
| ---- | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.