Skip to content
Merged
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
30 changes: 2 additions & 28 deletions guides/common/modules/proc_adding-a-google-gce-connection.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,12 @@ For more information, see https://cloud.google.com/iam/docs/creating-managing-se
.CLI procedure
. In Google GCE, generate a service account key in JSON format.
For more information, see https://cloud.google.com/iam/docs/creating-managing-service-account-keys[Create and manage service account keys] in the GCE documentation.
. Copy the file from your local machine to {ProjectServer}:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# scp _My_GCE_Key_.json root@{foreman-example-com}:/etc/foreman/_My_GCE_Key_.json
----
. On {ProjectServer}, change the owner for your service account key to the `foreman` user:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# chown root:foreman /etc/foreman/_My_GCE_Key_.json
----
. On {ProjectServer}, configure permissions for your service account key to ensure that the file is readable:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# chmod 0640 /etc/foreman/_My_GCE_Key_.json
----
ifndef::foreman-deb[]
. On {ProjectServer}, restore SELinux context for your service account key:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# restorecon -vv /etc/foreman/_My_GCE_Key_.json
----
endif::[]
. Use the `hammer compute-resource create` command to add a GCE compute resource to {Project}:
+
[options="nowrap" subs="+quotes"]
----
$ hammer compute-resource create \
--key-path "/etc/foreman/_My_GCE_Key_.json" \
# hammer compute-resource create \
--key-path "_My_GCE_Key_.json" \
--name "_My_GCE_Compute_Resource_" \
--provider "gce" \
--zone "_My_Zone_"
Expand Down
Loading