Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions kconfigs/Kconfig.guestfs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ choice

config GUESTFS_FEDORA
bool "Fedora (or derived distro)"
output yaml
select HAVE_DISTRO_XFS_PREFERS_MANUAL if FSTESTS_XFS
select HAVE_DISTRO_BTRFS_PREFERS_MANUAL if FSTESTS_BTRFS
select HAVE_DISTRO_EXT4_PREFERS_MANUAL if FSTESTS_EXT4
Expand All @@ -87,6 +88,7 @@ config GUESTFS_FEDORA

config GUESTFS_DEBIAN
bool "Debian"
output yaml
select HAVE_CUSTOM_DISTRO_HOST_PREFIX
select HAVE_DISTRO_XFS_PREFERS_MANUAL if FSTESTS_XFS
select HAVE_DISTRO_BTRFS_PREFERS_MANUAL if FSTESTS_BTRFS
Expand All @@ -108,6 +110,7 @@ choice

config GUESTFS_DEBIAN_TRIXIE
bool "Debian 13 - Trixie"
output yaml
select GUESTFS_REQUIRES_UEFI
select GUESTFS_HAS_CUSTOM_RAW_IMAGE
select GUESTFS_HAS_CUSTOM_RAW_IMAGE_URL
Expand All @@ -126,6 +129,7 @@ config GUESTFS_DEBIAN_TRIXIE

config GUESTFS_DEBIAN_BUSTER
bool "Debian 12 - Buster"
output yaml
help
Select this for debian buster, debian 12.

Expand Down
4 changes: 2 additions & 2 deletions playbooks/roles/base_image/templates/virt-builder.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ root-password password:kdevops
sm-unregister
{% endif %}

