Commit graph

4912 commits

Author SHA1 Message Date
dependabot[bot]
159a7e2fe6 build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.5.0 to 1.6.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.5.0...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 11:34:44 +01:00
Tomáš Hozza
a001da966a distro: add support for RHEL-9.2
Add relevant repo definitions and generate image test manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-31 08:07:09 +01:00
Tomáš Hozza
fc95dac86a distro: add support for RHEL-8.8
Add relevant repo definitions and generate image test manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-31 08:07:09 +01:00
Sanne Raymaekers
e94ea7c995 internal/worker: add rhsm to ostree resolve job 2022-10-28 16:14:30 +02:00
Sanne Raymaekers
c865286fb9 internal/ostree: add consumer certs when resolving ostree ref 2022-10-28 16:14:30 +02:00
Sanne Raymaekers
632f272573 internal/rhsm: add consumer secrets to Subscriptions
The consumer key/cert is used to uniquely identify a system against a
candlepin instances. They're useful for any Red Hat (ostree) content
which requires (cert) authentication.
2022-10-28 16:14:30 +02:00
Sanne Raymaekers
500341a25f internal/osbuild: contenturl and rhsm secrets for ostree sources 2022-10-28 16:14:30 +02:00
Tomáš Hozza
5a0d286d6b test/api: don't provide Resource Group Location when testing Azure
Let's default to not providing the Resource Group Location when testing
Cloud API with Azure and leave it up to the implementation to determine
the correct location to use.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-27 19:33:43 +02:00
Tomáš Hozza
417a941a1e internal/target/azure_image: mark Location as optional
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-27 19:33:43 +02:00
Tomáš Hozza
1af01ad135 cloudapi: make location optional in Azure Upload Options
Providing the `location` is no longer required for Azure Upload Options.
If it is not provided, the implementation determines the location from
the provided Resource Group. This will make the API nicer for any
client, since they won't need to provide redundant information.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-27 19:33:43 +02:00
Tomáš Hozza
4df3b0ca03 internal/upload/azure: make location optional in various methods
Make the `location` argument optional (can be now empty "") in
`RegisterImage()` and `CreateStorageAccount()` methods.

If the provided `location` argument is an empty string, then the location
is determined from the provided Resource Group instead.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-27 19:33:43 +02:00
Tomáš Hozza
641f7a7d29 internal/upload/azure: add method for getting resource group location
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-27 19:33:43 +02:00
Jakub Rusz
f2671e0074 Update terraform SHA
This update removes all repos on the f-37 runner during provisioning
which should resolve issues with "updates-testing" repo being enabled
and not overwritten.
2022-10-27 12:47:45 +02:00
Tomáš Hozza
9c31f22216 Schutzfile: revert c9s and el9.2 repo updates
The `golang` package version 1.19.1 in c9s and el9 is causing FTBFS

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-27 12:47:45 +02:00
schutzbot
968083ccb7 schutzfile: Update snapshots to 20221025 2022-10-27 12:47:45 +02:00
Ondřej Budai
6291eddbf2 koji: put artifacts uploaded to koji under a second level directory
Koji clean-up doesn't delete the top-level directories. As we named every
top-level directory different, they were just cumulating on kojihub, which
is obviously wrong.

This commit changes that behaviour to put all the temporary directories under
a new osbuild-cg top-level one. This way, osbuild-cg won't ve ever cleaned,
whereas osbuild-cg/osbuild-composer-koji-{UUID} will be, which is exactly
what we want.

Closes: https://github.com/osbuild/osbuild-composer/issues/3064
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-10-25 14:48:13 +02:00
Alexander Todorov
1778d84d68 Remove azure/main.tf file b/c not actually used 2022-10-24 10:16:01 +02:00
Alexander Todorov
699812d70b tests: Update the version of azurerm terraform provider 2022-10-24 10:16:01 +02:00
Sanne Raymaekers
620536fd61 internal/cloudapi: add ostree options for all otree image types
b01792d9dd broke this behaviour. All
ostree image types should have an ostree resolve job.
2022-10-21 22:32:24 +02:00
Sanne Raymaekers
423b4b77d7 schutzbot/update_github_status: fix release fast-forwarding
The checkout in the working directory is a shallow clone with gitlab as
a remote. As a result fast-forwarding failed due to not recognizing the
remote release branch as an ancestor of $CI_COMMIT_SHA.

