Skip to content
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

provisioning/gcp: add line breaks and ZONE info #638

Merged
merged 1 commit into from
Apr 29, 2024
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
20 changes: 15 additions & 5 deletions modules/ROOT/pages/provisioning-gcp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ You can inspect the current state of an image family as follows:
[source, bash]
----
STREAM='stable'
gcloud compute images describe-from-family --project "fedora-coreos-cloud" "fedora-coreos-${STREAM}"
gcloud compute images describe-from-family \
--project "fedora-coreos-cloud" "fedora-coreos-${STREAM}"
----

== Launching a VM instance
Expand All @@ -45,8 +46,12 @@ NOTE: Currently, we don't support logging in using SSH through the GCP web conso
[source, bash]
----
STREAM='stable'
VM_NAME='fcos-node01'
gcloud compute instances create --image-project "fedora-coreos-cloud" --image-family "fedora-coreos-${STREAM}" "${VM_NAME}"
NAME='fcos-node01'
ZONE='us-central-1a'
gcloud compute instances create \
--image-project "fedora-coreos-cloud" \
--image-family "fedora-coreos-${STREAM}" \
--zone "${ZONE} "${NAME}"
----

TIP: You can find out the instance's assigned IP by running `gcloud compute instances list`
Expand All @@ -68,9 +73,14 @@ From the command-line, use `--metadata-from-file`:
[source, bash]
----
STREAM='stable'
VM_NAME='fcos-node01'
NAME='fcos-node01'
ZONE='us-central-1a'
CONFIG='example.ign'
gcloud compute instances create --metadata-from-file "user-data=${CONFIG}" --image-project "fedora-coreos-cloud" --image-family "fedora-coreos-${STREAM}" "${VM_NAME}"
gcloud compute instances create \
--image-project "fedora-coreos-cloud" \
--image-family "fedora-coreos-${STREAM}" \
--metadata-from-file "user-data=${CONFIG}" \
--zone "${ZONE} "${NAME}"
----

NOTE: By design, https://cloud.google.com/compute/docs/startupscript[startup scripts] are not supported on FCOS. Instead, it is recommended to encode any startup logic as systemd service units in the Ignition configuration.
Expand Down
Loading