#310 publish a cloud image for GCP
Opened 3 years ago by dustymabe. Modified 2 years 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

3 years ago

Still no GCP images, only Fedora CoreOS :( Have to upload/import the image from getfedora.org manually, and there's no single word mentioning UEFI_COMPATIBLE flag has to be set, except in this thread.

Still no GCP images, only Fedora CoreOS

This shouldn't be true. See https://pagure.io/cloud-sig/issue/328#comment-731278

Ok! Cool! Hard to discover when it's not advertised/documented/listed anywhere?

Fedora CoreOS is listed in the marketplace, but not Fedora Server.
https://console.cloud.google.com/marketplace/browse?q=fedora

You're right. We need more hands on deck. Lot's of improvements that could be made in the Fedora Cloud space.

For the marketplace, we were blocked on my work of adding the GCE guest environment. That's landing in Fedora 35. So, time for me to work on adding it to the marketplace!

Metadata Update from @ngompa:
- Issue assigned to ericedens

2 years ago

Login to comment on this ticket.

Metadata