Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
58bd128
scripts: Update gen_ssh_key.sh
chucklever Jul 26, 2025
727e5b3
terraform/azure: Fix count of managed disks
chucklever Jul 25, 2025
c8f0da2
terraform/azure: Remove tags from terraform configuration
chucklever Jul 27, 2025
b169913
terraform/azure: Enable network acceleration
chucklever Jul 25, 2025
9fca953
terraform/azure: Make the resource group name a variable
chucklever Jul 31, 2025
7a1b841
terraform/azure: Remove the provider version constraint
chucklever Aug 13, 2025
a7aad22
terraform/azure: Update the RHEL publishers
chucklever Aug 17, 2025
6a45ad0
terraform/oci: Work around oracle/oci provider bug
chucklever Aug 9, 2025
19134f0
terraform/oci: Add Kconfig choices for disk performance provisioning
chucklever Aug 9, 2025
4210198
terraform/oci: Enable preemptible compute instances
chucklever Aug 9, 2025
bdc5b1f
terraform/aws: Fix zone selection for us_west1
chucklever Aug 5, 2025
9f08836
Revert "terraform/aws: Add Oracle Linux AMI selections"
chucklever Aug 18, 2025
345f222
terraform/aws: Remove unused terraform tags
chucklever Aug 19, 2025
2645245
terraform/GCE: Fix the default disk throughput values
chucklever Aug 18, 2025
b2e009f
terraform/gce: Remove unused tags
chucklever Aug 19, 2025
06ef40f
terraform/gce: Remove support for Fedora
chucklever Aug 26, 2025
5b9d674
terraform/gce: Update existing machine types and introduce new ones
chucklever Aug 26, 2025
d9bc0eb
terraform: Create the user's .ssh/config if it does not already exist
chucklever Aug 16, 2025
165827e
pynfs: Don't install xdrlib3 on older RHEL
chucklever Aug 20, 2025
d4e0dfd
guestfs: Update the guestfs playbook description
chucklever Aug 26, 2025
13a25c0
gen_hosts: Add 'localhost' to the [all] group
chucklever Aug 26, 2025
daaa9d0
guestfs: Don't run the 'destroy' tags on the controller
chucklever Aug 26, 2025
6bb3bfb
base_image: Skip "locales-all" package installation
chucklever Aug 27, 2025
89e207b
update_etc_hosts: ipaddr
chucklever Aug 3, 2025
a0000be
Add an Ansible requirements.yml file
chucklever Aug 16, 2025
693c3fe
terraform/oci: Clean up the route table resource
chucklever Aug 22, 2025
4221ad0
guestfs: Correct the spelling of "drives"
chucklever Aug 27, 2025
4ba44d1
guestfs: Configure how many extra drives to provision
chucklever Aug 27, 2025
32c3afa
ltp: Replace /opt with a symlink to data partition
chucklever Aug 30, 2025
097820f
terraform: Squelch Ansible complaints about missing inventory file
chucklever Aug 29, 2025
c70db10
terraform: Skip localhost when waiting for targets to reboot
chucklever Aug 29, 2025
94d0e31
devconfig: include the "service" group in the playbooks hosts list
chucklever Sep 3, 2025
7031183
Makefile: Remove CONFIG_TOPDIR_PATH_HAS_SHA256SUM
chucklever Aug 29, 2025
5fc9004
Makefile: Set TOPDIR_PATH and generate its sha256sum at run time
chucklever Aug 28, 2025
796a8f2
ansible.cfg: generate an ansible.cfg file in TOPDIR
chucklever Aug 28, 2025
dc032f9
inventory: generate the inventory pathname dynamically
chucklever Aug 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@

mainmenu "$(PROJECT) $(PROJECTRELEASE)"

config TOPDIR_PATH
string
output yaml
default $(shell, echo $TOPDIR_PATH)

config TOPDIR_PATH_HAS_SHA256SUM
bool
output yaml
default y

config TOPDIR_PATH_SHA256SUM
string
output yaml
default $(shell, ./scripts/compute_sha256sum.sh $(TOPDIR_PATH))

config HAVE_KDEVOPS_CUSTOM_DEFAULTS
bool
default n
Expand Down
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export KDEVOPS_NODES :=
export PYTHONUNBUFFERED=1
export TOPDIR=./
export TOPDIR_PATH = $(shell readlink -f $(TOPDIR))
export TOPDIR_PATH_SHA256SUM = $(shell ./scripts/compute_sha256sum.sh $(TOPDIR_PATH))

