From patchwork Sat Dec 14 17:01:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13908526 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A693528F1 for ; Sat, 14 Dec 2024 17:01:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734195702; cv=none; b=IUVv/SZg2UFWsiTKeodYF9FckSzyMVjiE7lu4dHw5S8T1irwYzp3Zgsyiyj/ckPAqwhtUbrGd/kn4C/o3i8Jyyb7oGeoNP/30HJYCxsZbDiYBG1xl1EVl0WJfno5suAnMx50GMuzqWFY9DO9pl5kctxmGxmWVwFVAJ/rOdYTP9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734195702; c=relaxed/simple; bh=gIbVMhJK3FllM0bXdgyIr/H3JYcGsrSBZAqVBuU6pM4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GRVZvYPRBDpsDKkcKegsy7UhElSLtxO+dcVHMzVSBlXwsSVtwqpp0CWuKCRKu5qrlLWDUGQ9ZQbTDR577wnhcpQRpdzmhGtGTziq1/aRToxpjPi+JpU2+f71GAqiPFAUMTmZQbq3sdH9ny3V3260nipR1RdUK6fYmWUKYnk/0fw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L0hYv2ej; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L0hYv2ej" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB6DEC4CED4; Sat, 14 Dec 2024 17:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734195702; bh=gIbVMhJK3FllM0bXdgyIr/H3JYcGsrSBZAqVBuU6pM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L0hYv2ejbrdQSn5CBwX5Mzk3RkLgWYH5+FDzPyFNQnu7oHW3Ry0tRJx4Sor1TTEJY /ruoANrGsYvfB3LxDq65J+skemhjsKGnS38LGie/m1GyLLe60z5cT6+VAoiTigEjAT AaKZylFi79rnpOV57agD0U5AE/J164ZH9swQ54JXdlqeMX/QPVr0+h4+kL3Xd+zi7p FOnP/DS6CpvRTDwJEbsC0TJT8U0dzoYKH8SYnc98cV2Ts2KPAqDMbZk36Fmw17xd6N uBoH3ZRNgwGTodhG3cnzZxTBONV8RLdf4nuTM3Xjb00NtP8M4GcWKCgf8IjLg+m5MM 1SMB/nhYJYuqQ== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH v2 1/3] codereadyrepo: Refactor to prepare for more complex usage scenarios Date: Sat, 14 Dec 2024 12:01:37 -0500 Message-ID: <20241214170139.253602-2-cel@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241214170139.253602-1-cel@kernel.org> References: <20241214170139.253602-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever 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 --- 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 From patchwork Sat Dec 14 17:01:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13908528 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5888928F1 for ; Sat, 14 Dec 2024 17:01:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734195703; cv=none; b=Tf/40FGV3vETeAqhcvLrrjzmIEm0nJJy2ck1DZee/QQvWgSFc9ULrcFmdAfZ3dRv2L1XLUdrK1lcmBrIrkRV/g+GyGbrSqXD9mHCdPo83xu7tWUNvsgWEALo51ak2P7tG9t4J5D7upUj8eCywoCw/6hrl7r4eY/XN4Sjl1qwKMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734195703; c=relaxed/simple; bh=+/VV18qLaFWH1luHPSJhGN+7uqRboByi+5VjXLebiug=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KA0nkZS0x8Nsv1ie9Nd6/OrJ2EN614gYk1UoO6RhzIeDCzEDONkwwPVa4JAPSFyX/zBeGYFZIbVCqoWCIyWQCCMALcxH0lHpCZFrpwG76asjHefWwjdgJ4WhUsT3dFxase+vIszFDJvkckhqjq4buygfTP3kcNhPXhIYhy+DS8Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AsUxDq7p; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AsUxDq7p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86BD7C4CEDD; Sat, 14 Dec 2024 17:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734195702; bh=+/VV18qLaFWH1luHPSJhGN+7uqRboByi+5VjXLebiug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AsUxDq7pDxy88Bdjza937lSDfcZMa4/LRicIJu2L/qD55yZBNggUfD0yO9GARMxBi MASs71IKHpoX0s7iO2CGI8Ra/rJck+25TnDkaLCdJnpUjIw79mLGbpFm73E7ArFgRE GkEf2xTbVWt9VpsrMI5CoXb+q/8lxxDyHFJboSBhF1NI+TbojQrUxTFkQpSe0LSeQp WzkRQNJ0PbS6xtPYOiRjZTeaHnqtQpH6xp6yVT0biJ4ApHAzdl7zj5XKnKOKsVKIiz jyw75OUqmEBr5XDzlCk3l6CB0DmVB8s9nEtCNaznCMD31rQdbWjlQtqlkP9r2e9GUx 6FezhCDXDRTEw== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH v2 2/3] codereadyrepo: Repo name for Oracle Linux Date: Sat, 14 Dec 2024 12:01:38 -0500 Message-ID: <20241214170139.253602-3-cel@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241214170139.253602-1-cel@kernel.org> References: <20241214170139.253602-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever 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 --- 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" From patchwork Sat Dec 14 17:01:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13908529 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC9C228F1 for ; Sat, 14 Dec 2024 17:01:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734195703; cv=none; b=tb69VqyAOUZvhskPzhgNUUR4Wu08rpLsQAkouXFaqi9aNrXseDiFQCCaB/EutPdA27+3wlss4KTVuBo1XmMiHfewpNnaJiHofgSDHVMKjxEWR8HXwkDjX2O9kmog8Z58NWpogXSuCLoFy4oAW+AgfUma3oPJt8HXurWqr0GkyEE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734195703; c=relaxed/simple; bh=ONcjAAddrgtYQL8ioBhyJyQBkI8r477FM2PXsQmJhZc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QXq+807/2dWqQGqFOGHNiGIFuok+ZYkqK9C22kRk4KK8XipmMmaF/+vHMJN5ry/ErHayUsoa8juUEwxd6rwqlYsUNEjcq1RYOF/UC0+B28rXdTJU0EQecAoUrYTkz9+U7uNsJVh4NSjcPUuaio8aZEooOb8yNoD8xYzbto0uNBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gVVGPgCD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gVVGPgCD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24D99C4CEE0; Sat, 14 Dec 2024 17:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734195703; bh=ONcjAAddrgtYQL8ioBhyJyQBkI8r477FM2PXsQmJhZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gVVGPgCDDz7EiwQs8NOZ05oEKj6O6H4n+RrFsJ/Sy/4atbEflqIbpjS2u8Laz+Mf2 r0+klKZW6bTD7+Cz/hyIQsbhH6omF8wnH65CSqniwzo+p4jNWvoFm238K0SysmaU78 p+rYA4pNMTbMGRSUSB/XR84G0wPnNmkGVMkC2PrqO4+y1CPk9wD5hPCJXQQqFDAQwM Azxkl6sLVvjm2erB9ynBXdakCT/mFNQBQD9ppMm5d5FYCk2U+BJ/fLgRJSOHYxAZah kkTkYx+VDsI2j1tyjFG0kqZdIIvnVoA06UD1sqzeIOp6J9lVVGkZ7WPbt+XUIul8DU sZpyJP5gepGGg== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH v2 3/3] codereadyrepo: Enable codeready-builder for AWS's RHEL 9 Date: Sat, 14 Dec 2024 12:01:39 -0500 Message-ID: <20241214170139.253602-4-cel@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241214170139.253602-1-cel@kernel.org> References: <20241214170139.253602-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever 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 --- 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