This clones (with `--bare`) the github remote in a separate
directory. It should not be necessary to remove the release-ff-clone
directory each time, simply fetch if it already exists.
2022-10-21 10:54:30 +02:00
Brian C. Lane
d1e69fe528 spec: Fix ownership of the dnf-json rpmmd files
dnf-json previously ran as a service, and the
/var/cache/osbuild-composer/rpmmd directory and files were owned by
root. As a script called from osbuild-composer those directories and
files need to be owned by _osbuild-composer:_osbuild-composer, otherwise
it will not be able to depsolve after an upgrade from the previous
implementation.

This can be worked around by removing the
/var/cache/osbuild-composer/rpmmd directory and restarting the service
or rebooting.

Fixes #3079
2022-10-21 08:59:48 +02:00
Sanne Raymaekers
8fdd158799 cloudapi/v2: use the ostree resolve job to resolve ostree refs 2022-10-19 18:14:10 +02:00
Sanne Raymaekers
ebeb339f96 osbuild-worker: add ostree resolve job
This job resolves an ostree ref. Similar to the depsolve and container
resolve jobs, this should be a dependency of a manifest job.
2022-10-19 18:14:10 +02:00
Sanne Raymaekers
b01792d9dd internal/ostree: offload using default ostree ref to caller
If params.Ref is an empty string, it's set to the distro's default
ref. The only difference here is that the default ref also gets
verified.

It makes splitting out resolving ostree refs to a new job easier.

In the weldr and cloud apis, ostree.ResolveParams always got executed,
also for non-ostree image types. Make it more explicit by only resolving
if the image type is actually an ostree image.
2022-10-19 18:14:10 +02:00
Tomáš Hozza
ae04c56c32 distro/rhel9: adjust RHSM-related config on EC2 9.1+ images
The EC2 images starting with 9.1 should:
 - not configure RHSM using osbuild
 - install `redhat-cloud-client-configuration` package which ships the
   RHSM configuration.

Regenerate affected image manifests.

Related to COMPOSER-1805

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-19 17:07:36 +02:00
Tomáš Hozza
b65bb9491f distro/rhel8: adjust RHSM-related config on EC2 8.7+ images
The EC2 images starting with 8.7 should:
 - not configure RHSM using osbuild
 - install `redhat-cloud-client-configuration` package which ships the
   RHSM configuration.

Regenerate affected image manifests

Related to COMPOSER-1804.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-19 17:07:36 +02:00
Tomáš Hozza
10432d6103 tools: update repos used to generate 8.7 and 9.1 image manifests
Also drop repos for RHEL-9.0 Beta, which are not used any more.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-10-19 17:07:36 +02:00
Antonio Murdaca
50fb688d43 Use FDO AIO server for testing
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2022-10-19 12:08:34 +02:00
schutzbot
923361aa5f Post release version bump
[skip ci]
2022-10-19 08:41:10 +00:00
Sanne Raymaekers
545ce3412e schutzbot/mockbuild: stop running mock as root
Running mock as root is broken, this commit can be reverted once this is
fixed.

rhbz#2135203
2022-10-17 18:08:31 +02:00
Jakub Rusz
a23b1c4b3e rpmbuild: build rpms on RHEL 8.8 and 9.2 2022-10-14 12:25:36 +02:00
Achilleas Koutsou
abdddc6e55 osbuild: fix gpgkeys json key in ostree source 2022-10-12 03:07:40 +02:00
Tomáš Hozza
6ae8904f5a templates/packer: add comment to get_aws_creds.sh
Add a comment explaining why it is important to set the AWS bucket in
the worker configuration, even if the `AWS_ACCOUNT_IMAGE_BUILDER_ARN` is
empty.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
09daa75adf templates/packer: set the GCP bucket in the worker configuration
Similar to AWS, set the GCP bucket in the worker configuration.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
dc476671e4 weldr/upload/gcp: make Object optional
Previously, it was expected from the user to provide the Object name
when uploading image to GCP. The object name does not matter much,
because the object is deleted once image import finishes. Make
the specification of the object name optional and generate it if not
provided.