# Export CLI override variables for Kconfig to detect them
# Note: We accept DECLARE_HOSTS but export as DECLARED_HOSTS for consistency
Expand All @@ -32,11 +33,21 @@ KDEVOPS_NODES_ROLE_TEMPLATE_DIR := $(KDEVOPS_PLAYBOOKS_DIR)/roles/gen_nodes/tem
export KDEVOPS_NODES_TEMPLATE :=
export KDEVOPS_MRPROPER :=

ifeq (y,$(CONFIG_ANSIBLE_CFG_FILE_CUSTOM))
ifneq ($(strip $(CONFIG_ANSIBLE_CFG_FILE)),)
ANSIBLE_CFG_FILE := $(shell echo $(CONFIG_ANSIBLE_CFG_FILE) | tr --delete '"')
export ANSIBLE_CONFIG := $(ANSIBLE_CFG_FILE)
endif
else
ANSIBLE_CFG_FILE := $(TOPDIR_PATH)/ansible.cfg
export ANSIBLE_CONFIG := $(ANSIBLE_CFG_FILE)
endif

ifeq (y,$(CONFIG_ANSIBLE_CFG_INVENTORY_CUSTOM))
ANSIBLE_INVENTORY_FILE := $(shell echo $(CONFIG_ANSIBLE_CFG_INVENTORY) | tr --delete '"')
else
ANSIBLE_INVENTORY_FILE := $(TOPDIR_PATH)/hosts
endif

KDEVOPS_INSTALL_TARGETS :=

Expand Down Expand Up @@ -89,6 +100,13 @@ INCLUDES = -I include/
CFLAGS += $(INCLUDES)

ANSIBLE_EXTRA_ARGS += kdevops_version='$(PROJECTRELEASE)'
ANSIBLE_EXTRA_ARGS += topdir_path_sha256sum='$(TOPDIR_PATH_SHA256SUM)'
ifneq (y,$(CONFIG_ANSIBLE_CFG_FILE_CUSTOM))
ANSIBLE_EXTRA_ARGS += ansible_cfg_file='$(ANSIBLE_CFG_FILE)'
endif
ifneq (y,$(CONFIG_ANSIBLE_CFG_INVENTORY_CUSTOM))
ANSIBLE_EXTRA_ARGS += ansible_cfg_inventory='$(ANSIBLE_INVENTORY_FILE)'
endif

export KDEVOPS_HOSTS_TEMPLATE := hosts.j2

Expand Down
1 change: 1 addition & 0 deletions Makefile.kdevops
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ PHONY := kdevops_all

kdevops_terraform_deps:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
--inventory localhost, \
$(KDEVOPS_PLAYBOOKS_DIR)/install_terraform.yml
PHONY += kdevops_terraform_deps

Expand Down
24 changes: 24 additions & 0 deletions kconfigs/Kconfig.ansible_cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ config ANSIBLE_CFG_INVENTORY_SET_BY_CLI
bool
default $(shell, scripts/check-cli-set-var.sh KDEVOPS_HOSTS)

config ANSIBLE_CFG_FILE_CUSTOM
bool "Set a custom location for the ansible.cfg file"
help
When this option is set to N, kdevops creates an ansible.cfg
in a sensible default location, using the settings defined
in this Kconfig menu. If it is set to Y, you can set the
path and filename of the Ansible configuration file.

if ANSIBLE_CFG_FILE_CUSTOM

config ANSIBLE_CFG_FILE
string "Ansible configuration file"
output yaml
Expand All @@ -41,6 +51,8 @@ config ANSIBLE_CFG_FILE
For more details, refer to the Ansible documentation:
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#the-configuration-file

endif # ANSIBLE_CFG_FILE_CUSTOM

menu "Ansible Callback Plugin Configuration"
choice
prompt "Ansible Callback Plugin"
Expand Down Expand Up @@ -251,6 +263,16 @@ config ANSIBLE_CFG_TASK_DEBUGGER

https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_debugger.html#id10

config ANSIBLE_CFG_INVENTORY_CUSTOM
bool "Set a custom location for the Ansible inventory"
help
When this option is set to N, kdevops creates its
inventory file in a sensible default location. If it is
set to Y, you can set the path and filename of the Ansible
inventory.

if ANSIBLE_CFG_INVENTORY_CUSTOM

config ANSIBLE_CFG_INVENTORY
string "Ansible inventory sources"
output yaml
Expand All @@ -270,6 +292,8 @@ config ANSIBLE_CFG_INVENTORY
For more details, refer to the Ansible documentation:
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-host-list

endif # ANSIBLE_CFG_INVENTORY_CUSTOM

if DISTRO_OPENSUSE

config ANSIBLE_CFG_RECONNECTION_RETRIES
Expand Down
45 changes: 45 additions & 0 deletions kconfigs/Kconfig.libvirt
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,51 @@ config LIBVIRT_HOST_PASSTHROUGH
--pre 'make -s mrproper defconfig' \
\-- make -s -j$(nproc) bzImage

choice
prompt "Libvirt extra storage drive count"
default LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_4
help
This option selects the number of extra storage drives to
provision for each libvirt guest. Reduce this number to
conserve local host storage capacity, if your workflows do
not use all the extra drives.

config LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_0
bool "0"
help
Provision no extra storage drives per guest.

config LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_1
bool "1"
help
Provision one extra storage drive per guest.

config LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_2
bool "2"
help
Provision two extra storage drives per guest.

config LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_3
bool "3"
help
Provision three extra storage drives per guest.

config LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_4
bool "4"
help
Provision four extra storages drive per guest.

endchoice

config LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT
int
output yaml
default 0 if LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_0
default 1 if LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_1
default 2 if LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_2
default 3 if LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_3
default 4 if LIBVIRT_EXTRA_STORAGE_DRIVE_COUNT_4

choice
prompt "Libvirt extra storage driver to use"
default LIBVIRT_EXTRA_STORAGE_DRIVE_VIRTIO
Expand Down
2 changes: 1 addition & 1 deletion playbooks/devconfig.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Configure developer environment on target systems
hosts: baseline:dev
hosts: baseline:dev:service
gather_facts: false
roles:
- role: devconfig
1 change: 1 addition & 0 deletions playbooks/gen_tfvars.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- name: Generate Terraform variables file (terraform/terraform.tfvars)
connection: local
hosts: localhost
roles:
- role: gen_tfvars
2 changes: 1 addition & 1 deletion playbooks/guestfs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Provision target nodes with libvirt/guestfs
- name: Manage infrastructure lifecycle and SSH access with libvirt/guestfs
gather_facts: true
connection: local
hosts: all
Expand Down
1 change: 1 addition & 0 deletions playbooks/install_terraform.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- name: Install Terraform
connection: local
hosts: localhost
roles:
- role: install_terraform
2 changes: 1 addition & 1 deletion playbooks/roles/base_image/templates/virt-builder.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mkdir {{ target_dir }}
copy-in {{ guestfs_distro_source_and_dest_file }}:{{ target_dir }}
{% endif %}

install sudo,qemu-guest-agent,python3,bash,locales-all
install sudo,qemu-guest-agent,python3,bash
run-command useradd {{ kdevops_uid }} -s /bin/bash -m kdevops
append-line /etc/sudoers.d/kdevops:kdevops ALL=(ALL) NOPASSWD: ALL
edit /etc/default/grub:s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"/
Expand Down
3 changes: 3 additions & 0 deletions playbooks/roles/gen_hosts/templates/blktests.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
{% endif %}
[dev:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[service]
[service:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
5 changes: 5 additions & 0 deletions playbooks/roles/gen_hosts/templates/builder.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[all]
localhost ansible_connection=local
{{ kdevops_hosts_prefix }}-builder
[all:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
Expand All @@ -11,3 +12,7 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[dev]
[dev:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"

[service]
[service:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
3 changes: 3 additions & 0 deletions playbooks/roles/gen_hosts/templates/cxl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
{% endif %}
[dev:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[service]
[service:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
4 changes: 4 additions & 0 deletions playbooks/roles/gen_hosts/templates/ltp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
{% endif %}
[dev:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"

[service]
[service:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
3 changes: 3 additions & 0 deletions playbooks/roles/gen_hosts/templates/mmtests.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
{% endfor %}
[mmtests:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[service]
[service:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
3 changes: 3 additions & 0 deletions playbooks/roles/gen_hosts/templates/selftests.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
{% endif %}
[dev:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[service]
[service:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
3 changes: 3 additions & 0 deletions playbooks/roles/gen_hosts/templates/sysbench.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
{% endif %}
[dev:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[service]
[service:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
8 changes: 4 additions & 4 deletions playbooks/roles/gen_nodes/templates/drives.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ the drives can vary by type, so we have one macro by type of drive.
libvirt_extra_drive_format,
libvirt_extra_storage_aio_mode,
libvirt_extra_storage_aio_cache_mode) -%}
<!-- We generated {{ num_drives }} ide dives -->
<!-- We generated {{ num_drives }} ide drives -->
{% for n in range(0,num_drives) %}
<!-- This is IDE drive # {{ n + 1 }} -->
<qemu:arg value='-drive'/>
Expand All @@ -26,7 +26,7 @@ the drives can vary by type, so we have one macro by type of drive.
libvirt_extra_storage_aio_cache_mode,
libvirt_extra_storage_virtio_logical_block_size,
libvirt_extra_storage_virtio_physical_block_size) -%}
<!-- We generated {{ num_drives }} virtio dives -->
<!-- We generated {{ num_drives }} virtio drives -->
{% for n in range(0,num_drives) %}
<!-- This is virtio drive # {{ n + 1 }} -->
<qemu:arg value='-device'/>
Expand All @@ -46,7 +46,7 @@ the drives can vary by type, so we have one macro by type of drive.
libvirt_extra_drive_format,
libvirt_extra_storage_aio_mode,
libvirt_extra_storage_aio_cache_mode) -%}
<!-- We generated {{ num_drives }} scsi dives -->
<!-- We generated {{ num_drives }} scsi drives -->
{% for n in range(0,num_drives) %}
<!-- This is scsi drive # {{ n + 1 }} -->
<qemu:arg value='-device'/>
Expand Down Expand Up @@ -103,7 +103,7 @@ the drives can vary by type, so we have one macro by type of drive.
libvirt_extra_storage_aio_mode,
libvirt_extra_storage_aio_cache_mode,
libvirt_extra_storage_nvme_logical_block_size) -%}
<!-- We generated {{ num_drives }} NVMe dives -->
<!-- We generated {{ num_drives }} NVMe drives -->
{% for n in range(0,num_drives) %}
<!-- This is NVMe drive # {{ n + 1 }} -->
<qemu:arg value='-device'/>
Expand Down
8 changes: 4 additions & 4 deletions playbooks/roles/gen_nodes/templates/gen_drives.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% import './templates/drives.j2' as drives %}
{% if libvirt_extra_storage_drive_ide %}
{{ drives.gen_drive_ide(4,
{{ drives.gen_drive_ide(libvirt_extra_storage_drive_count,
kdevops_storage_pool_path,
hostname,
libvirt_extra_drive_format,
Expand All @@ -18,7 +18,7 @@
libvirt_extra_storage_aio_cache_mode,
kdevops_storage_pool_path) }}
{% else %}
{{ drives.gen_drive_virtio(4,
{{ drives.gen_drive_virtio(libvirt_extra_storage_drive_count,
kdevops_storage_pool_path,
hostname,
libvirt_extra_drive_format,
Expand All @@ -28,7 +28,7 @@
libvirt_extra_storage_virtio_physical_block_size) }}
{% endif %}
{% elif libvirt_extra_storage_drive_scsi %}
{{ drives.gen_drive_scsi(4,
{{ drives.gen_drive_scsi(libvirt_extra_storage_drive_count,
kdevops_storage_pool_path,
hostname,
libvirt_extra_drive_format,
Expand All @@ -46,7 +46,7 @@
libvirt_extra_storage_aio_cache_mode,
kdevops_storage_pool_path) }}
{% else %}
{{ drives.gen_drive_nvme(4,
{{ drives.gen_drive_nvme(libvirt_extra_storage_drive_count,
kdevops_storage_pool_path,
hostname,
libvirt_extra_drive_format,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
azure_subscription_id = "{{ terraform_azure_subscription_id }}"
azure_resource_group_name = "{{ terraform_azure_resource_group_name }}"
azure_location = "{{ terraform_azure_location }}"
azure_vmsize = "{{ terraform_azure_vm_size }}"
azure_image_publisher = "{{ terraform_azure_image_publisher }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ oci_subnet_ocid = "{{ terraform_oci_subnet_ocid }}"
{% endif %}
oci_volumes_per_instance = {{ terraform_oci_volumes_per_instance }}
oci_volumes_size = {{ terraform_oci_volumes_size }}
oci_vpus_per_gb = {{ terraform_oci_vpus_per_gb }}
oci_data_volume_device_file_name = "{{ terraform_oci_data_volume_device_file_name }}"
oci_sparse_volume_device_file_name = "{{ terraform_oci_sparse_volume_device_file_name }}"

Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/guestfs/tasks/bringup/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
path: "{{ storagedir }}/{{ inventory_hostname }}/extra{{ item }}.{{ libvirt_extra_drive_format }}"
ansible.builtin.include_tasks:
file: "{{ role_path }}/tasks/bringup/extra-disks.yml"
loop: "{{ range(0, 4) | list }}"
loop: "{{ range(0, libvirt_extra_storage_drive_count) | list }}"
when:
- not libvirt_enable_largeio|bool

Expand Down
Loading
Loading