{% if distro_debian_based is defined and distro_debian_based %}
{% if guestfs_debian is defined and guestfs_debian %}
{# Ugh, debian has to be told to bring up the network and regenerate ssh keys #}
{# Hope we get that interface name right! #}
install isc-dhcp-client,ifupdown
Expand All @@ -44,7 +44,7 @@ firstboot-command systemctl start ssh
firstboot-command apt update && apt upgrade --yes
uninstall unattended-upgrades

{% if distro_debian_trixie is defined and distro_debian_trixie %}
{% if guestfs_debian_trixie is defined and guestfs_debian_trixie %}
{# CONFIG_GUESTFS_COPY_SOURCES_FROM_HOST_TO_GUEST will not work #}
{# if /etc/nsswitch.conf has a line like this: #}
{# #}
Expand Down
16 changes: 16 additions & 0 deletions playbooks/roles/bootlinux/tasks/build/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,18 @@
community.general.make:
chdir: "{{ target_linux_dir_path }}"
target: "olddefconfig"
register: olddefconfig_output
when:
- bootlinux_compiler_gcc|bool
- not bootlinux_use_config_fragments|default(false)|bool

- name: Report unexpected Kconfig setting changes
ansible.builtin.debug:
var: olddefconfig_output.stderr_lines
when:
- bootlinux_compiler_gcc|bool
- "'warning:' in olddefconfig_output.stderr"

- name: Build {{ target_linux_tree }}
community.general.make:
chdir: "{{ target_linux_dir_path }}"
Expand All @@ -128,10 +136,18 @@
params:
LLVM: 1
target: "olddefconfig"
register: olddefconfig_llvm_output
when:
- bootlinux_compiler_clang|bool
- not bootlinux_use_config_fragments|default(false)|bool

- name: Report unexpected Kconfig setting changes
ansible.builtin.debug:
var: olddefconfig_output.stderr_lines
when:
- bootlinux_compiler_clang|bool
- "'warning:' in olddefconfig_llvm_output.stderr"

- name: Build {{ target_linux_tree }}
community.general.make:
chdir: "{{ target_linux_dir_path }}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_cloud_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def generate_aws_kconfig() -> bool:
if result.returncode == 0:
# Write the output to the corresponding Kconfig file
try:
with open(output_path, 'w') as f:
with open(output_path, "w") as f:
f.write(result.stdout)
except IOError as e:
print(f"Error writing {kconfig_file}: {e}", file=sys.stderr)
Expand Down
41 changes: 11 additions & 30 deletions terraform/Kconfig.ssh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
config TERRAFORM_SSH_USER_INFER
bool "Selecting this will infer your username from you local system"
bool "Infer the ssh user name"
default y if !TERRAFORM_LAMBDALABS
default n if TERRAFORM_LAMBDALABS
help
If enabled we and you are running 'make menuconfig' as user sonia,
then we'd infer this and peg sonia as the default user name for you.
We'll simply run $(shell echo $USER).
If enabled and you are running 'make menuconfig' as user sonia,
then use "sonia" as the ssh user name.

Note: This is automatically disabled for Lambda Labs since they
don't support custom SSH users.
Expand All @@ -16,37 +15,19 @@ config TERRAFORM_SSH_CONFIG_USER
default "ubuntu" if TERRAFORM_LAMBDALABS
default "admin" if !TERRAFORM_SSH_USER_INFER && !TERRAFORM_LAMBDALABS
help
The SSH username to use for connecting to the target systems.

For Lambda Labs, this is set to 'ubuntu' as Lambda Labs doesn't
support custom users and typically deploys Ubuntu instances.

For other providers, this will be inferred from your local username
or set to a default value.
The SSH username Ansible will use to connect to its target
nodes. Generally this username has to match a user that is
pre-created when terraform provisions a cloud instance.

config TERRAFORM_SSH_CONFIG_PUBKEY_FILE
string "The ssh public key to use to log in"
string "File containing Ansible's ssh public key"
default "~/.ssh/kdevops_terraform_$(shell, echo $(TOPDIR_PATH) | sha256sum | cut -c1-8).pub" if TERRAFORM_LAMBDALABS
default "~/.ssh/kdevops_terraform.pub"
help
The ssh public key which will be pegged onto the systems's
~/.ssh/authorized_keys file so you can log in.

For Lambda Labs, the key path is made unique per directory by appending
the directory checksum to avoid conflicts when running multiple kdevops
instances.

config TERRAFORM_SSH_CONFIG_PRIVKEY_FILE
string "The ssh private key file for authentication"
default "~/.ssh/kdevops_terraform_$(shell, echo $(TOPDIR_PATH) | sha256sum | cut -c1-8)" if TERRAFORM_LAMBDALABS
default "~/.ssh/kdevops_terraform"
help
The ssh private key file used for authenticating to the systems.
This should correspond to the public key specified above.

For Lambda Labs, the key path is made unique per directory by appending
the directory checksum to avoid conflicts when running multiple kdevops
instances.
The filename of the file containing an ssh public key
Ansible is to use to manage its target nodes. The
matching private key should be located in a file using
the same basename (without the ".pub").

config TERRAFORM_SSH_CONFIG_GENKEY
bool "Should we create a new random key for you?"
Expand Down
4 changes: 2 additions & 2 deletions terraform/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ resource "aws_security_group" "kdevops_internal_group" {


resource "aws_key_pair" "kdevops_keypair" {
key_name = var.ssh_keyname
key_name = var.aws_ssh_key_name
public_key = var.ssh_config_pubkey_file != "" ? file(var.ssh_config_pubkey_file) : ""
}

Expand Down Expand Up @@ -133,7 +133,7 @@ resource "aws_instance" "kdevops_instance" {
aws_security_group.kdevops_sec_group.id,
aws_security_group.kdevops_internal_group.id
]
key_name = var.ssh_keyname
key_name = var.aws_ssh_key_name
subnet_id = aws_subnet.kdevops_subnet.id
user_data_base64 = element(
data.template_cloudinit_config.kdevops_config.*.rendered,
Expand Down
4 changes: 2 additions & 2 deletions terraform/aws/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ variable "aws_shared_credentials_file" {
default = "~/.aws/credentials"
}

variable "ssh_keyname" {
variable "aws_ssh_key_name" {
default = "kdevops_aws_key"
description = "The name of your ssh key, this is just the name displayed and used on aws in the backend"
description = "The name of the ssh key-pair to install in instances"
type = string
}

Expand Down
Loading