Adjust the GCP Weldr test case to not provide the Object name when
uploading the image.

The user can still provide the Object name if needed.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
dd36fce63c worker/gcp: return error if job doesn't specify object key
The object key is required in order to upload the image to GCP. Return
an error if it is not set.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
809107cd45 cloudapi: make Bucket optional in GCPUploadOptions
GCP Bucket to use can be now configured in the worker configuration.
Make the `Bucket` optional in the Cloud API when uploading image to GCP.

Adjust the Cloud API test case to configure GCP Bucket on the worker and
not provide it in the API request.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
ad34043087 internal/target/gcp: make Bucket optional
The Bucket can now be set also in the worker configuration.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
b54b8fa3ab worker/gcp: allow setting Bucket in worker configuration
Extend the worker's configuration to allow setting GCP Bucket to use
when uploading images to GCP. The value from the configuration is used
only if not provided in the TargetOptions of the job.

In GCP, the region of the bucket does not limit importing of the image
to a particular region. So it is completely possible to use a single
Bucket to import images to any and all regions.

Return an error in case no bucket name was set in the job nor in the
worker configuration.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
cc53f5423e worker/osbuild: use dedicated struct for GCP config internally
Previously, the internal `OSBuildJobImpl` structure defined only
`GCPCreds` member. This is not practical, once there will be more
than one GCP-related variable.

Define a new `GCPConfiguration` structure, move the credentials variable
into it and use it in `OSBuildJobImpl` instead.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
13f0894094 worker/aws: don't generate object key in worker
There is a desire to make the worker as "dumb" as possible. Therefore it
is not desired to generate the AWS object key names in the worker if it
was not provided in the job.

Modify the worker code to not generate the AWS object key in any case
and instead set an error in case the object key was not provided.

Modify Weldr API implementation to generate the object key, if it was
not provided by the user. This is consistent with Cloud API
implementation.
2022-10-11 13:23:18 +02:00
Tomáš Hozza
565b8d41c8 worker/aws: prefer bucket from TargetOptions if provided
Flip the logic when deciding if to use the Bucket from the job or worker
configuration. Previously, the Bucket from the worker configuration was
always preferred if it was set, even if it was provided in the job
itself. This made it impossible to override the configuration.

Change the logic to use the Bucket from the worker configuration only if
it was not set in the job.

Report an error if no bucket name was provided with the job and there is
also none specified in the configuration.
2022-10-11 13:23:18 +02:00
dependabot[bot]
3933c37f46 build(deps): bump github.com/aws/aws-sdk-go from 1.44.112 to 1.44.114
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.112 to 1.44.114.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.112...v1.44.114)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 11:14:59 +02:00
Achilleas Koutsou
7ebe3f550c distro/rhel: set ostree sysroot.readonly to false
We used to always set the sysroot.readonly setting to true, but this
never worked because of a bug in osbuild [1].
The bug is now fixed and the RHEL and CentOS edge-raw images are crated
with sysroot.readonly = true, and the images aren't booting.

Fixing the option to false.  This changes the manifests, but not the
generated images because of the change in osbuild.

If sysroot is meant to be readonly, we will change it in a future
update.

[1] https://github.com/osbuild/osbuild/pull/1129
2022-10-11 10:00:22 +02:00
Achilleas Koutsou
55b1e2b6ee test: only set boot args in virt-install version condition
Make it clearer that the only difference between the two cases are the
arguments for --boot.
2022-10-11 10:00:22 +02:00
Achilleas Koutsou
58eeb74c98 test: update raw image script to skip BIOS boot on Fedora 2022-10-11 10:00:22 +02:00
Achilleas Koutsou
97dddd24a5 fedora: remove BIOS boot for IoT raw images 2022-10-11 10:00:22 +02:00
Achilleas Koutsou
e6c7815d41 fedora: use product and os version for discinfo release field
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2022-10-11 10:00:22 +02:00
Achilleas Koutsou
1324f7fb8c osbuild: simplify copy stage test 2022-10-11 10:00:22 +02:00
Achilleas Koutsou
547f7a66b3 fedora: set sysroot read-only only for Fedora 37+ iot-raw-image 2022-10-11 10:00:22 +02:00