* [PATCH v2 0/3] Recent fixes
@ 2024-12-14 17:01 cel
2024-12-14 17:01 ` [PATCH v2 1/3] codereadyrepo: Refactor to prepare for more complex usage scenarios cel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: cel @ 2024-12-14 17:01 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
This series was a handful of loosely related patches that I wrote
while trying to get kdevops operational on AWS again, for use with
NFS workflows. Note that there are still one or two more issues that
need to be tracked down before AWS will be working well for me.
These might also be useful for OCI or other cloud providers.
---
v1 of the series was posted here:
https://lore.kernel.org/kdevops/Z1kKp93hbhxqDF5B@bombadil.infradead.org/T/#t
I've merged the first three patches of the v1 series.
The second half of the v1 series needed more work. Here are 5/6 and
6/6, reworked. This version is hopefully easier to review and will
be easier to add to, going forward.
I've done just a little testing, but found that virt-builder's
CentOS images don't appear to work any more because of community
changes to the mirror repo hostnames. I left the CentOS logic in
place in case someone figures out how to get CentOS working again.
We might also want to think about RHEL 8 / CentOS 8 / OL 8. I
expect those will have distinct CRB repo names as well. I'm hoping
the refactoring here will make it easy to add those if needed.
Chuck Lever (3):
codereadyrepo: Refactor to prepare for more complex usage scenarios
codereadyrepo: Repo name for Oracle Linux
codereadyrepo: Enable codeready-builder for AWS's RHEL 9
.../roles/codereadyrepo/defaults/main.yml | 6 +++
playbooks/roles/codereadyrepo/tasks/main.yml | 46 ++++++++++++++++---
2 files changed, 46 insertions(+), 6 deletions(-)
create mode 100644 playbooks/roles/codereadyrepo/defaults/main.yml
--
2.47.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2 1/3] codereadyrepo: Refactor to prepare for more complex usage scenarios
2024-12-14 17:01 [PATCH v2 0/3] Recent fixes cel
@ 2024-12-14 17:01 ` cel
2024-12-14 17:01 ` [PATCH v2 2/3] codereadyrepo: Repo name for Oracle Linux cel
2024-12-14 17:01 ` [PATCH v2 3/3] codereadyrepo: Enable codeready-builder for AWS's RHEL 9 cel
2 siblings, 0 replies; 4+ messages in thread
From: cel @ 2024-12-14 17:01 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
I'm about to add a few more cases that the codereadyrepo role needs
to handle. The only difference for all of these cases is the name of
the repo to enable, so pull out the selection of that name, then do
the repo enablement task only when a repo name was found.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
playbooks/roles/codereadyrepo/tasks/main.yml | 26 +++++++++++++++-----
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/playbooks/roles/codereadyrepo/tasks/main.yml b/playbooks/roles/codereadyrepo/tasks/main.yml
index 71ad05c9d539..7cf6d83bcccf 100644
--- a/playbooks/roles/codereadyrepo/tasks/main.yml
+++ b/playbooks/roles/codereadyrepo/tasks/main.yml
@@ -1,14 +1,28 @@
---
-- name: Enable the CodeReady repo
- become: yes
- ansible.builtin.command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
+- name: Select the RHEL CodeReady Builder repo
+ ansible.builtin.set_fact:
+ codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms"
when:
- ansible_distribution == 'RedHat'
- not devconfig_custom_yum_repofile
-- name: Enable the CodeReady repo
- become: yes
- ansible.builtin.command: /usr/bin/dnf config-manager --enable crb
+- name: Select the CentOS CodeReady Builder repo
+ ansible.builtin.set_fact:
+ codeready_repo: "crb"
when:
- ansible_distribution == 'CentOS'
- not devconfig_custom_yum_repofile
+
+- name: Enable the selected CodeReady Builder repo
+ become: true
+ become_method: ansible.builtin.sudo
+ ansible.builtin.command:
+ argv:
+ - "/usr/bin/dnf"
+ - "config-manager"
+ - "--enable"
+ - "{{ codeready_repo }}"
+ register: dnf_result
+ when:
+ - codeready_repo is defined
+ changed_when: dnf_result is success
--
2.47.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v2 2/3] codereadyrepo: Repo name for Oracle Linux
2024-12-14 17:01 [PATCH v2 0/3] Recent fixes cel
2024-12-14 17:01 ` [PATCH v2 1/3] codereadyrepo: Refactor to prepare for more complex usage scenarios cel
@ 2024-12-14 17:01 ` cel
2024-12-14 17:01 ` [PATCH v2 3/3] codereadyrepo: Enable codeready-builder for AWS's RHEL 9 cel
2 siblings, 0 replies; 4+ messages in thread
From: cel @ 2024-12-14 17:01 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
The name of the CodeReady Builder repo on Oracle Linux is different
than the other cases that the codereadyrepo role already supports.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
playbooks/roles/codereadyrepo/tasks/main.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/playbooks/roles/codereadyrepo/tasks/main.yml b/playbooks/roles/codereadyrepo/tasks/main.yml
index 7cf6d83bcccf..b1d62eeb384c 100644
--- a/playbooks/roles/codereadyrepo/tasks/main.yml
+++ b/playbooks/roles/codereadyrepo/tasks/main.yml
@@ -6,6 +6,13 @@
- ansible_distribution == 'RedHat'
- not devconfig_custom_yum_repofile
+- name: Select the Oracle Linux CodeReady Builder repo
+ ansible.builtin.set_fact:
+ codeready_repo: "ol9_codeready_builder"
+ when:
+ - ansible_distribution == 'OracleLinux'
+ - not devconfig_custom_yum_repofile
+
- name: Select the CentOS CodeReady Builder repo
ansible.builtin.set_fact:
codeready_repo: "crb"
--
2.47.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v2 3/3] codereadyrepo: Enable codeready-builder for AWS's RHEL 9
2024-12-14 17:01 [PATCH v2 0/3] Recent fixes cel
2024-12-14 17:01 ` [PATCH v2 1/3] codereadyrepo: Refactor to prepare for more complex usage scenarios cel
2024-12-14 17:01 ` [PATCH v2 2/3] codereadyrepo: Repo name for Oracle Linux cel
@ 2024-12-14 17:01 ` cel
2 siblings, 0 replies; 4+ messages in thread
From: cel @ 2024-12-14 17:01 UTC (permalink / raw)
To: kdevops; +Cc: Anna Schumaker, Chuck Lever
From: Chuck Lever <chuck.lever@oracle.com>
When running the pynfs workflow with target nodes in AWS,
"make pynfs" fails with:
Error: No matching repo to modify: codeready-builder-for-rhel-9-x86_64-rpms.
Adjust the logic in the codereadyrepo playbook to sketch in what
is needed for running the pynfs workflow in AWS.
Similar adjustments are likely to be necessary for other cloud
providers and for other distibutions.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
playbooks/roles/codereadyrepo/defaults/main.yml | 6 ++++++
playbooks/roles/codereadyrepo/tasks/main.yml | 13 +++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 playbooks/roles/codereadyrepo/defaults/main.yml
diff --git a/playbooks/roles/codereadyrepo/defaults/main.yml b/playbooks/roles/codereadyrepo/defaults/main.yml
new file mode 100644
index 000000000000..131f26ed510a
--- /dev/null
+++ b/playbooks/roles/codereadyrepo/defaults/main.yml
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier GPL-2.0+
+---
+# Our sensible defaults for the codereadyrepo role.
+
+kdevops_enable_terraform: false
+kdevops_enable_guestfs: false
diff --git a/playbooks/roles/codereadyrepo/tasks/main.yml b/playbooks/roles/codereadyrepo/tasks/main.yml
index b1d62eeb384c..b8ed44620deb 100644
--- a/playbooks/roles/codereadyrepo/tasks/main.yml
+++ b/playbooks/roles/codereadyrepo/tasks/main.yml
@@ -5,6 +5,7 @@
when:
- ansible_distribution == 'RedHat'
- not devconfig_custom_yum_repofile
+ - kdevops_enable_guestfs
- name: Select the Oracle Linux CodeReady Builder repo
ansible.builtin.set_fact:
@@ -12,6 +13,7 @@
when:
- ansible_distribution == 'OracleLinux'
- not devconfig_custom_yum_repofile
+ - kdevops_enable_guestfs
- name: Select the CentOS CodeReady Builder repo
ansible.builtin.set_fact:
@@ -19,6 +21,17 @@
when:
- ansible_distribution == 'CentOS'
- not devconfig_custom_yum_repofile
+ - kdevops_enable_guestfs
+
+# Probably need one of these for each cloud provider
+- name: Select the AWS RHEL CodeReady Builder repo
+ ansible.builtin.set_fact:
+ codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-rhui-rpms"
+ when:
+ - ansible_distribution == 'RedHat'
+ - not devconfig_custom_yum_repofile
+ - kdevops_enable_terraform
+ - kdevops_terraform_provider == "aws"
- name: Enable the selected CodeReady Builder repo
become: true
--
2.47.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-14 17:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-14 17:01 [PATCH v2 0/3] Recent fixes cel
2024-12-14 17:01 ` [PATCH v2 1/3] codereadyrepo: Refactor to prepare for more complex usage scenarios cel
2024-12-14 17:01 ` [PATCH v2 2/3] codereadyrepo: Repo name for Oracle Linux cel
2024-12-14 17:01 ` [PATCH v2 3/3] codereadyrepo: Enable codeready-builder for AWS's RHEL 9 cel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox