Skip to content

Commit ddf5f9c

Browse files
authored
Merge pull request #52170 from bscott-rh/OSDOCS-4341
OSDOCS-4341 GCP: Authenticate using Service Account on a GCP VM
2 parents 4c6ad0a + 61236e2 commit ddf5f9c

6 files changed

+17
-23
lines changed

installing/installing_gcp/installing-gcp-account.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ include::modules/installation-gcp-limits.adoc[leveloffset=+1]
1919

2020
include::modules/installation-gcp-service-account.adoc[leveloffset=+1]
2121

22+
[role="_additional-resources"]
23+
.Additional resources
24+
25+
* See xref:../../installing/installing_gcp/manually-creating-iam-gcp.adoc#manually-create-iam_manually-creating-iam-gcp[Manually creating IAM] for more details about using manual credentials mode.
26+
2227
include::modules/installation-gcp-permissions.adoc[leveloffset=+2]
2328

2429
include::modules/installation-gcp-regions.adoc[leveloffset=+1]

modules/installation-gcp-limits.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ the bootstrap process and are removed after the cluster deploys.
3737
|Resources removed after bootstrap
3838

3939
ifeval::["{context}" == "installing-gcp-account"]
40-
|Service account |IAM |Global |5 |0
40+
|Service account |IAM |Global |6 |1
4141
|Firewall rules |Compute |Global |11 |1
4242
|Forwarding rules |Compute |Global |2 |0
4343
|In-use global IP addresses |Compute |Global |4 |1
@@ -54,7 +54,7 @@ ifeval::["{context}" == "installing-gcp-account"]
5454
endif::[]
5555

5656
ifdef::template[]
57-
|Service account |IAM |Global |5 |0
57+
|Service account |IAM |Global |6 |1
5858
|Firewall rules |Networking |Global |11 |1
5959
|Forwarding rules |Compute |Global |2 |0
6060
// |In-use IP addresses global |Networking |Global |4 |1

modules/installation-gcp-service-account.adoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ See link:https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#gr
3030
While making the service account an owner of the project is the easiest way to gain the required permissions, it means that service account has complete control over the project. You must determine if the risk that comes from offering that power is acceptable.
3131
====
3232

33-
. Create the service account key in JSON format.
34-
See link:https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys[Creating service account keys]
35-
in the GCP documentation.
33+
. You can create the service account key in JSON format, or attach the service account to a GCP virtual machine.
34+
See link:https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys[Creating service account keys] and link:https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances[Creating and enabling service accounts for instances] in the GCP documentation.
35+
+
36+
You must have a service account key or a virtual machine with an attached service account to create the cluster.
3637
+
37-
The service account key is required to create a cluster.
38+
[NOTE]
39+
====
40+
If you use a virtual machine with an attached service account to create your cluster, you must set `credentialsMode: Manual` in the `install-config.yaml` file before installation.
41+
====

modules/installation-launching-installer.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ endif::azure,ash[]
348348
ifdef::gcp[]
349349
.. Select *gcp* as the platform to target.
350350
.. If you have not configured the service account key for your GCP account on
351-
your computer, you must obtain it from GCP and paste the contents of the file
351+
your host, you must obtain it from GCP and paste the contents of the file
352352
or enter the absolute path to the file.
353353
.. Select the project ID to provision the cluster in. The default value is
354354
specified by the service account that you configured.

modules/installation-obtaining-installer.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ the mirror host.
7777
endif::restricted[]
7878
ifndef::restricted[]
7979
ifdef::ibm-z,ibm-z-kvm[ your provisioning machine.]
80-
ifndef::ibm-z,ibm-z-kvm,private[ a local computer.]
80+
ifndef::ibm-z,ibm-z-kvm,private[ the host you are using for installation.]
8181
ifdef::private[]
8282
a bastion host on your cloud network or a machine that has access to the to the network through a VPN.
8383

modules/ssh-agent-using.adoc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -229,21 +229,6 @@ $ ssh-add <path>/<file_name> <1>
229229
Identity added: /home/<you>/<path>/<file_name> (<computer_name>)
230230
----
231231

232-
ifdef::gcp[]
233-
. Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the full path to your service account private key file.
234-
+
235-
[source,terminal]
236-
----
237-
$ export GOOGLE_APPLICATION_CREDENTIALS="<your_service_account_file>"
238-
----
239-
. Verify that the credentials were applied.
240-
+
241-
[source,terminal]
242-
----
243-
$ gcloud auth list
244-
----
245-
endif::gcp[]
246-
247232
.Next steps
248233

249234
* When you install {product-title}, provide the SSH public key to the installation program.

0 commit comments

Comments
 (0)