Commit graph

11 commits

Author SHA1 Message Date
Tomáš Hozza
19dd832876 go.mod: update osbuild/images to v0.171.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-07 16:33:15 +02:00
Sanne Raymaekers
0e2daa201f many: switch to osbuild/images/pkg/upload for azure
This is part of consolidating all the upload code in images.
2025-07-29 13:10:22 +02:00
Ondřej Budai
caadee87ec azure: add an option to tag page blobs
We want to start tagging page blobs so this commit adds a small tagging method
to our azure library and exposes it in the osbuild-upload-azure helper.

Example:

go run ./cmd/osbuild-upload-azure/ \
  -container azure-container \
  -image ./sample.vhd \
  -storage-access-key KEY \
  -storage-account account \
  -tag key:value \
  -tag hello:world \
  -tag bird:toucan

This commit also has to downgrade the azblob library version to 0.13 so the
API for blob tags is the same as the one currently shipped to Fedora.
This is suboptimal but it should unblock us for now.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-06-13 21:06:01 +02:00
Ondřej Budai
f71ca8f0ca azure: move the .vhd extension logic to the callers
It always felt wrong that the method uploaded the blob under a different name
than the one specified in the blob metadata.

This commit moves the responsibility of specifying the right extension to
the callers. azure.EnsureVHDExtension helper was added to simplify this.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-06-13 21:06:01 +02:00
Tom Gundersen
ba40d8a1fc cmd/upload-azure: set storage account
This was lost in a refactor.
2021-03-06 15:40:48 +00:00
Ondřej Budai
4f66ab5d7c upload/azure: rename Image to PageBlob
The UploadImage method doesn't actually create an image. It creates a Page
Blob. Blob is something like S3 object but in the Azure terminology. Page
Blob means that's optimized for random access and it's the only blob type
that can be used to create images.

This commit cleans up the terminology so it's less confusing.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-06 15:40:48 +00:00
Ondřej Budai
478f69e092 upload/azure: move UploadImage under a new StorageClient struct
We will soon introduce new methods to the storage client.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-06 15:40:48 +00:00
Ondřej Budai
b109ec878e cmd/osbuild-upload-azure: improve error message on wrong arguments
After this commit osbuild-upload-azure tool returns the help text when wrong
arguments were passed to it.
2020-04-27 20:34:20 +02:00
Martin Sehnoutka
364ea62f59 Introduce Azure upload test
The test is very simple, it first upload a file with random content and
then downloads it back and compare hashes.
2019-11-29 12:19:40 +01:00
Martin Sehnoutka
1135e9fe01 Refactor Azure upload code to a separate package
as part of this, move also the AWS upload code to the same directory
2019-11-27 12:14:07 +01:00
Martin Sehnoutka
78ea0e0b6f Introduce Azure upload CLI utility
It uses Azure SDK to connect to Azure storage, creates a container there
and uploads the image. Unfortunately the API for page blobs does not
include some thread pool for upload so I implemented one myself. The
performance can be tweaked using the upload chunk size and number of
parallel threads.

The package is prepared to be refactored into common module within
internals package as soon as we agree on the of these common packages
for image upload.

Add azure-blob-storage rpm package as a dependency

It didn't work for me using the `golang(package)` syntax. Using the
package name explicitly works.
2019-11-25 17:10:11 +01:00