Skip to content

Support uploading to IBM Cloud#1924

Merged
achilleas-k merged 1 commit intoosbuild:mainfrom
FrostyX:ibmcloud
Oct 20, 2025
Merged

Support uploading to IBM Cloud#1924
achilleas-k merged 1 commit intoosbuild:mainfrom
FrostyX:ibmcloud

Conversation

@FrostyX
Copy link
Contributor

@FrostyX FrostyX commented Oct 4, 2025

@FrostyX FrostyX requested a review from a team as a code owner October 4, 2025 10:28
FrostyX added a commit to FrostyX/image-builder-cli that referenced this pull request Oct 4, 2025
FrostyX added a commit to FrostyX/image-builder-cli that referenced this pull request Oct 4, 2025
@supakeen supakeen requested a review from mvo5 October 6, 2025 12:20
Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good, a few nitpicks/suggestions inline.

}

func (iu *ibmcloudUploader) Check(status io.Writer) error {
return nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally we would do parts of the checks from UploadAndRegister() here too, like checking for the environment. Maybe via a common helper that is then used here and in UploadAndRegister() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per discussion in #1921 (comment) , I am skipping the check for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the check only gets called when uploading as part of a build: https://github.com/osbuild/image-builder-cli/blob/392736dac329a3f6ccc6dccd4170b4f20a8f4c1b/cmd/image-builder/main.go#L405
But not called with image-builder upload.

FrostyX added a commit to FrostyX/image-builder-cli that referenced this pull request Oct 14, 2025
@schutzbot
Copy link
Contributor

schutzbot commented Oct 14, 2025

A previous version of this PR changed the images API or behaviour causing integration issues with osbuild-composer.
This is now fixed.

@supakeen supakeen self-assigned this Oct 14, 2025
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM.
We can handle the Check() function separately.

@supakeen
Copy link
Member

Thanks. LGTM. We can handle the Check() function separately.

Did you mean to approve?

thozza
thozza previously approved these changes Oct 16, 2025
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. My comments can be a follow-up.

Comment on lines 24 to 31
authEndpoint string
apiKey string
crn string
filename string
profilename string
trustedProfileID string
crTokenFilePath string
serviceInstanceID string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Why not use a pointer to credentials.Credentials type and initialize it in NewUploader()?

Copy link
Contributor Author

@FrostyX FrostyX Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I would do but for some reason, the AWS uploader does it this

tags: opts.Tags,
targetArch: opts.TargetArch,
bootMode: opts.BootMode,

so I tried to stay consistent with it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for providing more context. The values that you've pointed out from AWS uploader are IMO more like the region, bucketName or imageName, but are optional and not required to be able to upload an image to AWS. Therefore, they are made "optional" by being passed via the UploaderOptions struct.

I still think that my suggestion would make sense in this case and does not go against the consistency in this regard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, in that case I will try to refactor in the way you are suggesting :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, PTAL

fmt.Fprintf(status, "Uploading to IBM Cloud...\n")

endpoint := fmt.Sprintf("s3.%s.cloud-object-storage.appdomain.cloud", iu.region)
credentials, err := iu.getCredentials()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it would be better to call this in NewUploader() to get an error earlier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, it would be a good candidate for the Check method once it gets "fixed"

Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I think this is good to merge and we can do a more general fix-up of the way Check() is handled in uploaders as a follow-up.

I think we should generally add a call to Check() in all UploadAndRegister() implementations, but also keep it separate so that callers can validate the uploader configuration before starting a long-running process (like a build).

@supakeen supakeen added this pull request to the merge queue Oct 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 20, 2025
@FrostyX
Copy link
Contributor Author

FrostyX commented Oct 20, 2025

github-merge-queue bot removed this pull request from the merge queue due to failed status checks

The CI failed with

fatal: unable to access 'https://gitlab.com/redhat/services/products/image-builder/ci/images.git/': Failed to connect to gitlab.com

so I guess restarting the tests should help.

@achilleas-k
Copy link
Member

github-merge-queue bot removed this pull request from the merge queue due to failed status checks

The CI failed with

fatal: unable to access 'https://gitlab.com/redhat/services/products/image-builder/ci/images.git/': Failed to connect to gitlab.com

so I guess restarting the tests should help.

I'll click it again, but with the ongoing AWS outage, I think we might have trouble getting this to go through.

@achilleas-k
Copy link
Member

github-merge-queue bot removed this pull request from the merge queue due to failed status checks

The CI failed with

fatal: unable to access 'https://gitlab.com/redhat/services/products/image-builder/ci/images.git/': Failed to connect to gitlab.com

so I guess restarting the tests should help.

I'll click it again, but with the ongoing AWS outage, I think we might have trouble getting this to go through.

Then again, this is already up to date with main, so we don't need the merge queue. I'll admin merge.

@achilleas-k achilleas-k merged commit 55c1c85 into osbuild:main Oct 20, 2025
22 of 24 checks passed
croissanne added a commit to croissanne/osbuild-composer that referenced this pull request Oct 21, 2025
Changes with 0.205.0
----------------
  - Convert the test config map to a config list (osbuild/images#1900)
    - Author: Achilleas Koutsou, Reviewers: Sanne Raymaekers, Simon de Vlieger
  - Repos: Add definitions for AlmaLinux 9.7, 9.8, 10.1 and 10.2 (osbuild/images#1926)
    - Author: Eduard Abdullin, Reviewers: Achilleas Koutsou, Brian C. Lane, Simon de Vlieger
  - Support uploading to OpenStack (osbuild/images#1921)
    - Author: Jakub Kadlčík, Reviewers: Michael Vogt, Simon de Vlieger
  - disk: make addPartitionsForBootMode() arch specific (osbuild/images#1928)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - distro: add ova image type for bootc [HMS-9503] (osbuild/images#1938)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - fedora/minimal: drop uuids in partition tables (osbuild/images#1932)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt

Changes with 0.206.0
----------------
  - Update osbuild dependency commit ID to latest (osbuild/images#1945)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - deps: bump blueprint to 1.16.0 (osbuild/images#1952)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Sanne Raymaekers
  - fedora: Drop tigervnc on F42 and later (osbuild/images#1942)
    - Author: Brian C. Lane, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: document root kickstart (osbuild/images#1936)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt
  - fedora: rawhide is 44 (osbuild/images#1943)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Tomáš Hozza
  - many: lorax template split (HMS-9524) (osbuild/images#1949)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Tomáš Hozza

Changes with 0.207.0
----------------
  - Enable fedora 43 unit testing (osbuild/images#1954)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: update cloud_kernel_options (osbuild/images#1953)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - test/data/repos/rhel-10.2: fix copy & paste error (osbuild/images#1956)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger

Changes with 0.208.0
----------------
  - Schutzfile: switch CI runner to Fedora 42 (osbuild/images#1955)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support uploading to IBM Cloud (osbuild/images#1924)
    - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - pkg/osbuild: generate osbuild result from status scanner entries (osbuild/images#1941)
    - Author: Sanne Raymaekers, Reviewers: Nobody
croissanne added a commit to croissanne/osbuild-composer that referenced this pull request Oct 21, 2025
Changes with 0.205.0
----------------
  - Convert the test config map to a config list (osbuild/images#1900)
    - Author: Achilleas Koutsou, Reviewers: Sanne Raymaekers, Simon de Vlieger
  - Repos: Add definitions for AlmaLinux 9.7, 9.8, 10.1 and 10.2 (osbuild/images#1926)
    - Author: Eduard Abdullin, Reviewers: Achilleas Koutsou, Brian C. Lane, Simon de Vlieger
  - Support uploading to OpenStack (osbuild/images#1921)
    - Author: Jakub Kadlčík, Reviewers: Michael Vogt, Simon de Vlieger
  - disk: make addPartitionsForBootMode() arch specific (osbuild/images#1928)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - distro: add ova image type for bootc [HMS-9503] (osbuild/images#1938)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - fedora/minimal: drop uuids in partition tables (osbuild/images#1932)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt

Changes with 0.206.0
----------------
  - Update osbuild dependency commit ID to latest (osbuild/images#1945)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - deps: bump blueprint to 1.16.0 (osbuild/images#1952)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Sanne Raymaekers
  - fedora: Drop tigervnc on F42 and later (osbuild/images#1942)
    - Author: Brian C. Lane, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: document root kickstart (osbuild/images#1936)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt
  - fedora: rawhide is 44 (osbuild/images#1943)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Tomáš Hozza
  - many: lorax template split (HMS-9524) (osbuild/images#1949)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Tomáš Hozza

Changes with 0.207.0
----------------
  - Enable fedora 43 unit testing (osbuild/images#1954)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: update cloud_kernel_options (osbuild/images#1953)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - test/data/repos/rhel-10.2: fix copy & paste error (osbuild/images#1956)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger

Changes with 0.208.0
----------------
  - Schutzfile: switch CI runner to Fedora 42 (osbuild/images#1955)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support uploading to IBM Cloud (osbuild/images#1924)
    - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - pkg/osbuild: generate osbuild result from status scanner entries (osbuild/images#1941)
    - Author: Sanne Raymaekers, Reviewers: Nobody
ondrejbudai pushed a commit to osbuild/osbuild-composer that referenced this pull request Oct 22, 2025
Changes with 0.205.0
----------------
  - Convert the test config map to a config list (osbuild/images#1900)
    - Author: Achilleas Koutsou, Reviewers: Sanne Raymaekers, Simon de Vlieger
  - Repos: Add definitions for AlmaLinux 9.7, 9.8, 10.1 and 10.2 (osbuild/images#1926)
    - Author: Eduard Abdullin, Reviewers: Achilleas Koutsou, Brian C. Lane, Simon de Vlieger
  - Support uploading to OpenStack (osbuild/images#1921)
    - Author: Jakub Kadlčík, Reviewers: Michael Vogt, Simon de Vlieger
  - disk: make addPartitionsForBootMode() arch specific (osbuild/images#1928)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - distro: add ova image type for bootc [HMS-9503] (osbuild/images#1938)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - fedora/minimal: drop uuids in partition tables (osbuild/images#1932)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt

Changes with 0.206.0
----------------
  - Update osbuild dependency commit ID to latest (osbuild/images#1945)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - deps: bump blueprint to 1.16.0 (osbuild/images#1952)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Sanne Raymaekers
  - fedora: Drop tigervnc on F42 and later (osbuild/images#1942)
    - Author: Brian C. Lane, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: document root kickstart (osbuild/images#1936)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt
  - fedora: rawhide is 44 (osbuild/images#1943)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Tomáš Hozza
  - many: lorax template split (HMS-9524) (osbuild/images#1949)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Tomáš Hozza

Changes with 0.207.0
----------------
  - Enable fedora 43 unit testing (osbuild/images#1954)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: update cloud_kernel_options (osbuild/images#1953)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - test/data/repos/rhel-10.2: fix copy & paste error (osbuild/images#1956)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger

Changes with 0.208.0
----------------
  - Schutzfile: switch CI runner to Fedora 42 (osbuild/images#1955)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support uploading to IBM Cloud (osbuild/images#1924)
    - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - pkg/osbuild: generate osbuild result from status scanner entries (osbuild/images#1941)
    - Author: Sanne Raymaekers, Reviewers: Nobody
croissanne added a commit to croissanne/image-builder-cli that referenced this pull request Oct 22, 2025
Changes with 0.207.0
----------------
  - Enable fedora 43 unit testing (osbuild/images#1954)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: update cloud_kernel_options (osbuild/images#1953)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - test/data/repos/rhel-10.2: fix copy & paste error (osbuild/images#1956)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger

Changes with 0.208.0
----------------
  - Schutzfile: switch CI runner to Fedora 42 (osbuild/images#1955)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support uploading to IBM Cloud (osbuild/images#1924)
    - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - pkg/osbuild: generate osbuild result from status scanner entries (osbuild/images#1941)
    - Author: Sanne Raymaekers, Reviewers: Nobody

Changes with 0.209.0
----------------
  - gitlab: run ostree manifest generation and builds only when needed (osbuild/images#1961)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - osbuild/osbuild-exec: extract building the osbuild cmd to helper (osbuild/images#1963)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - rhel10: add ism secret & top secret oscap profiles (HMS-9507) (osbuild/images#1962)
    - Author: Gianluca Zuccarelli, Reviewers: Lukáš Zapletal, Sanne Raymaekers
FrostyX added a commit to FrostyX/image-builder-cli that referenced this pull request Oct 24, 2025
FrostyX added a commit to FrostyX/image-builder-cli that referenced this pull request Oct 24, 2025
FrostyX added a commit to FrostyX/image-builder-cli that referenced this pull request Oct 27, 2025
github-merge-queue bot pushed a commit to osbuild/image-builder-cli that referenced this pull request Oct 28, 2025
mvo5 pushed a commit to mvo5/image-builder-cli that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants