Commit graph

244 commits

Author SHA1 Message Date
Florian Schüller
9006836afc logrus: add deployment channel as field to the logs 2024-08-07 12:32:57 +02:00
Florian Schüller
54904d47da Change log_level for the service to json
This is to be inline with image-builder and to
enable decoding in splunk
2024-07-31 17:46:01 +02:00
Tomáš Hozza
c94b6ccde6 Templates: define 'rhel-10' distro alias
Define `rhel-10` distro alias in the OpenShift template. Even though the
same alias is defined in the default configuration, I think that it is
good to also include it in the template to not forget about it in the
future.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-07-17 11:02:41 +02:00
Sanne Raymaekers
786f44e7e7 templates/dashboards: human readable job duration targets
Also makes the default 40m, which is the new slo target for osbuild
jobs.
2024-07-04 12:46:19 +02:00
Sanne Raymaekers
af73f2eccf templates/packer: make set_executor_hostname executable
Prevents `worker-executor.service: Failed at step EXEC spawning
/usr/local/libexec/worker-initialization-scripts/set_executor_hostname.sh:
Permission denied`.
2024-06-26 10:56:57 +02:00
Sanne Raymaekers
2a621521a8 osbuildexecutor/aws.ec2: set hostname of executor via cloud-init
This way much more of the journal will be captured under the new
hostname.
2024-06-25 10:58:10 +02:00
Sanne Raymaekers
55439fc6d3 templates/dashboards: remove active worker count
It's misleading since it counts the amount of workers that have
registered to the current composer pods, it doesn't actually keep track
of the active workers.

Remove it and keep the worker-api stats as a proxy for active workers.
2024-06-12 17:20:01 +02:00
Sanne Raymaekers
7d7bce76c0 templates/packer: use osbuild-worker-executor 2024-06-12 11:36:30 +02:00
Sanne Raymaekers
7e89085808 templates/openshift/composer: remove maintenance cronjob
This is now deployed from a separate tempate.
2024-06-12 09:42:27 +02:00
Tomáš Hozza
607b65c67f Templates: update RHEL distro aliases
The latest GA releases are 8.10 and 9.4.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Sanne Raymaekers
4629a31f22 templates/packer: use python3.10 on fedora
Ansible on fedora 40 seems broken, the default python 3.12 interpreter
doesn't work, 3.10 works but then the dnf module breaks.

Use 3.10 and stop using the dnf module.
2024-05-31 13:55:58 +02:00
Sanne Raymaekers
22e15da73c templates/packer: use import_tasks instead of include_tasks
The tags don't get inherited through the dynamic `include_tasks`
command. Use `import_tasks` to preserve the tags.
2024-05-31 13:55:58 +02:00
Sanne Raymaekers
a96f1b6d31 templates/packer: switch to fedora-40
Fedora 38 is EOL, and packit no longer builds rpms for it.

The current python3.12 + ansible 2.12 combination which is the default
on fedora 40 doesn't work, so switch to python3.9.
2024-05-29 19:36:31 +02:00
Sanne Raymaekers
13aae7d532 templates/packer: invert tag logic
With the rpmcopy or rpmrepo_osbuild tags, the `Install worker rpm` stage
got skipped on RHEL and CI. Invert the tag logic and use `--tags`
instead of `--skip-tags`.
2024-05-21 09:40:11 +02:00
Sanne Raymaekers
c886d6c1f5 templates/dashboards: fix community-stage tenant variable
A space is necessary before and after the colon separating the key and
the value.

[skip ci]
2024-05-08 12:59:34 +02:00
Sanne Raymaekers
592308f7af templates/packer/ansible: add task to install rpms from copr
Split the rpmrepo tasks in osbuild and composer. With copr we'll use
osbuild from rpmrepo, because the osbuild copr rpms disappear too
quickly.
2024-05-07 13:57:48 +02:00
Sanne Raymaekers
49566b7ce4 templates/packer: add failure script
In case the service failed, set the instance to unhealthy.
2024-05-02 13:34:47 +02:00
Sanne Raymaekers
a8148f9b34 templates/openshift/maintenance: fix service account 2024-04-30 16:58:00 +02:00
Sanne Raymaekers
7901889d87 templates/openshift/maintenance: PGSSLMODE is a parameter
Parameters need to be declared.
2024-04-30 16:58:00 +02:00
Sanne Raymaekers
a87e3069a1 templates/openshift: make the maintenance template generic
We could deploy this job for both composer and each tenant's workers
that's present in app-intf. Then we can remove the maintenance bits from
the composer template.
2024-04-29 15:04:52 +02:00
Sanne Raymaekers
5a776c5b79 templates/openshift: split worker from composer maintenance 2024-04-25 17:32:21 +02:00
Sanne Raymaekers
3827f710de templates/openshift: move openshift templates to separate folder
Keep a symlink to the old composer template so the current deployment
doesn't break.
2024-04-25 17:32:21 +02:00
Sanne Raymaekers
3df0c3a631 templates/packer: fix proxy config in ldap service account init
The proxy is set to "null" currently.
2024-04-23 22:13:17 +02:00
Sanne Raymaekers
e607f3b629 dashboards/worker-general: bump version 2024-04-22 13:05:39 +02:00
Sanne Raymaekers
f6acb31dd8 dashboards/worker-general: add community-stage tenant 2024-04-22 13:05:39 +02:00
Sanne Raymaekers
2eea99d008 dashboards/worker-general: min intervals and multi tooltip mode 2024-04-22 13:05:39 +02:00
Sanne Raymaekers
10d2e272a4 dashboards/worker-general: add active worker count 2024-04-22 13:05:39 +02:00
Sanne Raymaekers
95ae8ed917 dashboards/worker-general: fix tenant query 2024-04-22 13:05:39 +02:00
Sanne Raymaekers
ac9f4a2c81 dashboards/worker-general: update schema 2024-04-22 13:05:39 +02:00
Sanne Raymaekers
b8d97b7b68 templates/composer: worker heartbeat timeout of 5m
The default timeout of 1 hour is fine for on-prem, but in the service it
makes workers seemingly stick around for way too long.
2024-04-19 19:56:25 +02:00
Sanne Raymaekers
677e30cc68 templates/packer: add proxy 2024-04-17 16:17:57 +02:00
Sanne Raymaekers
18db445745 Revert "templates/packer: set http(s)_proxy environment variabl…"
This reverts commit 484c82ce55.

