From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
kdevops@lists.linux.dev
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH 30/40] Add a guest/instance for building the test kernel
Date: Sun, 27 Jul 2025 17:17:49 -0700 [thread overview]
Message-ID: <20250728001800.3188617-31-mcgrof@kernel.org> (raw)
In-Reply-To: <20250728001800.3188617-1-mcgrof@kernel.org>
From: Chuck Lever <chuck.lever@oracle.com>
Provision a separate guest/instance for the purpose of building the
Linux kernel under test. This builder guest is not used yet.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
playbooks/roles/gen_hosts/defaults/main.yml | 2 ++
playbooks/roles/gen_hosts/tasks/main.yml | 12 ++++++++++
.../roles/gen_hosts/templates/builder.j2 | 13 +++++++++++
playbooks/roles/gen_nodes/defaults/main.yml | 3 +++
playbooks/roles/gen_nodes/tasks/main.yml | 22 +++++++++++++++++++
workflows/linux/Kconfig | 14 ++++++++++++
workflows/linux/Makefile | 4 ++++
7 files changed, 70 insertions(+)
create mode 100644 playbooks/roles/gen_hosts/templates/builder.j2
diff --git a/playbooks/roles/gen_hosts/defaults/main.yml b/playbooks/roles/gen_hosts/defaults/main.yml
index 1cf906d3..d9479552 100644
--- a/playbooks/roles/gen_hosts/defaults/main.yml
+++ b/playbooks/roles/gen_hosts/defaults/main.yml
@@ -41,3 +41,5 @@ kdevops_loopback_nfs_enable: False
kdevops_smbd_enable: False
kdevops_krb5_enable: False
kdevops_enable_iscsi: false
+
+bootlinux_builder: false
diff --git a/playbooks/roles/gen_hosts/tasks/main.yml b/playbooks/roles/gen_hosts/tasks/main.yml
index 58ebd1d4..70d543ad 100644
--- a/playbooks/roles/gen_hosts/tasks/main.yml
+++ b/playbooks/roles/gen_hosts/tasks/main.yml
@@ -56,6 +56,18 @@
when:
- is_fstests
+- name: Generate the Ansible hosts file for a Linux kernel build
+ tags: [ 'hosts' ]
+ template:
+ src: "{{ kdevops_hosts_template }}"
+ dest: "{{ topdir_path }}/{{ kdevops_hosts }}"
+ force: yes
+ trim_blocks: True
+ lstrip_blocks: True
+ when:
+ - bootlinux_builder
+ - ansible_hosts_template.stat.exists
+
- name: Generate the Ansible hosts file
tags: [ 'hosts' ]
template:
diff --git a/playbooks/roles/gen_hosts/templates/builder.j2 b/playbooks/roles/gen_hosts/templates/builder.j2
new file mode 100644
index 00000000..0c9ba1e8
--- /dev/null
+++ b/playbooks/roles/gen_hosts/templates/builder.j2
@@ -0,0 +1,13 @@
+[all]
+{{ kdevops_hosts_prefix }}-builder
+[all:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+[baseline]
+{{ kdevops_hosts_prefix }}-builder
+[baseline:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+[dev]
+[dev:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
diff --git a/playbooks/roles/gen_nodes/defaults/main.yml b/playbooks/roles/gen_nodes/defaults/main.yml
index 3368cf61..6aed5303 100644
--- a/playbooks/roles/gen_nodes/defaults/main.yml
+++ b/playbooks/roles/gen_nodes/defaults/main.yml
@@ -86,6 +86,7 @@ kdevops_workflows_dedicated_workflow: False
kdevops_workflow_enable_fstests: False
kdevops_workflow_enable_blktests: False
+builder_nodes: []
iscsi_nodes: []
is_fstests: False
@@ -101,6 +102,8 @@ bootlinux_9p_mount_tag: "ignore"
bootlinux_9p_security_model: "none"
bootlinux_9p_driver: "virtio-9p-pci"
+bootlinux_builder: false
+
guestfs_requires_uefi: False
kdevops_workflow_enable_sysbench: False
diff --git a/playbooks/roles/gen_nodes/tasks/main.yml b/playbooks/roles/gen_nodes/tasks/main.yml
index ebaba927..ae017ee8 100644
--- a/playbooks/roles/gen_nodes/tasks/main.yml
+++ b/playbooks/roles/gen_nodes/tasks/main.yml
@@ -43,6 +43,14 @@
when:
- kdevops_baseline_and_dev
+- name: Set builder nodes array
+ tags: vars
+ set_fact:
+ builder_nodes:
+ - "{{ kdevops_host_prefix + '-builder' }}"
+ when:
+ - bootlinux_builder
+
- name: Set iscsi_nodes list
ansible.builtin.set_fact:
iscsi_nodes: "{{ [kdevops_host_prefix + '-iscsi'] }}"
@@ -138,6 +146,20 @@
- not kdevops_workflows_dedicated_workflow
- ansible_nodes_template.stat.exists
+- name: Generate the builder kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template
+ tags: [ 'nodes' ]
+ vars:
+ node_template: "{{ kdevops_nodes_template | basename }}"
+ all_generic_nodes: "{{ builder_nodes }}"
+ nodes: "{{ all_generic_nodes }}"
+ template:
+ src: "{{ node_template }}"
+ dest: "{{ topdir_path }}/{{ kdevops_nodes }}"
+ force: yes
+ when:
+ - bootlinux_builder
+ - ansible_nodes_template.stat.exists
+
- name: Generate the pynfs kdevops nodes file using {{ kdevops_nodes_template }} as jinja2 source template
tags: [ 'nodes' ]
vars:
diff --git a/workflows/linux/Kconfig b/workflows/linux/Kconfig
index 27cba0a9..31f57017 100644
--- a/workflows/linux/Kconfig
+++ b/workflows/linux/Kconfig
@@ -77,6 +77,20 @@ config BOOTLINUX_9P
However, 9p is available only when using a local
virtualization method such as libvirt.
+config BOOTLINUX_BUILDER
+ bool "Separate kernel builder"
+ output yaml
+ help
+ Enabling this option brings up a separate guest/instance
+ for building the Linux kernel to test. The new kernel is
+ packaged appropriately for installation on other systems,
+ but is not installed. Once the kernel is built, the kernel
+ packages are saved on the controller host and the builder
+ node can be destroyed.
+
+ This choice is best when the test runners are resource-
+ limited or vastly different than the controller host.
+
endchoice
if BOOTLINUX_9P
diff --git a/workflows/linux/Makefile b/workflows/linux/Makefile
index f5bc6490..01e3d3e4 100644
--- a/workflows/linux/Makefile
+++ b/workflows/linux/Makefile
@@ -13,6 +13,10 @@ ifeq (y,$(CONFIG_BOOTLINUX_PURE_IOMAP))
TREE_CONFIG:=config-$(TREE_REF)-pure-iomap
endif
+ifeq (y,$(CONFIG_BOOTLINUX_BUILDER))
+KDEVOPS_HOSTS_TEMPLATE=builder.j2
+endif
+
# Describes the Linux clone
BOOTLINUX_ARGS += target_linux_git=$(TREE_URL)
# ifeq (y,$(CONFIG_BOOTLINUX_TREE_CUSTOM_NAME))
--
2.47.2
next prev parent reply other threads:[~2025-07-28 0:18 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 0:17 [PATCH 00/40] remove vagrant and bootlinux shape up Luis Chamberlain
2025-07-28 0:17 ` [PATCH 01/40] vagrant: remove entire vagrant configuration directory Luis Chamberlain
2025-07-28 0:17 ` [PATCH 02/40] kconfigs: fix Kconfig references after vagrant removal Luis Chamberlain
2025-07-28 0:17 ` [PATCH 03/40] scripts: remove Vagrant-specific scripts and Makefiles Luis Chamberlain
2025-07-28 0:17 ` [PATCH 04/40] playbooks: remove Vagrant-specific playbooks and roles Luis Chamberlain
2025-07-28 0:17 ` [PATCH 05/40] gitignore: remove Vagrant-specific ignore patterns Luis Chamberlain
2025-07-28 0:17 ` [PATCH 06/40] docs: remove Vagrant-specific documentation files Luis Chamberlain
2025-07-28 0:17 ` [PATCH 07/40] Remove all remaining Vagrant references from codebase Luis Chamberlain
2025-07-28 0:17 ` [PATCH 08/40] AuthorDate: Fri Jul 25 14:23:00 2025 -0400 Luis Chamberlain
2025-07-28 0:17 ` [PATCH 09/40] ansible.cfg: Explicitly set the ssh user Luis Chamberlain
2025-07-28 0:24 ` Chuck Lever
2025-07-28 0:27 ` Luis Chamberlain
2025-07-28 0:36 ` Chuck Lever
2025-07-28 0:17 ` [PATCH 10/40] fstests: local NFS list Luis Chamberlain
2025-07-28 0:17 ` [PATCH 11/40] terraform: Clean up the destroy tasks Luis Chamberlain
2025-07-28 0:17 ` [PATCH 12/40] Switch to the cloud.terraform.terraform module Luis Chamberlain
2025-07-28 0:17 ` [PATCH 13/40] terraform: Make use of the new "terraform_output" module Luis Chamberlain
2025-07-28 0:17 ` [PATCH 14/40] terraform: Move "wait_for_connection" out of the terraform playbook Luis Chamberlain
2025-07-28 0:17 ` [PATCH 15/40] terraform: Remove "delegate_to: localhost" Luis Chamberlain
2025-07-28 0:17 ` [PATCH 16/40] terraform: Replace scripts/status_terraform.sh Luis Chamberlain
2025-07-28 0:17 ` [PATCH 17/40] Kconfig: Convert the 9p option to a choice menu Luis Chamberlain
2025-07-28 0:17 ` [PATCH 18/40] bootlinux: fix making 9p default if using libvirt Luis Chamberlain
2025-07-28 0:17 ` [PATCH 19/40] bootlinux: Relocate tasks that select a kernel .config Luis Chamberlain
2025-07-28 0:17 ` [PATCH 20/40] bootlinux: Simplify tasks that select the kernel .config to build Luis Chamberlain
2025-07-28 0:17 ` [PATCH 21/40] bootlinux: Select the kernel .config earlier Luis Chamberlain
2025-07-28 0:17 ` [PATCH 22/40] bootlinux: Move 9p build tasks to a subrole Luis Chamberlain
2025-07-28 0:17 ` [PATCH 23/40] bootlinux: fix missing make command when using 9P builds Luis Chamberlain
2025-07-28 0:17 ` [PATCH 24/40] guestsfs: ensure linux directory exists Luis Chamberlain
2025-07-28 0:17 ` [PATCH 25/40] bootlinux: Move tasks for building on target nodes to a subrole Luis Chamberlain
2025-07-28 0:17 ` [PATCH 26/40] bootlinux: Clean up a grub set-up task Luis Chamberlain
2025-07-28 0:17 ` [PATCH 27/40] bootlinux: Harden update-grub/install.yml Luis Chamberlain
2025-07-28 0:17 ` [PATCH 28/40] bootlinux: fix grub_boot_number_cmd undefined error in update-grub Luis Chamberlain
2025-07-28 0:17 ` [PATCH 29/40] bootlinux: fix kernel_release_file.stat " Luis Chamberlain
2025-07-28 0:17 ` Luis Chamberlain [this message]
2025-07-28 0:17 ` [PATCH 31/40] bootlinux: Add a new builder choice Luis Chamberlain
2025-07-28 0:17 ` [PATCH 32/40] workflows: Add a kconfig setting for installing kernels via package Luis Chamberlain
2025-07-28 0:17 ` [PATCH 33/40] bootlinux: Enclose tasks to find kernel release name in a block: Luis Chamberlain
2025-07-28 0:17 ` [PATCH 34/40] bootlinux: Pick up kernel release info for pre-built packages Luis Chamberlain
2025-07-28 0:17 ` [PATCH 35/40] bootlinux: Install pre-built kernels from packages Luis Chamberlain
2025-07-28 0:17 ` [PATCH 36/40] bootlinux: Add an option to build with clang instead of gcc Luis Chamberlain
2025-07-28 0:17 ` [PATCH 37/40] Makefile: add make style for style checking Luis Chamberlain
2025-07-28 0:17 ` [PATCH 38/40] CLAUDE.md: new workflow guide for hosts and nodes Luis Chamberlain
2025-07-28 0:17 ` [PATCH 39/40] CLAUDE.md: add don't BS rules Luis Chamberlain
2025-07-28 0:17 ` [PATCH 40/40] gen_nodes/gen_hosts: avoid usage of fs_config_path on task names Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250728001800.3188617-31-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=da.gomez@kruces.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox