Skip to content

GCP Image Creation

Matthew Yee edited this page May 28, 2024 · 9 revisions

Creating Images in GCP

Image creation command

gcloud compute images create rhel-9-1-05-09-2023 --source-disk=rhel-9-1-05-09-2023 --source-disk-zone=us-central1-a

Added software

mlocate buildah podman wget vim cockpit ca-certificates httpd mod_ssl git subscription-manager bash-completion tmux tuned tree nc nmstate man-db stress-ng libguestfs

virt image compose

{
  "distribution": "rhel-92",
  "image_name": "myee-virt",
  "image_requests": [
    {
      "architecture": "x86_64",
      "image_type": "gcp",
      "upload_request": {
        "type": "gcp",
        "options": {
          "share_with_accounts": [
            "user:[email protected]"
          ]
        }
      }
    }
  ],
  "customizations": {
    "packages": [
      "mlocate",
      "buildah",
      "podman",
      "wget",
      "vim-enhanced",
      "cockpit",
      "cockpit-machines",
      "cockpit-pcp",
      "cockpit-podman",
      "cockpit-session-recording",
      "cockpit-storaged",
      "cockpit-composer",
      "cockpit-packagekit",
      "cockpit-system",
      "ca-certificates",
      "httpd",
      "mod_ssl",
      "git",
      "subscription-manager",
      "bash-completion",
      "tmux",
      "tuned",
      "tree",
      "nmap-ncat",
      "nmstate",
      "man-db",
      "stress-ng",
      "libguestfs",
      "libguestfs-bash-completion"
    ],
    "filesystem": [
      {
        "mountpoint": "/",
        "min_size": 21474836480
      }
    ]
  }
}

Special Satellite images

myee-satellite myee-satellite-client

Red Hat Insights Compose request