The AWS sdk fails to get the instance identity document when the proxy
is configured. The proxy will need to be configured explicitly for the
depsolve job and osbuild (sources) job.
2024-04-17 16:17:57 +02:00
Sanne Raymaekers
484c82ce55 templates/packer: set http(s)_proxy environment variable in unit 2024-04-10 10:03:43 +02:00
Sanne Raymaekers
c8130d0689 templates/packer: support ldap service account for repo mtls conf
The secret needs 3 fields, the cert, key and baseurl for the
repository. The CA is optional.
2024-03-29 20:45:05 +01:00
Sanne Raymaekers
cda94f4f62 templates/packer: don't subscribe executor
All the required sources will be proxied.
2024-03-19 17:07:30 +01:00
Ondřej Budai
e5853c9aa5 Remove rhel-10.0 alias from the openshift template
We now have a proper rhel-10.0 distribution, and this alias is clashing
with it, so we are seeing the following message in production:

failed to configure distro aliases: invalid aliases: ["alias 'rhel-10.0' masks an existing distro"]

Let's fix it by removing the alias, it's obviously not needed anymore.
2024-03-15 15:29:45 +01:00
Tomáš Hozza
f660ed65b6 Packer: remove escaped newline from worker config
If the /tmp/cloud_init_vars contained OSBUILD_EXECUTOR_CLOUDWATCH_GROUP
variable set, the worker configuration file would contain a line with
escaped newline character at the end of the value configuring
`cloudwatch_group` for the `osbuild_executor`. This makes the worker
fail to start when loading the configuration.

Remove the newline from the value appended to the worker config by the
initialization script.

Fix #4001

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-03-11 10:46:57 +01:00
Tomáš Hozza
1659d190b0 Packer: set 'cloudwatch_group' in worker config if provided
Set the 'cloudwatch_group' value in the worker configuration if provided
in /tmp/cloud_init_vars, so that it is used by the worker when spinning
up an osbuild-executor instance.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-03-08 13:13:44 +01:00
Tomáš Hozza
7c42924ffa Packer: don't source non-existing file in worker_executor.sh
The /tmp/cloud_init_vars is not created on the worker executor, so
sourcing it will make the script fail. Comment the line out, until we
change the worker implementation to inject this file into the worker
executor using cloud-init.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-03-07 13:31:55 +01:00
Sanne Raymaekers
86e19bf198 templates/packer: set up vector correctly in the executor 2024-03-07 13:15:36 +01:00
Sanne Raymaekers
ef44f22d89 templates/packer: vector expects a yaml configuration now
When switching to the new vector repos, the version was also bumped. The
newer versions expect a yaml config.
2024-03-07 07:32:47 +01:00
Sanne Raymaekers
aa156028b5 templates/packer: make worker_config script executable 2024-03-06 20:38:36 +01:00
Tomáš Hozza
f02fe86366 Packer: make osbuild-executor worker config more configurable
We need to use custom IAM policy name used by the worker for
osbuild-executor on Fedora workers (in prod vs. stage). And we have the
same requirement for the CloudWatch log group used by the
osbuild-executor.

Modify the Ansible playbook used by Packer to use the values from
/tmp/cloud_init_vars if set and defaulting to the current values if not
set.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-03-06 12:02:56 +01:00
Sanne Raymaekers
9004ca6310 Revert "packer: pin the vector version"
This reverts commit 5315264f2e.

This got fixed in 0.22.1.
2024-03-05 19:10:28 +01:00
Sanne Raymaekers
cad29f93a7 templates/packer: migrate vector to new repos
See https://vector.dev/highlights/2023-11-07-new-linux-repos/ for more
information.
2024-03-05 19:10:28 +01:00
Tomáš Hozza
e561ba0854 templates/composer: set DISTRO_ALIASES for composer
Set the RHEL release names without the minor version to point to the
latest GA release. Set the 'rhel-10.0' to the latest RHEL-9 minor
release in development, so that one can start building RHEL-10 images
without referencing RHEL-9.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-02-21 12:06:33 +01:00
Sanne Raymaekers
1abd887c23 templates/packer: rename executor log group
In app-interface the output resource names need to be unique, and the
log group name is already shared with the role.
2024-02-16 11:46:03 +01:00
Sanne Raymaekers
3400c5c20d templates/packer: setup vector in osbuild-executor 2024-02-15 12:05:17 +01:00
Sanne Raymaekers
a9010479e3 templates/packer: set -builder-path to /var/cache/osbuild-builder
The builder uses `/run/osbuild` as a default path for this argument. Yet
this directory doesn't exist when the builder writes the manifest. But
osbuild should own this directory, not the builder.

Furthermore `/run` is a tmpfs, so the executor might run into memory
issues if we use `/run` as the store and output directory (on the "host"
workers these are in `/var/cache`).

While `/tmp` might seem like a good candidate on RHEL, it's a tmpfs on
Fedora, so it's also to be avoided.
2024-02-15 01:02:10 +01:00
Sanne Raymaekers
04ce056b6a templates/packer: let the executor listen on all interfaces 2024-02-14 22:55:54 +01:00