#310 publish a cloud image for GCP
Opened 4 months ago by dustymabe. Modified a month ago

We have some renewed support from the community for having a cloud base image published on GCP. We also now have accounts from GCP that we can use to do the uploads and tests and some contacts from Google to help.

Let's try to collect requirements for a GCP image here and get them published.

Thanks Dusty! Looking forward to helping with this.

I've attached a demo that builds a UEFI-enabled GCE image of Fedora 33:

It is based on fedora-cloud-base.ks, and includes two types of changes:

(I) Proposed changes for first iteration. These are hard-coded into the
file, so we should talk about how to abstract them prior to landing.

a. Modify serial port configuration to match GCE's provided environment. [1]
b. Modify network MTU to match GCE's configuration. [2]
c. Omit grub modifications that aren't required to GCE.
d. Enable serial console access. [3]

(II) Demo-related changes. These wouldn't get committed, but they make it
easier to demo.

a. Inline %include directives.
b. Add the GCE guest environment via the CentOS8 repo.

To run the demo, first login to gcloud and gsutil. Next:

  git apply fedora-cloud-base.ks.patch
  bash gce-uefi.sh f33 fedora-cloud-base.ks gs://your-bucket/tmp/

Midstream, a virt window will ask you to login to F33. Close this window
to proceed. Once the script finishes, there will be an image named
'f33' in your GCP account. Once finished, some things to try:

Create an instance with the CLI.

# Any zone is fine; this is just an example.
gcloud compute instances create f33 --image f33 --zone us-central1-b
gcloud compute instances tail-serial-port-output f33 --zone us-central1-b
gcloud compute ssh f33 --zone us-central1-b

Interact with the instance via the web UI.
- Access the machine via the SSH button in GCP's web UI.
- View logs via the serial console log button in GCP's web UI.

  1. https://cloud.google.com/compute/docs/import/import-existing-image
  2. https://cloud.google.com/network-connectivity/docs/vpn/concepts/mtu-considerations
  3. https://cloud.google.com/compute/docs/instances/interacting-with-serial-console

Cool! The image boots, and I can connect to the serial console. For anyone interested, here are the steps to make an instance:

  1. Enable the interactive serial console: https://cloud.google.com/compute/docs/instances/interacting-with-serial-console
  2. Copy dusty's tar.gz to a GCS bucket, and assign GCS_PATH to its gs:// URI.
  3. Create a disk image: gcloud compute images create fedora-rawhide --source-uri $GCS_PATH --guest-os-features=UEFI_COMPATIBLE . The UEFI_COMPATIBLE feature instructs the instance to boot with UEFI instead of BIOS.
  4. Create an instance using the disk image: gcloud compute instances create fedora --image=fedora-rawhide
  5. Connect to the serial console: gcloud compute connect-to-serial-port fedora

@dustymabe -- looks good to me. I ran the same steps as for the previous image, and was able to boot the instance and connect to the serial console.

thanks @ericedens - I'm going to close out this issue then and let the other issues track the future work.

Metadata Update from @ngompa:
- Issue tagged with: GCP

a month ago

Login to comment on this ticket.