Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Determine a JSON schema #48

Closed
major opened this issue Sep 29, 2022 · 1 comment · Fixed by #90
Closed

Determine a JSON schema #48

major opened this issue Sep 29, 2022 · 1 comment · Fixed by #90
Assignees

Comments

@major
Copy link
Member

major commented Sep 29, 2022

Idea from @FKolwa.

Each cloud provider has their own schema for images and image metadata. We should examine the data we get from the biggest providers (AWS/Azure/GCP) and determine which information is most important for us to keep.

AWS

Command: aws --region=us-east-1 ec2 describe-images --owner 309956199498 --filter "Name=is-public,Values=true"

    {
      "Architecture": "arm64",
      "CreationDate": "2022-05-13T12:04:49.000Z",
      "ImageId": "ami-08ddbe20d7e0d2f8f",
      "ImageLocation": "amazon/RHEL-9.0.0_HVM-20220513-arm64-0-Hourly2-GP2",
      "ImageType": "machine",
      "Public": true,
      "OwnerId": "309956199498",
      "PlatformDetails": "Red Hat Enterprise Linux",
      "UsageOperation": "RunInstances:0010",
      "State": "available",
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Ebs": {
            "DeleteOnTermination": true,
            "SnapshotId": "snap-0af47e5c98135e3c4",
            "VolumeSize": 10,
            "VolumeType": "gp2",
            "Encrypted": false
          }
        }
      ],
      "Description": "Provided by Red Hat, Inc.",
      "EnaSupport": true,
      "Hypervisor": "xen",
      "ImageOwnerAlias": "amazon",
      "Name": "RHEL-9.0.0_HVM-20220513-arm64-0-Hourly2-GP2",
      "RootDeviceName": "/dev/sda1",
      "RootDeviceType": "ebs",
      "SriovNetSupport": "simple",
      "VirtualizationType": "hvm",
      "DeprecationTime": "2024-05-13T12:04:49.000Z"
    }

Azure

Command: az vm image list -f RHEL -l eastus --all

  {
    "architecture": "x64",
    "offer": "RHEL-SAP-HA",
    "publisher": "RedHat",
    "sku": "82sapha-gen2",
    "urn": "RedHat:RHEL-SAP-HA:82sapha-gen2:8.2.2020060413",
    "version": "8.2.2020060413"
  },

Google

Command: gcloud compute images list --format="json"

  {
    "architecture": "X86_64",
    "archiveSizeBytes": "5719051776",
    "creationTimestamp": "2022-09-20T16:32:45.492-07:00",
    "description": "Red Hat, Red Hat Enterprise Linux, 8, x86_64 built on 20220920, supports Shielded VM features",
    "diskSizeGb": "20",
    "family": "rhel-8",
    "guestOsFeatures": [
      {
        "type": "UEFI_COMPATIBLE"
      },
      {
        "type": "VIRTIO_SCSI_MULTIQUEUE"
      },
      {
        "type": "SEV_CAPABLE"
      },
      {
        "type": "GVNIC"
      }
    ],
    "id": "675603938003121010",
    "kind": "compute#image",
    "labelFingerprint": "42WmSpB8rSM=",
    "licenseCodes": [
      "601259152637613565"
    ],
    "licenses": [
      "https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/licenses/rhel-8-server"
    ],
    "name": "rhel-8-v20220920",
    "rawDisk": {
      "containerType": "TAR",
      "source": ""
    },
    "selfLink": "https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/images/rhel-8-v20220920",
    "sourceType": "RAW",
    "status": "READY",
    "storageLocations": [
      "us",
      "asia",
      "eu"
    ]
  }
@major
Copy link
Member Author

major commented Sep 29, 2022

Most critical pieces:

Image identifier

  • AWS: ImageId
  • Azure: urn
  • Google: name

Region

AWS has different ImageId values depending on the region, but Azure/GCP keep their urn and name values the same.

Also:

  • Which cloud? AWS/GCP/Azure
  • Bundling? Like SAP or HA?
  • Architecture? aarch64 or x86_64
  • Storage backends? Like AWS' gp2/standard
  • Hypervisor type?
  • RHEL version?
  • Beta vs non-beta
  • Release date (watch out for different formats)

@F-X64 F-X64 transferred this issue from another repository Oct 13, 2022
@F-X64 F-X64 self-assigned this Oct 17, 2022
@major major closed this as completed in #90 Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants