Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ Topics:
Topics:
- Name: Installing a cluster on AWS using CloudFormation templates
File: installing-aws-user-infra
- Name: Installing on user-provisioned GCP
Dir: installing_gcp_user_infra
Topics:
- Name: Installing a cluster on GCP using Deployment Manager templates
File: installing-gcp-user-infra
- Name: Installing on bare metal
Dir: installing_bare_metal
Topics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include::modules/common-attributes.adoc[]
toc::[]

In {product-title} version {product-version}, you can install a
cluster on Amazon Web Services (AWS) using infrastructure that you provide.
cluster on Amazon Web Services (AWS) by using infrastructure that you provide.

One way to create this infrastructure is to use the provided
CloudFormation templates. You can modify the templates to customize your
Expand Down Expand Up @@ -53,13 +53,13 @@ include::modules/installation-obtaining-installer.adoc[leveloffset=+1]

include::modules/ssh-agent-using.adoc[leveloffset=+1]

include::modules/installation-generate-aws-user-infra.adoc[leveloffset=+1]
include::modules/installation-user-infra-generate.adoc[leveloffset=+1]

include::modules/installation-generate-aws-user-infra-install-config.adoc[leveloffset=+2]

include::modules/installation-configure-proxy.adoc[leveloffset=+2]

include::modules/installation-generate-aws-user-infra-ignition.adoc[leveloffset=+2]
include::modules/installation-user-infra-generate-k8s-manifest-ignition.adoc[leveloffset=+2]

include::modules/installation-extracting-infraid.adoc[leveloffset=+1]

Expand Down
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].
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ include::modules/installation-aws-permissions.adoc[leveloffset=+2]

include::modules/ssh-agent-using.adoc[leveloffset=+1]

include::modules/installation-generate-aws-user-infra.adoc[leveloffset=+1]
include::modules/installation-user-infra-generate.adoc[leveloffset=+1]

include::modules/installation-generate-aws-user-infra-install-config.adoc[leveloffset=+2]

include::modules/installation-configure-proxy.adoc[leveloffset=+2]

include::modules/installation-generate-aws-user-infra-ignition.adoc[leveloffset=+2]
include::modules/installation-user-infra-generate-k8s-manifest-ignition.adoc[leveloffset=+2]

include::modules/installation-extracting-infraid.adoc[leveloffset=+1]

Expand Down
1 change: 1 addition & 0 deletions modules/cli-installing-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// * installing/installing_bare_metal/installing-bare-metal.adoc
// * installing/installing_gcp/installing-gcp-customizations.adoc
// * installing/installing_gcp/installing-gcp-default.adoc
// * installing/installing_gcp_user_infra/installing-gcp-user-infra.adoc
// * installing/installing_restricted_networks/installing-restricted-networks-preparations.adoc
// * installing/installing_vsphere/installing-vsphere.adoc
//
Expand Down
16 changes: 4 additions & 12 deletions modules/cli-logging-in-kubeadmin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// * installing/installing_bare_metal/installing-bare-metal.adoc
// * installing/installing_gcp/installing-gcp-customizations.adoc
// * installing/installing_gcp/installing-gcp-default.adoc
// * installing/installing_gcp_user_infra/installing-gcp-user-infra.adoc
// * installing/installing_openstack/installing-openstack-installer-custom.adoc
// * installing/installing_openstack/installing-openstack-installer-kuryr.adoc
// * installing/installing_openstack/installing-openstack-installer.adoc
Expand All @@ -35,22 +36,13 @@ The file is specific to a cluster and is created during {product-title} installa
+
----
$ export KUBECONFIG=<installation_directory>/auth/kubeconfig <1>

$ oc whoami
system:admin
----
<1> For `<installation_directory>`, specify the path to the directory that you stored
the installation files in.

////
. Log in to the `oc` CLI:
. Verify you can run `oc` commands successfully using the exported configuration:
+
----
$ oc login
$ oc whoami
system:admin
----
+
Specify `kubeadmin` as the user and the password that displayed when the
installation process completed. If you no longer have the password for the `kubeadmin`
user, it is also listed in the `.openshift_install.log` file in your
installation directory.
////
1 change: 1 addition & 0 deletions modules/installation-approve-csrs.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Module included in the following assemblies:
//
// * installing/installing_aws_user_infra/installing-aws-user-infra.adoc
// * installing/installing_gcp_user_infra/installing-gcp-user-infra.adoc
// * installing/installing_bare_metal/installing-bare-metal.adoc
// * installing/installing_restricted_networks/installing-restricted-networks-aws.adoc
// * installing/installing_restricted_networks/installing-restricted-networks-bare-metal.adoc
Expand Down
2 changes: 1 addition & 1 deletion modules/installation-configure-proxy.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Module included in the following assemblies:
//
// * installing/installing_aws_user_infra/installing-aws-user-infra.adoc
// * installing/installing_bare_metal/installing-bare-metal.adoc
// * installing/installing_gcp_user_infra/installing-gcp-user-infra.adoc
// * installing/installing_bare_metal/installing-bare-metal.adoc
// * installing/installing_restricted_networks/installing-restricted-networks-aws.adoc
// * installing/installing_restricted_networks/installing-restricted-networks-bare-metal.adoc
// * installing/installing_restricted_networks/installing-restricted-networks-vsphere.adoc
Expand Down
106 changes: 106 additions & 0 deletions modules/installation-creating-gcp-bootstrap.adoc
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.

[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}'`
----

. 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
----
Loading