diff --git a/cmd/coreos-assembler.go b/cmd/coreos-assembler.go index 18559d8e5b..b0f60371b4 100644 --- a/cmd/coreos-assembler.go +++ b/cmd/coreos-assembler.go @@ -14,7 +14,7 @@ import ( // commands we'd expect to use in the local dev path var buildCommands = []string{"init", "fetch", "build", "osbuild", "run", "prune", "clean", "list"} var advancedBuildCommands = []string{"buildfetch", "buildupload", "oc-adm-release", "push-container"} -var buildextendCommands = []string{"aliyun", "applehv", "aws", "azure", "digitalocean", "exoscale", "extensions-container", "gcp", "hyperv", "ibmcloud", "kubevirt", "live", "metal", "metal4k", "nutanix", "openstack", "qemu", "secex", "virtualbox", "vmware", "vultr"} +var buildextendCommands = []string{"aliyun", "applehv", "aws", "azure", "digitalocean", "exoscale", "extensions-container", "gcp", "hyperv", "ibmcloud", "kubevirt", "live", "metal", "metal4k", "nutanix", "openstack", "oraclecloud", "qemu", "secex", "virtualbox", "vmware", "vultr"} var utilityCommands = []string{"aws-replicate", "coreos-prune", "compress", "copy-container", "diff", "koji-upload", "kola", "push-container-manifest", "remote-build-container", "remote-session", "sign", "tag", "update-variant"} var otherCommands = []string{"shell", "meta"} diff --git a/pkg/builds/cosa_v1.go b/pkg/builds/cosa_v1.go index 6847385236..9a7c8431c2 100644 --- a/pkg/builds/cosa_v1.go +++ b/pkg/builds/cosa_v1.go @@ -1,7 +1,7 @@ package builds // generated by 'make schema' -// source hash: 73f31a82a5800f256c5348e87fd4ef041b4e592b0145bac503de36dd584f596f +// source hash: 4bb5641ee8c32b122c412cbaefe3d068685ea6cbffcf3162e600a01268c92146 type AdvisoryDiff []AdvisoryDiffItems @@ -117,6 +117,7 @@ type BuildArtifacts struct { Nutanix *Artifact `json:"nutanix,omitempty"` OciManifest *Artifact `json:"oci-manifest,omitempty"` OpenStack *Artifact `json:"openstack,omitempty"` + OracleCloudInfrastructure *Artifact `json:"oraclecloud,omitempty"` Ostree Artifact `json:"ostree"` PowerVirtualServer *Artifact `json:"powervs,omitempty"` ProxmoxVe *Artifact `json:"proxmoxve,omitempty"` diff --git a/pkg/builds/schema_doc.go b/pkg/builds/schema_doc.go index d67dfba95a..4337f7e57e 100644 --- a/pkg/builds/schema_doc.go +++ b/pkg/builds/schema_doc.go @@ -1,5 +1,5 @@ // Generated by ./generate-schema.sh -// Source hash: 73f31a82a5800f256c5348e87fd4ef041b4e592b0145bac503de36dd584f596f +// Source hash: 4bb5641ee8c32b122c412cbaefe3d068685ea6cbffcf3162e600a01268c92146 // DO NOT EDIT package builds @@ -517,6 +517,7 @@ var generatedSchemaJSON = `{ "metal4k", "nutanix", "openstack", + "oraclecloud", "proxmoxve", "qemu", "virtualbox", @@ -647,6 +648,12 @@ var generatedSchemaJSON = `{ "title": "OpenStack", "$ref": "#/definitions/artifact" }, + "oraclecloud": { + "$id": "#/properties/images/properties/oraclecloud", + "type": "object", + "title": "Oracle Cloud Infrastructure", + "$ref": "#/definitions/artifact" + }, "virtualbox": { "$id": "#/properties/images/properties/virtualbox", "type": "object", diff --git a/src/cmd-buildextend-oraclecloud b/src/cmd-buildextend-oraclecloud new file mode 120000 index 0000000000..dcbb012994 --- /dev/null +++ b/src/cmd-buildextend-oraclecloud @@ -0,0 +1 @@ +cmd-osbuild \ No newline at end of file diff --git a/src/cmd-coreos-prune b/src/cmd-coreos-prune index a8daeca440..08d90e2fd1 100755 --- a/src/cmd-coreos-prune +++ b/src/cmd-coreos-prune @@ -55,7 +55,7 @@ Build = collections.namedtuple("Build", ["id", "images", "arch", "meta_json"]) # set metadata caching to 5m CACHE_MAX_AGE_METADATA = 60 * 5 # These lists are up to date as of schema hash -# 73f31a82a5800f256c5348e87fd4ef041b4e592b0145bac503de36dd584f596f. If changing +# 4bb5641ee8c32b122c412cbaefe3d068685ea6cbffcf3162e600a01268c92146. If changing # this hash, ensure that the list of SUPPORTED and UNSUPPORTED artifacts below # is up to date. SUPPORTED = ["amis", "aws-winli", "gcp"] diff --git a/src/cmd-generate-release-meta b/src/cmd-generate-release-meta index 47a2589a87..a28adfd842 100755 --- a/src/cmd-generate-release-meta +++ b/src/cmd-generate-release-meta @@ -152,8 +152,8 @@ def append_build(out, input_): platforms = ["aliyun", "applehv", "aws", "azure", "azurestack", "digitalocean", "exoscale", "gcp", "hetzner", "hyperv", "ibmcloud", "kubevirt", "metal", "nutanix", "openstack", - "proxmoxve", "powervs", "qemu", "virtualbox", "vmware", - "vultr", "qemu-secex"] + "oraclecloud", "proxmoxve", "powervs", "qemu", "virtualbox", + "vmware", "vultr", "qemu-secex"] for platform in platforms: if input_.get("images", {}).get(platform, None) is not None: print(f" - {platform}") diff --git a/src/cmd-osbuild b/src/cmd-osbuild index eda225a4dc..1dc241923c 100755 --- a/src/cmd-osbuild +++ b/src/cmd-osbuild @@ -24,6 +24,7 @@ declare -A SUPPORTED_PLATFORMS=( ['metal']='raw' ['nutanix']='qcow2' ['openstack']='qcow2' + ['oraclecloud']='qcow2' ['proxmoxve']='qcow2' ['qemu']='qcow2' ['qemu-secex']='qcow2' @@ -272,6 +273,7 @@ main() { "cmd-buildextend-kubevirt") platforms=(kubevirt);; "cmd-buildextend-nutanix") platforms=(nutanix);; "cmd-buildextend-openstack") platforms=(openstack);; + "cmd-buildextend-oraclecloud") platforms=(oraclecloud);; "cmd-buildextend-proxmoxve") platforms=(proxmoxve);; "cmd-buildextend-vultr") platforms=(vultr);; *) fatal "called as unexpected name $0";; diff --git a/src/cosalib/qemuvariants.py b/src/cosalib/qemuvariants.py index 45fa3c82b6..90ed86e3c0 100644 --- a/src/cosalib/qemuvariants.py +++ b/src/cosalib/qemuvariants.py @@ -109,6 +109,10 @@ "image_format": "qcow2", "platform": "openstack", }, + "oraclecloud": { + "image_format": "qcow2", + "platform": "oraclecloud", + }, "nutanix": { "image_format": "qcow2", "platform": "nutanix", diff --git a/src/osbuild-manifests/coreos.osbuild.aarch64.mpp.yaml b/src/osbuild-manifests/coreos.osbuild.aarch64.mpp.yaml index ac273815cc..6af507f52b 100644 --- a/src/osbuild-manifests/coreos.osbuild.aarch64.mpp.yaml +++ b/src/osbuild-manifests/coreos.osbuild.aarch64.mpp.yaml @@ -762,6 +762,8 @@ pipelines: path: platform.metal.ipp.yaml - mpp-import-pipelines: path: platform.openstack.ipp.yaml + - mpp-import-pipelines: + path: platform.oraclecloud.ipp.yaml - mpp-import-pipelines: path: platform.qemu.ipp.yaml - mpp-import-pipelines: diff --git a/src/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml b/src/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml index 4b018ff667..dcde8fc280 100644 --- a/src/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml +++ b/src/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml @@ -776,6 +776,8 @@ pipelines: path: platform.kubevirt.ipp.yaml - mpp-import-pipelines: path: platform.openstack.ipp.yaml + - mpp-import-pipelines: + path: platform.oraclecloud.ipp.yaml - mpp-import-pipelines: path: platform.proxmoxve.ipp.yaml - mpp-import-pipelines: diff --git a/src/osbuild-manifests/platform.oraclecloud.ipp.yaml b/src/osbuild-manifests/platform.oraclecloud.ipp.yaml new file mode 100644 index 0000000000..9e3bd3c231 --- /dev/null +++ b/src/osbuild-manifests/platform.oraclecloud.ipp.yaml @@ -0,0 +1,71 @@ +# This file defines the artifact to be used for the oraclecloud platform. +version: '2' +pipelines: + - name: raw-oraclecloud-image + build: + mpp-format-string: '{buildroot}' + stages: + - type: org.osbuild.copy + inputs: + tree: + type: org.osbuild.tree + origin: org.osbuild.pipeline + references: + - name:raw-image + options: + paths: + - from: input://tree/disk.img + to: tree:///disk.img + # Increase the size to the cloud image size + - type: org.osbuild.truncate + options: + filename: disk.img + size: + mpp-format-string: "{cloud_image_size_mb * 1024 * 1024}" + - type: org.osbuild.coreos.platform + options: + platform: oraclecloud + devices: + disk: + type: org.osbuild.loopback + options: + filename: disk.img + partscan: true + mounts: + - name: root + type: org.osbuild.xfs + source: disk + partition: + mpp-format-int: '{image.layout[''root''].partnum}' + target: / + - name: ostree.deployment + type: org.osbuild.ostree.deployment + options: + source: mount + deployment: + default: true + - name: boot + type: org.osbuild.ext4 + source: disk + partition: + mpp-format-int: '{image.layout[''boot''].partnum}' + target: /boot + - name: oraclecloud + build: + mpp-format-string: '{host_as_buildroot}' + stages: + - type: org.osbuild.qemu + inputs: + image: + type: org.osbuild.files + origin: org.osbuild.pipeline + references: + name:raw-oraclecloud-image: + file: disk.img + options: + filename: + mpp-format-string: '{artifact_name_prefix}-oraclecloud.{arch}.qcow2' + format: + type: qcow2 + compression: false + compat: '1.1' diff --git a/src/v1.json b/src/v1.json index 879c15b64e..09d8b71d1b 100644 --- a/src/v1.json +++ b/src/v1.json @@ -511,6 +511,7 @@ "metal4k", "nutanix", "openstack", + "oraclecloud", "proxmoxve", "qemu", "virtualbox", @@ -641,6 +642,12 @@ "title": "OpenStack", "$ref": "#/definitions/artifact" }, + "oraclecloud": { + "$id": "#/properties/images/properties/oraclecloud", + "type": "object", + "title": "Oracle Cloud Infrastructure", + "$ref": "#/definitions/artifact" + }, "virtualbox": { "$id": "#/properties/images/properties/virtualbox", "type": "object",