{
  "client_id": "api",
  "customizations": {
    "custom_repositories": [
      {
        "baseurl": [
          "https://packages.cloud.google.com/yum/repos/google-compute-engine-el9-x86_64-stable/"
        ],
        "check_gpg": true,
        "check_repo_gpg": false,
        "gpgkey": [
          "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1\n\nmQENBFWKtqgBCADmKQWYQF9YoPxLEQZ5XA6DFVg9ZHG4HIuehsSJETMPQ+W9K5c5\nUs5assCZBjG/k5i62SmWb09eHtWsbbEgexURBWJ7IxA8kM3kpTo7bx+LqySDsSC3\n/8JRkiyibVV0dDNv/EzRQsGDxmk5Xl8SbQJ/C2ECSUT2ok225f079m2VJsUGHG+5\nRpyHHgoMaRNedYP8ksYBPSD6sA3Xqpsh/0cF4sm8QtmsxkBmCCIjBa0B0LybDtdX\nXIq5kPJsIrC2zvERIPm1ez/9FyGmZKEFnBGeFC45z5U//pHdB1z03dYKGrKdDpID\n17kNbC5wl24k/IeYyTY9IutMXvuNbVSXaVtRABEBAAG0Okdvb2dsZSBDbG91ZCBQ\nYWNrYWdlcyBSUE0gU2lnbmluZyBLZXkgPGdjLXRlYW1AZ29vZ2xlLmNvbT6JATgE\nEwECACIFAlWKtqgCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEPCcOUw+\nG6jV+QwH/0wRH+XovIwLGfkg6kYLEvNPvOIYNQWnrT6zZ+XcV47WkJ+i5SR+QpUI\nudMSWVf4nkv+XVHruxydafRIeocaXY0E8EuIHGBSB2KR3HxG6JbgUiWlCVRNt4Qd\n6udC6Ep7maKEIpO40M8UHRuKrp4iLGIhPm3ELGO6uc8rks8qOBMH4ozU+3PB9a0b\nGnPBEsZdOBI1phyftLyyuEvG8PeUYD+uzSx8jp9xbMg66gQRMP9XGzcCkD+b8w1o\n7v3J3juKKpgvx5Lqwvwv2ywqn/Wr5d5OBCHEw8KtU/tfxycz/oo6XUIshgEbS/+P\n6yKDuYhRp6qxrYXjmAszIT25cftb4d4=\n=/PbX\n-----END PGP PUBLIC KEY BLOCK-----\n"
        ],
        "id": "b22bca39-8dd1-4d31-89b0-54c079e753be",
        "name": "Google Compute Engine"
      }
    ],
    "packages": [
      "mlocate",
      "buildah",
      "podman",
      "wget",
      "vim-enhanced",
      "cockpit",
      "cockpit-machines",
      "cockpit-pcp",
      "cockpit-podman",
      "cockpit-session-recording",
      "cockpit-composer",
      "cockpit-packagekit",
      "cockpit-storaged",
      "cockpit-system",
      "ca-certificates",
      "httpd",
      "mod_ssl",
      "git",
      "subscription-manager",
      "bash-completion",
      "tmux",
      "tuned",
      "tree",
      "nmap-ncat",
      "nmstate",
      "man-db",
      "stress-ng",
      "libguestfs",
      "libguestfs-bash-completion",
      "google-compute-engine",
      "google-osconfig-agent"
    ],
    "payload_repositories": [
      {
        "baseurl": "https://packages.cloud.google.com/yum/repos/google-compute-engine-el9-x86_64-stable/",
        "check_gpg": true,
        "check_repo_gpg": false,
        "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1\n\nmQENBFWKtqgBCADmKQWYQF9YoPxLEQZ5XA6DFVg9ZHG4HIuehsSJETMPQ+W9K5c5\nUs5assCZBjG/k5i62SmWb09eHtWsbbEgexURBWJ7IxA8kM3kpTo7bx+LqySDsSC3\n/8JRkiyibVV0dDNv/EzRQsGDxmk5Xl8SbQJ/C2ECSUT2ok225f079m2VJsUGHG+5\nRpyHHgoMaRNedYP8ksYBPSD6sA3Xqpsh/0cF4sm8QtmsxkBmCCIjBa0B0LybDtdX\nXIq5kPJsIrC2zvERIPm1ez/9FyGmZKEFnBGeFC45z5U//pHdB1z03dYKGrKdDpID\n17kNbC5wl24k/IeYyTY9IutMXvuNbVSXaVtRABEBAAG0Okdvb2dsZSBDbG91ZCBQ\nYWNrYWdlcyBSUE0gU2lnbmluZyBLZXkgPGdjLXRlYW1AZ29vZ2xlLmNvbT6JATgE\nEwECACIFAlWKtqgCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEPCcOUw+\nG6jV+QwH/0wRH+XovIwLGfkg6kYLEvNPvOIYNQWnrT6zZ+XcV47WkJ+i5SR+QpUI\nudMSWVf4nkv+XVHruxydafRIeocaXY0E8EuIHGBSB2KR3HxG6JbgUiWlCVRNt4Qd\n6udC6Ep7maKEIpO40M8UHRuKrp4iLGIhPm3ELGO6uc8rks8qOBMH4ozU+3PB9a0b\nGnPBEsZdOBI1phyftLyyuEvG8PeUYD+uzSx8jp9xbMg66gQRMP9XGzcCkD+b8w1o\n7v3J3juKKpgvx5Lqwvwv2ywqn/Wr5d5OBCHEw8KtU/tfxycz/oo6XUIshgEbS/+P\n6yKDuYhRp6qxrYXjmAszIT25cftb4d4=\n=/PbX\n-----END PGP PUBLIC KEY BLOCK-----\n",
        "rhsm": false
      }
    ]
  },
  "distribution": "rhel-94",
  "image_description": "Instruqt 9.4 image",
  "image_name": "myee-instruqt-9.4",
  "image_requests": [
    {
      "architecture": "x86_64",
      "image_type": "gcp",
      "upload_request": {
        "options": {
          "share_with_accounts": [
            "user:[email protected]"
          ]
        },
        "type": "gcp"
      }
    }
  ]
}

Uninstall dnf-automatic

dnf remove dnf-automatic -y