From d66db45f58542e0fd93e5825dd39177d42e705bf Mon Sep 17 00:00:00 2001 From: Luis Chamberlain Date: Sat, 12 Jul 2025 09:56:27 -0700 Subject: [PATCH] docs: remove extra vagrant line Generated-by: ChatGPT Codex Signed-off-by: Luis Chamberlain --- .gitignore | 6 +- Makefile | 6 +- Makefile.kdevops | 16 - Makefile.subtrees | 13 +- README.md | 11 +- docs/ansible-roles.md | 4 +- docs/custom-vagrant-boxes.md | 581 ------------------ docs/cxl.md | 6 +- docs/kdevops-configuration.md | 4 +- docs/kdevops-dynamic-configuration.md | 6 +- docs/kdevops-terraform.md | 27 +- docs/kdevops-vagrant.md | 130 ---- docs/kernel-ci/kdevops-subtree-recommeded.md | 2 +- docs/lbs.md | 15 +- docs/libvirt-pcie-passthrough.md | 20 +- docs/libvirt-storage-pool.md | 25 +- docs/linux-distro-support.md | 9 +- docs/requirements.md | 12 +- docs/running-make.md | 12 - docs/the-gen-nodes-ansible-role-vagrant.md | 78 --- docs/the-gen-nodes-ansible-role.md | 11 +- docs/why-vagrant.md | 66 -- kconfigs/Kconfig.ansible_provisioning | 7 +- kconfigs/Kconfig.bringup | 15 +- kconfigs/Kconfig.hypervisor | 4 +- kconfigs/Kconfig.kdevops | 7 +- kconfigs/Kconfig.kernel-ci | 9 +- kconfigs/Kconfig.libvirt | 68 +- kconfigs/Kconfig.libvirt.largeio | 4 +- kconfigs/Kconfig.pcie_passthrough_libvirt | 53 ++ kconfigs/Kconfig.ssh | 6 +- kconfigs/workflows/Kconfig.data_partition | 11 +- kconfigs/workflows/Kconfig.shared | 4 - playbooks/install_vagrant_boxes.yml | 5 - playbooks/roles/bootlinux/defaults/main.yml | 4 +- .../bootlinux/tasks/update-grub/install.yml | 2 +- playbooks/roles/create_partition/README.md | 4 +- playbooks/roles/create_tmpfs/README.md | 4 +- playbooks/roles/devconfig/README.md | 2 +- playbooks/roles/devconfig/defaults/main.yml | 2 +- .../devconfig/scripts/prepare_suse_repos.sh | 4 +- playbooks/roles/gen_nodes/defaults/main.yml | 10 +- .../roles/gen_nodes/templates/Vagrantfile.j2 | 478 -------------- .../kdevops_nodes_split_start.j2.yaml | 171 ------ .../roles/gen_pci_kconfig/tasks/main.yml | 2 +- .../tasks/install-deps/suse/main.yml | 2 +- .../roles/install_vagrant_boxes/README.md | 46 -- .../install_vagrant_boxes/defaults/main.yml | 6 - .../scripts/add-box-if-missing.sh | 48 -- .../install_vagrant_boxes/tasks/main.yml | 49 -- .../libvirt_storage_pool_create/README.md | 4 +- playbooks/roles/libvirt_user/README.md | 4 +- .../roles/update_ssh_config_vagrant/README.md | 66 -- .../defaults/main.yml | 13 - .../python/update_ssh_config.py | 1 - .../update_ssh_config_vagrant/tasks/main.yml | 69 --- .../update_ssh_config/.gitignore | 6 - .../update_ssh_config/.travis.yml | 12 - .../update_ssh_config/CONTRIBUTING | 49 -- .../update_ssh_config/LICENSE | 239 ------- .../update_ssh_config/Makefile | 15 - .../update_ssh_config/README.md | 159 ----- .../test_update_ssh_config.py | 417 ------------- .../tests/0001_remove_hosts_top.orig | 53 -- .../tests/0001_remove_hosts_top.res | 33 - .../tests/0002_remove_hosts_middle.orig | 53 -- .../tests/0002_remove_hosts_middle.res | 33 - .../tests/0003_remove_hosts_bottom.orig | 53 -- .../tests/0003_remove_hosts_bottom.res | 33 - .../tests/0004_remove_hosts_missing.orig | 33 - .../tests/0004_remove_hosts_missing.res | 33 - .../tests/0005_remove_hosts_similar.orig | 53 -- .../tests/0005_remove_hosts_similar.res | 53 -- .../tests/0006_add_hosts_manual.orig | 33 - .../tests/0006_add_hosts_manual.res | 53 -- ..._remove_hosts_two_separate_ops_top.add.res | 53 -- ...add_remove_hosts_two_separate_ops_top.orig | 53 -- ...move_hosts_two_separate_ops_top.remove.res | 33 - .../0008_add_remove_hosts_one_shot_top.orig | 1 - .../0008_add_remove_hosts_one_shot_top.res | 1 - ..._hosts_vagrant_emulate_top.emulate_vagrant | 20 - .../0009_add_hosts_vagrant_emulate_top.orig | 1 - .../0009_add_hosts_vagrant_emulate_top.res | 53 -- ...rithms_vagrant_emulate_top.emulate_vagrant | 20 - ...sts_kexalgorithms_vagrant_emulate_top.orig | 53 -- ...osts_kexalgorithms_vagrant_emulate_top.res | 55 -- ...two_separate_ops_kexalgorithms_top.add.res | 55 -- ...ts_two_separate_ops_kexalgorithms_top.orig | 53 -- ..._separate_ops_kexalgorithms_top.remove.res | 33 - .../0012_add_remove_hosts_empty_file.res | 20 - .../update_ssh_config/update_ssh_config.py | 325 ---------- .../update_ssh_config_vagrant/vars/main.yml | 1 - playbooks/update_ssh_config_vagrant.yml | 4 - scripts/archive.Makefile | 4 +- scripts/bringup.Makefile | 1 - scripts/bringup_vagrant.sh | 101 --- scripts/check_distro_kconfig.sh | 8 - scripts/check_pciepassthrough_kconfig.sh | 8 - scripts/destroy_vagrant.sh | 30 - scripts/dynamic-pci-kconfig.Makefile | 4 +- scripts/gen-nodes.Makefile | 2 - scripts/get-distro-default-bridge.sh | 11 +- scripts/provision.Makefile | 4 - scripts/prune_stale_vagrant.sh | 164 ----- scripts/tests.Makefile | 1 - scripts/vagrant.Makefile | 109 ---- scripts/workflows/generic/run_kernel_ci.sh | 20 +- terraform/azure/main.tf | 2 +- vagrant/.gitignore | 2 - vagrant/Kconfig | 295 --------- vagrant/Kconfig.debian | 46 -- vagrant/Kconfig.fedora | 29 - vagrant/Kconfig.kdevops | 42 -- vagrant/Kconfig.opensuse | 144 ----- vagrant/Kconfig.pcie_passthrough_libvirt | 53 -- vagrant/Kconfig.suse | 0 workflows/blktests/Kconfig | 9 +- workflows/demos/reboot-limit/Makefile | 2 +- workflows/fstests/Kconfig | 2 - workflows/fstests/xfs/Kconfig | 2 - workflows/linux/Kconfig.linus | 1 - workflows/linux/Kconfig.mcgrof | 1 - workflows/linux/Kconfig.modules | 1 - workflows/linux/Kconfig.next | 1 - workflows/linux/Kconfig.stable | 1 - workflows/linux/Kconfig.vfs | 1 - workflows/linux/Kconfig.xfs | 1 - 127 files changed, 203 insertions(+), 5390 deletions(-) delete mode 100644 docs/custom-vagrant-boxes.md delete mode 100644 docs/kdevops-vagrant.md delete mode 100644 docs/the-gen-nodes-ansible-role-vagrant.md delete mode 100644 docs/why-vagrant.md create mode 100644 kconfigs/Kconfig.pcie_passthrough_libvirt delete mode 100644 playbooks/install_vagrant_boxes.yml delete mode 100644 playbooks/roles/gen_nodes/templates/Vagrantfile.j2 delete mode 100644 playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml delete mode 100644 playbooks/roles/install_vagrant_boxes/README.md delete mode 100644 playbooks/roles/install_vagrant_boxes/defaults/main.yml delete mode 100755 playbooks/roles/install_vagrant_boxes/scripts/add-box-if-missing.sh delete mode 100644 playbooks/roles/install_vagrant_boxes/tasks/main.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/README.md delete mode 100644 playbooks/roles/update_ssh_config_vagrant/defaults/main.yml delete mode 120000 playbooks/roles/update_ssh_config_vagrant/python/update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/tasks/main.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.gitignore delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.travis.yml delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/CONTRIBUTING delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/LICENSE delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/Makefile delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md delete mode 100755 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/test_update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.add.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.remove.res delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.orig delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.emulate_vagrant delete mode 120000 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.emulate_vagrant delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.add.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.orig delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.remove.res delete mode 100644 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0012_add_remove_hosts_empty_file.res delete mode 100755 playbooks/roles/update_ssh_config_vagrant/update_ssh_config/update_ssh_config.py delete mode 100644 playbooks/roles/update_ssh_config_vagrant/vars/main.yml delete mode 100644 playbooks/update_ssh_config_vagrant.yml delete mode 100755 scripts/bringup_vagrant.sh delete mode 100755 scripts/check_distro_kconfig.sh delete mode 100755 scripts/check_pciepassthrough_kconfig.sh delete mode 100755 scripts/destroy_vagrant.sh delete mode 100755 scripts/prune_stale_vagrant.sh delete mode 100644 scripts/vagrant.Makefile delete mode 100644 vagrant/.gitignore delete mode 100644 vagrant/Kconfig delete mode 100644 vagrant/Kconfig.debian delete mode 100644 vagrant/Kconfig.fedora delete mode 100644 vagrant/Kconfig.kdevops delete mode 100644 vagrant/Kconfig.opensuse delete mode 100644 vagrant/Kconfig.pcie_passthrough_libvirt delete mode 100644 vagrant/Kconfig.suse diff --git a/.gitignore b/.gitignore index 706ef3fca..4aa0869f8 100644 --- a/.gitignore +++ b/.gitignore @@ -31,10 +31,6 @@ scripts/workflows/fstests/lib/__pycache__/ scripts/workflows/blktests/lib/__pycache__/ scripts/workflows/lib/__pycache__/ -vagrant/kdevops_nodes.yaml -vagrant/.Vagrantfile.generated -vagrant/Vagrantfile -.vagrant/ include/ @@ -97,6 +93,6 @@ workflows/linux/refs/user scripts/kconfig/.nconf-cfg .dynamic-kconfig.* -vagrant/Kconfig.passthrough_libvirt.generated +kconfigs/Kconfig.passthrough_libvirt.generated archive/ diff --git a/Makefile b/Makefile index c6a5c321f..1173697c4 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ export KDEVOPS_EXTRA_VARS ?= extra_vars.yaml export KDEVOPS_PLAYBOOKS_DIR := playbooks export KDEVOPS_HOSTFILE ?= hosts export KDEVOPS_NODES := -export KDEVOPS_VAGRANT := export PYTHONUNBUFFERED=1 export TOPDIR=./ export TOPDIR_PATH = $(shell readlink -f $(TOPDIR)) @@ -129,9 +128,6 @@ ifneq (,$(ANSIBLE_EXTRA_ARGS)) DEFAULT_DEPS += $(KDEVOPS_EXTRA_VARS) endif -ifeq (y,$(CONFIG_VAGRANT)) -DEFAULT_DEPS += $(KDEVOPS_VAGRANT) -endif DEFAULT_DEPS += $(DEFAULT_DEPS_REQS_EXTRA_VARS) @@ -230,7 +226,7 @@ $(KDEVOPS_HOSTS): .config ansible.cfg $(KDEVOPS_HOSTS_TEMPLATE) --extra-vars=@./extra_vars.yaml DEFAULT_DEPS += $(KDEVOPS_NODES) -$(KDEVOPS_NODES) $(KDEVOPS_VAGRANT): .config ansible.cfg $(KDEVOPS_NODES_TEMPLATE) +$(KDEVOPS_NODES): .config ansible.cfg $(KDEVOPS_NODES_TEMPLATE) $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ --inventory localhost, \ $(KDEVOPS_PLAYBOOKS_DIR)/gen_nodes.yml \ diff --git a/Makefile.kdevops b/Makefile.kdevops index 60d79a5a3..d9c840d0b 100644 --- a/Makefile.kdevops +++ b/Makefile.kdevops @@ -25,19 +25,6 @@ kdevops_configure_libvirt: $(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "skip_install=True" \ -e 'running_user=$(USER)' -kdevops_vagrant_deps: \ - kdevops_install_libvirt \ - kdevops_configure_libvirt - -PHONY += kdevops_vagrant_deps -KDEVOPS_VAGRANT_WORK := kdevops_vagrant_deps - -kdevops_vagrant_boxes: - $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ - --inventory localhost, \ - $(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant_boxes.yml -PHONY += kdevops_vagrant_boxes -KDEVOPS_VAGRANT_WORK += kdevops_vagrant_boxes kdevops_verify_libvirt_user: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ @@ -45,7 +32,6 @@ kdevops_verify_libvirt_user: $(KDEVOPS_PLAYBOOKS_DIR)/libvirt_user.yml -e "only_verify_user=True" PHONY += kdevops_verify_libvirt_user -KDEVOPS_VAGRANT_WORK += kdevops_verify_libvirt_user kdevops_libvirt_storage_pool_create: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ @@ -53,9 +39,7 @@ kdevops_libvirt_storage_pool_create: $(KDEVOPS_PLAYBOOKS_DIR)/libvirt_storage_pool_create.yml PHONY += kdevops_libvirt_storage_pool_create -KDEVOPS_VAGRANT_WORK += kdevops_libvirt_storage_pool_create -kdevops_deps: kdevops_terraform_deps $(KDEVOPS_VAGRANT_WORK) $(KDEVOPS_DEPS) @echo Installed dependencies PHONY += kdevops_deps diff --git a/Makefile.subtrees b/Makefile.subtrees index f61b1944f..62220aeef 100644 --- a/Makefile.subtrees +++ b/Makefile.subtrees @@ -1,38 +1,27 @@ -# If you need to use a git subtree, please add it here. +# If you need to use a git subtree use this as a guide. # This is more of a guide, folks can just run things manually # and use this as documentation. KCONFIG_GIT_URL_READ := https://github.com/linux-kdevops/kconfig.git KCONFIG_GIT_URL_RW := git@github.com:linux-kdevops/kconfig.git -UPDATE_SSHCONFIG_READ := https://github.com/linux-kdevops/update_ssh_config.git -UPDATE_SSHCONFIG_RW := git@github.com:linux-kdevops/update_ssh_config.git - KCONFIG_DIR := scripts/kconfig -UPDATE_SSHCONFIG_DIR := playbooks/roles/update_ssh_config_vagrant/update_ssh_config/ # If you only have read access to these trees use this target add-subtree-remotes: git remote add kconfig $(KCONFIG_GIT_URL_READ) - git remote add update_ssh_config $(UPDATE_SSHCONFIG_READ) # If you have write access to these trees use this add-subtree-remotes-dev: git remote add kconfig $(KCONFIG_GIT_URL_RW) - git remote add update_ssh_config $(UPDATE_SSHCONFIG_RW) add-subtrees: git subtree add --prefix=$(KCONFIG_DIR) kconfig master - git subtree add --prefix=$(UPDATE_SSHCONFIG_DIR) update_ssh_config master refresh-subtrees: git fetch kconfig - git fetch update_ssh_config git subtree pull --prefix=$(KCONFIG_DIR) kconfig master - git fetch update_ssh_config - git subtree pull --prefix=$(UPDATE_SSHCONFIG_DIR) update_ssh_config master # If you are a developer with write commit access you can push changes queued # up here onto kdevops to their respective upstream as follows: # git subtree push --prefix=scripts/kconfig/ kconfig master -# git subtree push --prefix=playbooks/roles/update_ssh_config_vagrant/update_ssh_config update_ssh_config master diff --git a/README.md b/README.md index 4d9be800c..f2b78782a 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,9 @@ an entire lab for Linux kernel testing for a complex subsystem in a jiffy. It makes use of local ansible roles and optionally lets you use [libguestfs](https://libguestfs.org/) with libvirt or terraform in order -to support an cloud provider. Support for vagrant in kdevops exists but is now -deprecated in favor of [libguestfs](https://libguestfs.org/) since vagrant -lacks any active maintenance, new development should use and focus on -[libguestfs](https://libguestfs.org/). +to support a cloud provider. Historical support for Vagrant has been +removed in favor of [libguestfs](https://libguestfs.org/), which is +All remaining references to Vagrant have now been removed. Variability is provided through the same variability language used in the Linux kernel, kconfig. It is written by Linux kernel developers, for Linux kernel @@ -334,10 +333,8 @@ Below are sections which get into technical details of how kdevops works. * [How is extra_vars.yaml generated](docs/how-extra-vars-generated.md) * [How is the ansible hosts file generated](docs/the-gen-hosts-ansible-role.md) * [What are and how to generate the kdevops nodes files](docs/the-gen-nodes-ansible-role.md) - * [How is the dynamic Vagrant files generated](docs/the-gen-nodes-ansible-role-vagrant.md) * [How is the terraform kdevops_nodes variable generated](docs/the-gen-nodes-ansible-role-terraform.md) * [How are the terraform terraform/terraform.tfvars variables generated](docs/the-terraform-gen-tfvar-ansible-role.md) - * [Why Vagrant (deprecated) used to be used for virtualization](docs/why-vagrant.md) * [A case for supporting truncated files with loopback block devices](docs/testing-with-loopback.md) * [Seeing more issues with loopback / truncated files setup](docs/seeing-more-issues.md) * [Adding a new workflow to kdevops](docs/adding-a-new-workflow.md) @@ -347,10 +344,8 @@ Below are sections which get into technical details of how kdevops works. * [Motivation behind kdevops](docs/motivations.md) * [Linux distribution support](docs/linux-distro-support.md) * [Overriding all Ansible role options with one file](docs/ansible-override.md) - * [kdevops Vagrant support](docs/kdevops-vagrant.md) * [kdevops terraform support - cloud setup with kdevops](docs/kdevops-terraform.md) * [kdevops local Ansible roles](docs/ansible-roles.md) - * [Tutorial on building your own custom Vagrant boxes](docs/custom-vagrant-boxes.md) License ------- diff --git a/docs/ansible-roles.md b/docs/ansible-roles.md index dfb05b9fd..b8fd4c5c6 100644 --- a/docs/ansible-roles.md +++ b/docs/ansible-roles.md @@ -2,14 +2,12 @@ The following local ansible roles are used: - * [update_ssh_config_vagrant](./playbooks/roles/update_ssh_config_vagrant/README.md) * [devconfig](./playbooks/roles/devconfig/README.md) * [create_partition](./playbooks/roles/create_partition/README.md) * create_data_partition: creates the data partition, uses the `create_partition` role * [install_terraform/](./playbooks/roles/install_terraform/README.md) - * [install_vagrant_boxes](./playbooks/roles/install_vagrant_boxes/README.md) * [libvirt_user](./playbooks/roles/libvirt_user/README.md) - * [update_ssh_config_vagrant](./playbooks/roles/update_ssh_config_vagrant/README.md) + * update_ssh_config_guestfs: updates your ssh config for guestfs deployments The following are ansible roles dedicated towards supported workflows: diff --git a/docs/custom-vagrant-boxes.md b/docs/custom-vagrant-boxes.md deleted file mode 100644 index aa73a4266..000000000 --- a/docs/custom-vagrant-boxes.md +++ /dev/null @@ -1,581 +0,0 @@ -# Creating your own custom Vagrant boxes or qcow2 virtual images - -You can create your own custom Vagrant boxes if the publicly available -Vagrant boxes do not suit your needs. We document how to do this here. -One reason might be you are an Enterprise Linux distribution and don't -have public Vagrant boxes for older releases you might still support -but want the benefit of having Vagrant boxes to work with kdevops -kernel-ci. Another reason might be you just cannot legally share you -images, for one reason or another. Another reason is you may have some -new technology which is not yet easily available on distribution kernels -and want to enable folks to test technology on some development subsystem -or linux-nxt. - -## Re-using an existing box for development - -If you are doing Linux kernel development you may want to just enable -a QA or other developers to quickly test a built kernel for you. -If you don't want to do a full fresh install of a distribution you can -opt to re-use a distribution Vagrant box and just augment it with a -custom kernel build. This section documents how to do that with a demo -of a successful box built using this technique. - -This is the lazy developer approach to customizing a Vagrant box for Linux -kernel development. This involves four steps: - - * 1) One is getting your kernel binary and modules - * 2) The GRUB configuration stuff right. - * 3) Edit the Vagrantfile to remove stupid stuff - * 4) Building the tarball - -We break this down below. - -### Getting your kernel over - -From a libvirt perspective Vagrant boxes are just compressed tarballs -with a qcow2 file. So to hack on one first download the box. So for -example if we visit the [debian/testing64](https://app.vagrantup.com/debian/boxes/testing64) -page there you will see a [libvirt download URL](https://app.vagrantup.com/debian/boxes/testing64/versions/20220626.1/providers/libvirt.box) -with the box file. - -So we do: - -```bash -wget https://app.vagrantup.com/debian/boxes/testing64/versions/20220626.1/providers/libvirt.box - -sha1sum libvirt.box -06b07c0d0b78df5369d9ed35eaf39098c1ec7846 libvirt.box - -file libvirt.box -libvirt.box: gzip compressed data, from Unix, original size modulo 2^32 1197363200 -``` - -The file can be decompressed as a regular tarball. Since it has no -directory in it you want to copy the file to another directory and uncompress -there, otherwise it will clutter your current directory: - -```bash -mkdir box-dev -cp libvirt.box box-dev -cd box-dev -tar zxvf libvirt.box -``` - -So you will see 3 files, one just a qcow2 file the other expresses -how big of a drive was used to create this qcow2 file along with a -provider, and the Vagrantfile defines how to initialize this qcow2 file -with libvirt: - -```bash -ls -1 - -box.img -metadata.json -Vagrantfile - -file box.img -box.img: QEMU QCOW2 Image (v3), 21474836480 bytes - -cat metadata.json -{ - "provider" : "libvirt", - "format" : "qcow2", - "virtual_size" : 20 -} - -cat Vagrantfile -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - - config.vm.post_up_message = "Vanilla Debian box. See https://app.vagrantup.com/debian for help and bug reports" - - # workaround for #837992 - # use nfsv4 mode by default since rpcbind is not available on startup - # we need to force tcp because udp is not available for nfsv4 - config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: "4", nfs_udp: false - - # Options for libvirt vagrant provider. - config.vm.provider :libvirt do |libvirt| - - # A hypervisor name to access. Different drivers can be specified, but - # this version of provider creates KVM machines only. Some examples of - # drivers are kvm (QEMU hardware accelerated), qemu (QEMU emulated), - # xen (Xen hypervisor), lxc (Linux Containers), - # esx (VMware ESX), vmwarews (VMware Workstation) and more. Refer to - # documentation for available drivers (http://libvirt.org/drivers.html). - libvirt.driver = "kvm" - - # The name of the server, where libvirtd is running. - # libvirt.host = "localhost" - - # If use SSH tunnel to connect to Libvirt. - libvirt.connect_via_ssh = false - - # The username and password to access Libvirt. Password is not used when - # connecting via SSH. - libvirt.username = "root" - #libvirt.password = "secret" - - # Libvirt storage pool name, where box image and instance snapshots will - # be stored. - libvirt.storage_pool_name = "default" - - # Set a prefix for the machines that's different than the project dir name. - #libvirt.default_prefix = '' - end -end -``` - -And so to hack on the qcow file we just use nbd: - -```bash -sudo qemu-nbd --connect=/dev/nbd0 box.img -mkdir debian-testing-root-vagrant -sudo mount /dev/nbd0p1 ./vanilla-debian-zns/debian-testing-root-vagrant -``` - -When you finish just do: - -```bash -sudo modprobe nbd max_part=8 -sudo umount debian-testing-root-vagrant -sudo qemu-nbd --disconnect /dev/nbd0 -``` - -It is important to run the disconnect command before copying the box file as -backups or using it for anything. - -What I do then is use a kdevops linux-next guest to compile linux-next or -whatever I want, and then I use a two step process. One to scp the modules -directory locally, and the respective `/boot/*$(uname -r)*` files over to -a new directory and then install these on the target. Then you need to configure -the GRUB console so `sudo virsh console ` works and you also want to -update the GRUB menu. That is covered in the next subsection. - -### Getting your kernel over - -OK now you just need to update the `/etc/default/grub` file and also the -`/boot/grub/grub.cfg` file. Editing `/etc/default/grub` is easy you can -just run your editor on the mounted partition for the file and ensure -you have these entries: - -``` -GRUB_DEFAULT=0 -GRUB_TIMEOUT=5 -GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` -GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0" -GRUB_CMDLINE_LINUX="console=tty0 console=tty1 console=ttyS0,115200n8" - -GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --parity=no --stop=1" -GRUB_TERMINAL="console serial" -GRUB_DISABLE_SUBMENU=y -``` - -The last part of this file helps ensure you can get to pick a different -kernel at boot through the GRUB prompt using the serial console -(`virsh console`), however sadly it seems the GRUB version on the Debian -testing as of today doesn't work with this yet, so this step could be enhanced -to enable more flexibility to the user from the start. Until this is fixed then -developers have to do the work manually to perhaps update GRUB to get this -fixed. - -The last step is then to update the `/boot/grub/grub.cfg` file. -To do this, I just have two guests running: - - * dev: some development system where I compile and install some kernel - * baseline: a fresh Debian testing guest just brought up with Vagrant - -And then I scp to it the kernel / modules from dev over, run update-grub -and copy its grub.cfg file over. Something like the following: - -```bash -mkdir -p tmp/boot -scp -r dev:/lib/modules/5.19.0-rc4-next-20220629/ tmp/ -scp -r dev:/boot/*5.19.0-rc4-next-20220629* tmp/ - -scp -r tmp/boot/* baseline:/boot/ -scp -r tmp-provision-dir/5.19.0-rc4-next-20220629 baseline:/lib/modules/ -ssh baseline sudo update-grub -scp baseline:/boot/grub/grub.cfg tmp -``` - -OK so finally we can copy that grub.cfg to the mounted nbd partition and -hope that works. - -### Editing your Vagrantfile to remove stupid stuff - -By default Vagrant boxes enable sharing your directory to the guest -through NFS. From a Linux kernel development perspective this is just -lunacy. And so I like to disable it. By default then Debian uses this -for its sync thing - -``` - config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: "4", nfs_udp: false -``` - -Replace this with the more sane which disables this: - -``` - config.vm.synced_folder './', '/vagrant', type: '9p', disabled: true, accessmode: "mapped", mount: false -``` - -You may also want to edit the `config.vm.post_up_message` with whatever. - -``` - config.vm.post_up_message = "this is kernel build for send bug reports to ignore@ignore.org" -``` - -### Example network name resolution - -Most distros use udev for consistent names for networking interfaces. If -you just want to get a box out which will work fast the best way is to just -append to your GRUB kernel parameter: - -``` -GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0" -``` - -### Example network DHCP fix - -On a basic debian console install, so where no Network Manager is installed, -you want to just have something simply like this, after testing that the -default network name that comes up is eth0: - -``` -# cat /etc/network/interfaces -# interfaces(5) file used by ifup(8) and ifdown(8) -# Include files from /etc/network/interfaces.d: -source-directory /etc/network/interfaces.d - -# The loopback network interface -auto lo -iface lo inet loopback - -# The primary network interface -allow-hotplug eth0 -iface eth0 inet dhcp -``` - -### Ensuring ssh works - -You will want to ensure the user ~vagrant has a .ssh/ directory with -chmod 700 permissions and the vagrant ssh key installed by default. -When vagrant detects this a new one random one is replaced. - -https://github.com/hashicorp/vagrant/tree/main/keys - -So just do: - -```bash -mkdir .ssh -chmod 700 .ssh -echo ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key >> authorized_keys -``` - -### Creating the Vagrant new box file tarball - -To create the box file you just tar it up. Assuming you want maximum -compression: - -```bash -tar -cvf ../mcgrof-20220629.box box.img metadata.json Vagrantfile -I "gzip --best" -``` - -You can now upload this box on the Vagrant cloud and use it with the -nice shorthands provided. - -## A fresh install - -To try to save the most amount of space you want to do a fresh install. -This section documents how to do that. - -First you'd install a guest using virt-install, an example script which -you can extend to your own needs is the -[virt-install-demo.sh](docs/virt-install-demo.sh). -There are a a series of adjustments that needed to be made for guests -to work for older kernel releases, should you need that. This is all -documented below. - -But below is an example simple script - - -```bash -virt-install --virt-type kvm \ - --name lio \ - --arch x86_64 \ - --cpu host \ - --location /home/mcgrof/debian-testing-amd64-netinst.iso \ - --os-variant debiantesting \ - --memory 8192 --vcpus 8 \ - --disk pool=data3-xfs,size=20,bus=virtio,format=qcow2 \ - --graphics none \ - --network network=vagrant-libvirt-private,model=virtio \ - --console pty,target_type=serial \ - --debug \ - --extra-args "console=ttyS0" -``` - -## Extending the Vagrant box definition - -A Vagrant box is essentially a tarball (gzip, xc are both supported) with a -qcow2 image and a small metadata file explaining how large the drive for the -guest is. The Vagrant box also ensures that the guest brought up will also -work on any new system, and so a few things need to be done to ensure for -instance that the network interface will get a DHCP address successfully, and -that you can ssh into the system. So a way to deal with moving guests around -the `cloud` are needed, an example is avoiding -`/etc/udev/rules.d/70-persistent-net.rules` upon first boot on some SLE -systems. - -Standard userspace development needs are typically met with the above -requirements. Kernel development however, have more more needs. Extensions -can be made by you so that the custom Vagrant boxes you build extend -what is promised by a Vagrant box, with other things which kernel developers -would typically prefer to have set on the system. This can save time -on bringup. Kdevops does a slew of things to help with this for you, like -setting up the serial console, but if Vagrant boxes already have these things -done on them that is a step which could be skipped. - -Below we provide a recipe of items which can be done to help on a fresh install -of a Linux distribution on a qcow2 image so that it is easier to test new -kernels and debug them. The standard Vagrant box definition *only* requires a -guest to come up, and to be able to ssh into them with the Vagrant user. - - * 1) root/vagrant user password is vagrant - * 2) vagrant user on /etc/sudoers does not need a password to gain root - * 3) vagrant user has an insecure SSH key installed to enable adding a new random one - * 4) Disable the firewall and AppArmor - * 5) Deal with persistent net rules - * 6) Ensure DHCP will work on the first network interface - * 7) Ensure the console is allowed - * 8) Ensure the correct disk size is used on the metadata json file - * 9) Try to use disk partitions by UUID on /etc/fstab - * 10) GRUB disk setup with UUID - * 11) GRUB console setup - * 12) Address lack of virtio - * 13) Address changes in sudo for old systems - -These all deserve their own attention so a section is provided for them below. - -### root / vagrant password - -Although no password is needed, just to ensure one is set the `vagrant` password -is set, just in case you need to use it. - -### vagrant sudoers - -The goal is to never have to use root directly since the boxes are for development -purposes, and so the following entry is expected: - -``` -vagrant ALL=(ALL) NOPASSWD: ALL -``` - -### vagrant user has an insecure SSH key installed - -Vagrant publishes an arbitrary public static SSH public and private key, so -that if it is detected a random SSH key is instead generated and used and -installed. - -Using a random SSH key for each host is a better idea due to possible -risks of guests being left `spawned` and then `pawned` by motivated eager -beavers for a key the entire internet has access to. - -You can surely use your own key as well, however, when sharing Vagrant boxes -you likely don't want to be sharing SSH keys. - -### Disable the firewall and AppArmor - -You are not trying to secure a bank when running a guest for -kernel development, so running a firewall and apparmor is just -typically noise. This is unless of course if you are testing apparmor -or firewall changes to the kernel. - -The firewall and AppArmor can be enabled after initialization, however, -if you really need it. - -### Deal with persistent net rules - -Each Linux distribution has dealt with a way to keep MAC addresses mapped -to a specific interface name. This is to allow a network card to always get -the same IP address, in case it changes the bus it uses on a system. - -Spawning a guest from a Vagrant box means we *want* a different MAC -address for each new guest. This also means we want the first interface -to take the first possible interface name, which will be used for DHCP -purposes after bootup. - -### Ensure DHCP will work on the first network interface - -We expect at least one ethernet interface to come up so that it can get an IP -address and so that we can then SSH into it. Using a network interface just to -communicate to guests is rather archaic, however, it is the current norm. - -A Vagrant box *expects* a random interface to be spawned with it, and we -want to just ensure it, whatever it is, will ask for an IP address via -DHCP. We want to use a mechanism that will work, if possible, for older -systems as well. - -The following recipe works from SLES12-SP3 down to SLES10-SP3 as -an example: - -```bash -if [ -d ] /etc/sysconfig ]; then - cat << FIXIFCGHETH0 > /etc/sysconfig/network/ifcfg-eth0 -DEVICE=eth0 -BOOTPROTO=dhcp -ONBOOT=yes -STARTMODE='auto' - -FIXIFCGHETH0 -``` - -### Ensure the correct disk size is used on the metadata json file - -Vagrant boxes have a metadata json file. If you create a qcow2 image -as follows: - -``` -qemu-img create -f qcow2 foo.qcow2 50G -``` - -Then ensure you have 50 as your size for your metadata.json file: - -``` -{ - "provider" : "libvirt", - "format" : "qcow2", - "virtual_size" : 50 -} -``` - -Note that the Vagrant libvirt provider does not seem to provide support -yet for versioning. - -### Try to use disk partitions by UUID on /etc/fstab - -Some releases do not use /dev/disk/by-uuid labels on /etc/fstab. This -poses a risk when trying to move a guest qcow2 image file from one -system to another. We want something static, and the UUID assigned to -partitions addresses this problem. - -This however means that if you are creating your own custom Vagrant -box or installing your own new fresh kernel you may have to take steps -to ensure the UUID is used instead of the raw /dev/vda or alternative -device disk name. - -### GRUB disk setup with UUID - -As an example, GRUB 0.97 is used on SLE10-SP3, SLE11-SP1, and SLE11-SP4. On -these releases you must ensure that the same /dev/disk/by-uuid is used so that -that a Vagrant box can function on new systems. You do this by editing -/boot/grub/menu.lst and ensuring the appropriate full path /dev/disk/by-uuid/ is -used for the partition in question. - -On SLES10-SP3 swap partitions lacked a respective UUID, and so the -resume entry must be removed. - -SLES12-SP1 and newer use GRUB2, and started using UUID=id as a shortcut on -/etc/fstab and /etc/default/grub, and so no modifications are needed there. - -### GRUB console setup - -As a kernel developer you want to be able to pick what kernel boots -easily. Today, we do this via the console. So we must ensure the console -works on the guest. We support GRUB2 (GRUB) and GRUB 0.97 (GRUB Legacy). - -#### GRUB 0.97 console setup - -On GRUB 0.97 based systems you must add the following to the top of the -/boot/grub/menu.lst file (when in doubt check one of the custom Vagrant -boxes): - -``` -serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 -terminal --timeout=4 serial console -``` - -Replace `gfxmenu` with `menu` on /boot/grub/menu.lst. - -Below are the base releases of GRUB 0.97 used on our older SLE releases: - - * sles10sp3: grub-0.97-16.25.9 - * sles11sp1: grub-0.97-162.9.1 - * sles11sp4: grub-0.97-162.172.1 - -Ensure any `quiet` entry is removed from the kernel command lines. - -#### GRUB2 console setup - -If you install an ISO on a guest using the console the installer has the sanity -to set up *most* of the right setting for you. However, on SLE12-SP1 you must -make the following change on /etc/default/grub: - -``` --GRUB_TERMINAL=console -+GRUB_TERMINAL="console serial" -``` - -Also ensure GRUB_CMDLINE_LINUX_DEFAULT has the entry `quiet` removed. - -### Address lack of virtio - -Certain modern Linux releases releases support virtio drivers for networking, -or storage. Since Vagrant uses KVM and KVM relies on QEMU, when virtio is not -available emulation is needed. Vagrant is controlled via its Vagrantfile, and -users of a Vagrant box can specify one. However sensible defaults must also be -set and provided on a base Vagrantfile for a Vagrant box. The lack of a virtio -driver then is codified into the Vagrantfile used to build the first Vagrant -box. A Vagrant box is nothing more than a tarball (gzip or xz, use xz, it has -better compression) with the guest qcow2 image, the metadata.json file shown -above, and an initial Vagrantfile. - -Below we document the currently needed modifications needed to the Vagrantfile -for our older Linux distributions, we use older SUSE Linux releases as -example which were targeted to create Vagrant boxes for kernel development -and testing. - -#### Disable default /vagrant nfs sharing for all releases - -Vagrant boxes by default share folders under the current directory via NFS -to the guests you create. This doesn't work so well for all hosts, and sharing -via NFS isn't the best really. We disable NFS sharing as the default then. - -This applies to SLE12-SP3 and older releases. - -#### Disable virtio drives - -SLE10-SP3 doesn't have virtio block driver, and so the root drive uses scsi as the -emulated backend for the drive. Note that currently we still use IDE drives for -the other alternative drives, given using scsi doesn't work at the moment. This -discrepancy should be resolved. - -This is done as follows on the respective Vagrantfile: - -``` - libvirt.disk_bus = "scsi" -``` - -#### Disable virtio networking - -SLE10-SP3 doesn't have a virtio network driver, and so the ne2k_pci network driver -is emulated. - -This is done as follows on the respective Vagrantfile: - -``` - libvirt.nic_model_type = "ne2k_pci" -``` - -### Address changes in sudo for old systems - -SLE10-SP3 has an old version of sudo which lacks the `-E` argument. And since -the default in Vagrant is to use -E, we have to disable this for SLE10-SP3. - -This is done as follows on the respective Vagrantfile: - -``` - config.ssh.sudo_command = "sudo -H %c" -``` diff --git a/docs/cxl.md b/docs/cxl.md index f41e489c1..5582216e3 100644 --- a/docs/cxl.md +++ b/docs/cxl.md @@ -3,10 +3,8 @@ kdevops has support bringing up a CXL development environment and testing. This documents this support. -Current support for CXL on kdevops relies on vagrant, support for -[libguestfs](https://libguestfs.org/) is currently under investigation but -will rely on using a python script to dynamically create XML requirements. -The documentation below assumes vagrant will be used for now. +Current support for CXL on kdevops relies on libguestfs. Support was +originally developed for Vagrant but has since been removed. You can either use virtualized CXL devices or you can use [PCIe passthrough](docs/libvirt-pcie-passthrough.md) to passthrough real diff --git a/docs/kdevops-configuration.md b/docs/kdevops-configuration.md index ce1799ff1..10fe4eb54 100644 --- a/docs/kdevops-configuration.md +++ b/docs/kdevops-configuration.md @@ -8,7 +8,7 @@ make help # Configuring kdevops -kdevops provides support for vagrant, Terraform, bare metal, and optionally +kdevops provides support for Terraform, bare metal, and optionally helps you install and configure libvirt, as well as let you choose which git tree for Linux to compile, install and boot into, along with which git tag or commit ID use, and apply any extra patches you might have. The last step of @@ -20,7 +20,7 @@ few more elaborate projects are referenced later. What a target system may need will vary depending on your needs and your preferences and so the Linux modeling variability language, Kconfig, has been embraced to allow users to configure how kdevops is to be used. You choose -whether or not to use vagrant, Terraform, bare metal, and what bells or +whether or not to use Terraform, bare metal, and what bells or whistles to turn on or off. To configure kdevops use: diff --git a/docs/kdevops-dynamic-configuration.md b/docs/kdevops-dynamic-configuration.md index 54f558cf4..c95e1475d 100644 --- a/docs/kdevops-dynamic-configuration.md +++ b/docs/kdevops-dynamic-configuration.md @@ -20,9 +20,9 @@ make dynconfig ### CXL topologies -Today we construct CXL topologies manually through kconfig and -Vagrantfile qemu line entries based on jinja2 variables. It should be possible -to generate CXL topologies automatically. +Today we construct CXL topologies manually through kconfig and qemu command +line options derived from jinja2 variables. It should be possible to +generate CXL topologies automatically. ### dynamic cloud configs diff --git a/docs/kdevops-terraform.md b/docs/kdevops-terraform.md index e6a518c7f..fd14b22db 100644 --- a/docs/kdevops-terraform.md +++ b/docs/kdevops-terraform.md @@ -27,7 +27,7 @@ make menuconfig ``` Under "Bring up methods" you will see the option for -"Node bring up method (Vagrant for local virtualization (KVM / VirtualBox))". +"Node bring up method (Use guestfs-tools for local virtualization via KVM and libvirt)". Click on that and then change the option to "Terraform for cloud environments". That should let you start configuring your cloud provider options. You can use the same main menu to configure specific workflows supported by kdevops, @@ -69,8 +69,7 @@ writing we support this for all cloud providers we support. After `make bringup` you should have had your SSH configuration file updated automatically with the provisioned hosts. The Terraform module -`add-host-ssh-config` is used to do the work of updating your SSH configuration, -a module is used to share the code with provisioning with vagrant. +`add-host-ssh-config` is used to do the work of updating your SSH configuration. The Terraform module on the registry: @@ -80,22 +79,14 @@ The Terraform source code: * https://github.com/mcgrof/terraform-kdevops-add-host-ssh-config -Because the same code is shared between the vagrant Ansible role and the -Terraform module, a git subtree is used to maintain the shared code. The -Terraform code downloads the module on its own, while the code for -the Vagrant Ansible role has the code present on the kdevops tree as -part of its local directories in under: +Because the same code is shared between the Ansible role and the +Terraform module, a git subtree is used to maintain the shared code. +The Terraform module downloads its own copy of the ssh config helper code +and kdevops now ships a small helper script under +`scripts/update_ssh_config_guestfs.py`. - * `playbooks/roles/update_ssh_config_vagrant/update_ssh_config/` - -Patches for code for in `update_ssh_config` can go against -the `playbooks/roles/update_ssh_config_vagrant/update_ssh_config/` -directory, but should be made atomic so that these changes can -be pushed onto the standalone git tree for update_ssh_config on -a regular basis. For details on the development workflow for it, -read the documentation on: - - * [update_ssh_config documentation](playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md) +Patches for this script should be kept simple so they can be shared with +the standalone Terraform module. ## Destroying nodes with Terraform diff --git a/docs/kdevops-vagrant.md b/docs/kdevops-vagrant.md deleted file mode 100644 index 1e214d096..000000000 --- a/docs/kdevops-vagrant.md +++ /dev/null @@ -1,130 +0,0 @@ -# Vagrant support - localized VMs - -Vagrant is used to easily deploy non-cloud virtual machines. Below are -the list of providers supported: - - * VirtualBox - * libvirt (KVM) - -The following Operating Systems are supported: - - * OS X - * Linux - -## Running libvirt as a regular user - -kdevops is designed be used without requiring root privileges, however your -user must be allowed to run sudo without a password, and for the regular -user to also be able to run libvirt commands as a regular user. We have an -Ansible role which takes care of dealing with this for you. You'd only use -libvirt if using Linux. - -## Node configuration - -The term `host` is often used to describe `localhost`, and so to help -distinguish `localhost` from your target hosts you'd use for development we -refer to target hosts for development as `nodes`. - -We use a yml file to let you describe your project's nodes and how to configure -them. You configure your node target deployment on the -``vagrant/${PROJECT}_nodes.yaml`` file by default. Since this file is committed -into git, if you want to override the defaults and keep that file outside of -git you can use use the file: - - * ``vagrant/${PROJECT}_nodes_override.yaml`` - -If you prefer a different override file, you can use the environment variable -``KDEVOPS_VAGRANT_NODE_CONFIG`` to define the vagrant host description file -used. - -## Provisioning with vagrant - -If on Linux we'll assume you are using KVM / libvirt. If on OS X we'll assume -you are using VirtualBox. If these assumptions are incorrect you can override -on the configuration file for your node provisioning. For instance, for this -demo you'd use `vagrant/kdevops_nodes.yaml` and set the `force_provider` variable -to either "libvirt" or "kvm". You can also use environment variables to -override the provider: - - * KDEVOPS_VAGRANT_PROVIDER - -You are responsible for having a pretty recent system with some fresh -libvirt, or VirtualBox installed. You are encouraged to use the latest release -for your OS and preferably a rolling Linux distribution release. A VirtualBox -which supports NVMe is required. - -To ramp up your guests with vagrant: - -```bash -make -make bringup -``` - -The last step in the above `make bringup` is to run optional Ansible roles -which can enable direct ssh access to nodes and also run a bit of basic -provisioning. Although vagrant has direct support for running Ansible we do -not make use of this mechanism as it has proven to be fragile before. If -`CONFIG_KDEVOPS_SSH_CONFIG_UPDATE` is enabled your ssh configuration -is updated to enable Ansible to connect to the nodes which have come up. If -`CONFIG_KDEVOPS_ANSIBLE_PROVISION_PLAYBOOK` is enabled then the Ansible -role configured in `CONFIG_KDEVOPS_ANSIBLE_PROVISION_PLAYBOOK` is the first -Ansible to run against nodes to do initial provisioning which by default is the -`devconfig` Ansible role. This is all done as part of the `bringup_vagrant` -target on the file `scripts/vagrant.Makefile`. The roles used are: - - * [update_ssh_config_vagrant](playbooks/roles/update_ssh_config_vagrant/README.md) - * [devconfig](playbooks/roles/devconfig/README.md) - -At this point basic initial provisioning is complete. - -### Code changes for update_ssh_config_vagrant - -The Ansible role `update_ssh_config_vagrant` is used to help update your -ssh configuration when using vagrant. The actual code used is a python -script which is also shared for kdevop's support of Terraform for cloud -provisioning support. The `update_ssh_config_vagrant` Ansible role in -kdevops has the for for the python script locally by using a git subtree. -Updates to actual python code used should be made atomically so that these -changes get pushed back upstream. For more details refer to the following -documentation: - - * [update_ssh_config shared code documentation](playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md) - -## Destroying provisioned nodes with vagrant - -You can just use the helper: - -```bash -make destroy -``` - -Or you can either destroy directly with vagrant: - -```bash -cd vagrant/ -vagrant destroy -f -rm -rf .vagrant -``` - -Or you can just use virsh directly, if using KVM: - -```bash -sudo virsh list --all -sudo virsh destroy name-of-guest -sudo virsh undefine name-of-guest -``` - -## Limiting vagrant's number of boxes - -By default using vagrant will try to create *all* the nodes specified on -your configuration file. By default this is `vagrant/kdevops_nodes.yaml` for -this project, and there are currently 2 nodes there. If you are going to just -test this framework you can limit this initially using environment variables: - -```bash -export KDEVOPS_VAGRANT_LIMIT_BOXES="yes" -export KDEVOPS_VAGRANT_LIMIT_NUM_BOXES=1 -``` - -This will ensure only the first host, for example, would be created and -provisioned. diff --git a/docs/kernel-ci/kdevops-subtree-recommeded.md b/docs/kernel-ci/kdevops-subtree-recommeded.md index c4dfb2b10..7ff5ca99c 100644 --- a/docs/kernel-ci/kdevops-subtree-recommeded.md +++ b/docs/kernel-ci/kdevops-subtree-recommeded.md @@ -8,7 +8,7 @@ tree as a git sub tree might be: * keeping track of expunges for baselines for releases which are not yet public - * adding support vagrant images for releases which are not yet public + * adding support images for releases which are not yet public * dealing with internal R&D registration (consider enterprise Linux registration) of guests to a subscription service diff --git a/docs/lbs.md b/docs/lbs.md index 9742fe1d1..ab55f9bad 100644 --- a/docs/lbs.md +++ b/docs/lbs.md @@ -92,20 +92,7 @@ and if you later want to, use ext4 on the same drive after wiping XFS. ## Experimenting with pure-iomap -Kdevops provides its own debian-testing vagrant image which supports XFS as the main -root image, and thus could also enable experimenting with pure-iomap. Pure-iomap -allows the `bdev cache` to use IOMAP instead of buffer-heads when doing disk -partition scanning on bootup. - -Enable: - - * `CONFIG_VAGRANT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427` - -This effectively enables the vagrant image: - - * [kdevops debian-xfs-20230427](https://app.vagrantup.com/linux-kdevops/boxes/debian-xfs-20230427/) - -If you'd like to work on your own image see [kdevops docs on building custom vagrant images](https://github.com/linux-kdevops/kdevops/blob/master/docs/custom-vagrant-boxes.md). +Pure-iomap allows the `bdev cache` to use IOMAP instead of buffer-heads when doing disk partition scanning on bootup. If you want to build your own image see the documentation on creating custom images. # Regressions large-block-next diff --git a/docs/libvirt-pcie-passthrough.md b/docs/libvirt-pcie-passthrough.md index f9ff1d183..18781671b 100644 --- a/docs/libvirt-pcie-passthrough.md +++ b/docs/libvirt-pcie-passthrough.md @@ -30,8 +30,7 @@ not everyone wants these features. ## Enable kdevops PCIe passthrough support -PCIe passthrough support is currently only available when you select to -use vagrant with libvirt. The respective Kconfig option is +PCIe passthrough support is available when using libvirt. The respective Kconfig option is `CONFIG_KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH`. If you enable that you then get to pick what technique you wish to use to @@ -97,7 +96,7 @@ to review how this is done generically with kdevops. You don't need to read this if you are using `make dynconfig`. To get this to work you must modify permissions of some sysfs files so that -vagrant/libvirt will work properly. You also must make sure the vfio devices +libvirt will work properly. You also must make sure the vfio devices are accessible by the libvirt group. Scripts are provided to do all the work for you, but you must determine the PCIe ID's of the devices you want to passthrough. The following is an example @@ -119,15 +118,12 @@ above example, you would have a `pcipassthrough` option with the configuration for your given device ```yaml -vagrant_boxes: - - name: kdevops-btrfs-zns - ip: 172.17.8.101 - pcipassthrough: - zns1: - domain: 0x0000 - bus: 0x2d - slot: 0x00 - function: 0x0 +pcipassthrough: + zns1: + domain: 0x0000 + bus: 0x2d + slot: 0x00 + function: 0x0 ``` From here you will be able to run `make bringup` and the PCIe passthrough will diff --git a/docs/libvirt-storage-pool.md b/docs/libvirt-storage-pool.md index 238da6f6d..045d89e10 100644 --- a/docs/libvirt-storage-pool.md +++ b/docs/libvirt-storage-pool.md @@ -1,20 +1,15 @@ # kdevops libvirt storage pool considerations -Only read this page if you are using libvirt for virtualization with Vagrant. - -Since kdevops uses Vagrant, it is important to understand how Vagrant makes -use of storage within libvirt. And the reason it is important is that the -way Vagrant uses pool storage is rather stupid, and long term can really be -counter productive if you want to scale. - -By default, if you are on a bare new system, using Vagrant with libvirt -will assume you want to create a "default" libvirt storage pool on the -*same* directory where your Vagrantfile is located! This is insanity. -It is pure bananas. This is specially true that today all distributions other -than fedora essentially require you to work with root to work with libvirt. -On those distros then, if you later want to start guests with libvirt manually, -you'd run into a bit of a surprise when you realize what your default -libvirt storage pool is. +Only read this page if you are using libvirt for virtualization. + +kdevops uses libguestfs utilities to build images and relies on libvirt to +run the guests. Understanding how libvirt storage pools work is important if +you want to customize storage locations or scale your environment. + +By default libvirt may create a "default" storage pool in the same directory +where you run libguestfs. On distributions where libvirt runs as root this can +lead to confusion if you later start guests manually and expect a different +default pool. If you're not sure if you are using libvirt storage pool or have one defined: diff --git a/docs/linux-distro-support.md b/docs/linux-distro-support.md index f8ab74b62..24ed4731b 100644 --- a/docs/linux-distro-support.md +++ b/docs/linux-distro-support.md @@ -13,8 +13,7 @@ Distributions are supported as new users add support for them. Adding support for a new distribution typically just consists of updating the kdevops Ansible roles with support for doing a mapping of package names, package manager updates, and ensuring your distribution can install the latest -version of vagrant and Terraform. Because you *want* the latest version of -vagrant and Terraform rolling Linux distributions are encouraged to be used. +version of Terraform. Rolling Linux distributions are encouraged to be used. Currently supported Linux distributions: * Debian testing @@ -22,9 +21,9 @@ Currently supported Linux distributions: * OpenSUSE Tumbleweed * Ubuntu 21.10 -If your distribution does not have vagrant and Terraform packaged, support -is provided to download the latest releases via the published zip files, -however this can get complex quite fast due to the dependency chain. +If your distribution does not have Terraform packaged, support is provided +to download the latest release via the published zip files, however this +can get complex quite fast due to the dependency chain. ## Target Linux distributions support diff --git a/docs/requirements.md b/docs/requirements.md index eddf50038..c637c3aa6 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -17,12 +17,6 @@ Then you can now run: # Supported base distributions for command and control -Examples of well tested rolling distributions recommended if using vagrant: - - * Debian testing - * OpenSUSE Tumbleweed - * Fedora - * Latest Ubuntu - -If using Terraform just ensure you can upgrade Terraform to the latest release -regularly. +Examples of well tested rolling distributions include Debian testing, +OpenSUSE Tumbleweed, Fedora and the latest Ubuntu. Ensure you can +upgrade Terraform to the latest release regularly if you rely on it. diff --git a/docs/running-make.md b/docs/running-make.md index 88aa6d2b7..3a86e1cc2 100644 --- a/docs/running-make.md +++ b/docs/running-make.md @@ -35,15 +35,3 @@ rm -f hosts make hosts ``` - * If using virtualization it will generate the dynamic Vagrant and vagrant - nodes file, `kdevops_nodes.yaml`. - - It is *not* safe to destroy the Vagrantfile if you have done a git fetch - and reset for kdevops, given that vagrant requires you to never modify - your Vagrantfile *after* you have instantiated guests. kdevops provides - a guard file for you so you don't shoot yourself in the foot and make - commands won't regenerate the file for you unless you remove this guard. - - The files in question is `vagrant/Vagrantfile`. The respective configuration - for the nodes, `vagrant/kdevops_nodes.yaml` should not be updated either, - because the Vagrantfile relies on it. diff --git a/docs/the-gen-nodes-ansible-role-vagrant.md b/docs/the-gen-nodes-ansible-role-vagrant.md deleted file mode 100644 index 0bf907009..000000000 --- a/docs/the-gen-nodes-ansible-role-vagrant.md +++ /dev/null @@ -1,78 +0,0 @@ -# Vagrant gen_nodes work - -The `gen_nodes` ansible role is used to let us generate certain target files we -need upon bringup. The amount of files it generates will depend on the features -you have enabled. For local virtualization we support vagrant and the files -generated are listed below. - - * The `KDEVOPS_NODES` file: defines which nodes to create - * The `vagrant/Vagrantfile`: a dynamic Vagrantfile - -## KDEVOPS_NODES and KDEVOPS_NODES_TEMPLATE for vagrant - -If you have local virtualization enabled vagrant then we default these: - - * `KDEVOPS_NODES` as `vagrant/kdevops_nodes.yaml` - * `KDEVOPS_NODES_TEMPLATE` is set to the jinja2 template `$(KDEVOPS_NODES_ROLE_TEMPLATE_DIR)/kdevops_nodes_split_start.j2.yaml`. - -Your workflow can override this to something different if needed. - -### Dynamic vagrant/kdevops_nodes.yaml file - -Although the top level ansible hosts file is already dynamic -(see [dynamic kdevops ansible hosts file)](docs/the-gen-hosts-ansible-role.md)) -we currently also generate another yaml file which is used by both local -virtualizaition and cloud environment for node definitions. This file -is a bit more complex given we also extend it with a set of libvirt options -for dynamic features to hosts, to do this jinja2 routines are used. - - * [kdevops dynamic ansible hosts file](playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml) - * [kdevops dynamic ansible hosts file](playbooks/roles/gen_nodes/templates/hosts.j2) - -As you will see, the `kdevops_nodes_split_start.j2.yaml` starts off with -a set of variables. Most of these were defined and used before we started -embracing Kconfig, so one future work item is to try to see which ones -make sense to move to Kconfig and then `extra_vars.yaml` so we don't have them -in this file. - -The last part of the file is as follows - -``` -vagrant_boxes: -{% include './templates/hosts.j2' %} -``` - -This just calls the jinja2 helper `gen_nodes_list()` with a series of arguments. -This in turn just processes the loop of `gen_node()` for each node in the -array nodes_list. That routine will augment the series of requirements which -are node specific. For example if `passthrough_enable` is `True` it will augment -the node with PCIe passthrough options. - -#### Hyper dynamic qemu feature - -Support for [PCIe passthrough support docs](docs/libvirt-pcie-passthrough.md) is -accomplished by scraping your host system and generating dynamic Kconfig files. -These files are unique to your host and because of this kdevops is -`hyper dynamic`. kdevops uses this support to let you pick which target -nodes will get what features and extends qemu arguments for each guest. - -This demonstrate both how we both: - - * static Kconfig options for qemu per guest - * hyper dynamic Kconfig options for qemu per guest - -#### Static dynamic qemu features per guest - -Given dynamic Kconfig features are possible, it should be easy to then extend -vagrant support to also support different features which don't depend on your -host system, but rather are defined statically on everyone's Kconfig options. -This might be useful, for example, to extend CXL topologies statically. -However, considerations should be also taken to evaluate if a dynamic set -of CXL topologies *could* be inferred based on programming, how would we -define them? Evaluation for this should be done. - -If you want you can just define a custom `KDEVOPS_NODES_TEMPLATE` as well. - -## Related files - - * [Vagrant top level Makefile](scripts/vagrant.Makefile) diff --git a/docs/the-gen-nodes-ansible-role.md b/docs/the-gen-nodes-ansible-role.md index 916b848db..da6edbcc1 100644 --- a/docs/the-gen-nodes-ansible-role.md +++ b/docs/the-gen-nodes-ansible-role.md @@ -12,8 +12,8 @@ file. That's it. You then codify in the template file what you need using your configuration. The `gen_nodes` ansible role is in charge of generating node specific -files. The amount of files generated will depend on if you are using -local virtualization (vagrant) or cloud (terraform). We document both below. +files. The amount of files generated will depend on whether you are using +local virtualization or cloud (terraform). We document both below. For both cases we always generate the `KDEVOPS_NODES` file based on the jinja2 template `KDEVOPS_NODES_TEMPLATE`. @@ -34,10 +34,10 @@ KDEVOPS_NODES_ROLE_TEMPLATE_DIR := $(KDEVOPS_PLAYBOOKS_DIR)/roles/gen_nodes/temp The `KDEVOPS_NODES` and `KDEVOPS_NODES_TEMPLATE` is a top level Makefile variable set to empty at first. -If you have local virtualization enabled vagrant then we default these: +If local virtualization is enabled we default these: - * `KDEVOPS_NODES` as `vagrant/kdevops_nodes.yaml` - * `KDEVOPS_NODES_TEMPLATE` is set to the jinja2 template `$(KDEVOPS_NODES_ROLE_TEMPLATE_DIR)/kdevops_nodes_split_start.j2.yaml`. + * `KDEVOPS_NODES` as `guestfs/kdevops_nodes.yaml` + * `KDEVOPS_NODES_TEMPLATE` is set to the jinja2 template `$(KDEVOPS_NODES_ROLE_TEMPLATE_DIR)/guestfs_nodes.j2`. If using a cloud environment terraform will set these to be other files: @@ -48,5 +48,4 @@ Furthermore, your workflow can override this to something different if needed. Docs for each are split up: - * [gen_nodes for vagrant](the-gen-nodes-ansible-role-vagrant.md) * [gen_nodes for terraform](the-gen-nodes-ansible-role-terraform.md) diff --git a/docs/why-vagrant.md b/docs/why-vagrant.md deleted file mode 100644 index ac075bfe4..000000000 --- a/docs/why-vagrant.md +++ /dev/null @@ -1,66 +0,0 @@ -# Vagrant deprecation - -vagrant is not actively maintained so we have moved away from it for -new development / features, [libguestfs](https://libguestfs.org/) is the -focus of support for new features involving local virtualization. - -# Why Vagrant is used for virtualization - -There are a few reasons why kdevops has embraced Vagrant. Below we go through -each of them. - -## What is a Vagrant box anyway? - -First let's understand what a Vagrant box is. A Vagrant box is essentially a -tarball (gzip, xc are both supported) with a qcow2 image and a small metadata -file explaining how large the drive for the guest is. - -## Reducing bring up speed - -Hackers just want to get a guest up fast, slap a kernel on it as fast as -possible, and hope it comes up, and then run some tests or hack something up -on the kernel. The faster we can do this the better. - -The typical approach to using guests is to install a guest using an ISO, and -that takes time. Another way is to just keep copies around of some qcow2 images -and just copy them over when you want to do something new. This can become a -bit of a managing nightmare if you are doing this manually though. Vagrant -abstracts this for you, and essentially does just that. - -## Vagrant has sensible developer friendly settings - -If you are installing a guest with an ISO, you likely will then start doing -a few custom things as a developer. The first thing most developers do is -add a sudoers for your username. A Vagrant box already comes with these things -preset. Also, sensible defaults for the username and root password are set, -because we don't care about security when doing quick bringups for quick -development / testing. - -Another example setup which Vagrant takes care of is bringing up SSH and -letting you SSH to the guest right away. Below is a list of things Vagrant -boxes already come set up with, so you as a developer don't have to do this: - - * 1) root/vagrant user password is vagrant - * 2) Vagrant user on /etc/sudoers does not need a password to gain root - * 3) Vagrant can create a random SSH key for each guest - * 4) Deal with persistent net rules - * 5) Ensure DHCP will work on the first network interface - * 6) Ensure the console is allowed - * 7) Try to use disk partitions by UUID on /etc/fstab - * 8) GRUB disk setup with UUID - -If you'd like to learn more about this read the -[making custom vagrant boxes documentation](docs/custom-vagrant-boxes.md) - -## Supporting different virtualization technologies - -There are different software solutions available which can take -advantage of your architecture's virtualization features and control -guests. Examples are libvirt, VirtualBox. Vagrant abstracts the -virtualization solution used as a "provider" and each provider then -can support its own way to bring up guests. - -## Supporting different Operating Systems - -If we only supported libvirt it would mean you cannot use kdevops on Mac OS X. -OS X users can make user of virtualbox for kdevops. diff --git a/kconfigs/Kconfig.ansible_provisioning b/kconfigs/Kconfig.ansible_provisioning index 63f04306e..f90ebb3cd 100644 --- a/kconfigs/Kconfig.ansible_provisioning +++ b/kconfigs/Kconfig.ansible_provisioning @@ -182,15 +182,12 @@ config DEVCONFIG_SYSTEMD_JOURNAL_USE_HTTP config DEVCONFIG_SYSTEMD_JOURNAL_REMOTE_URL string "systemd-remote URL" - default $(shell, scripts/append-makefile-vars.sh http:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT)) if VAGRANT default $(shell, scripts/append-makefile-vars.sh http:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS)) if GUESTFS help This is used for the client /etc/systemd/journal-upload.conf URL line. By default we won't use SSL for now. If you should make sure the - IP address used here matches what the node should use. If using - libvirt then ensure it is the same for your virtualization setup. - If you are using vagrant on debian on the host it would seem the - current default should work. + IP address used here matches what the node should use. If using + libvirt then ensure it is the same for your virtualization setup. endif # DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE diff --git a/kconfigs/Kconfig.bringup b/kconfigs/Kconfig.bringup index a9aefc56e..92a6a58a8 100644 --- a/kconfigs/Kconfig.bringup +++ b/kconfigs/Kconfig.bringup @@ -14,8 +14,8 @@ config GUESTFS select KDEVOPS_ENABLE_GUESTFS select EXTRA_STORAGE_SUPPORTS_LARGEIO help - This option will use libguestfs utilities instead of Vagrant to build - guest images and spin them up using libvirt with KVM. + This option will use libguestfs utilities to build + guest images and spin them up using libvirt with KVM. config TERRAFORM bool "Terraform for cloud environments" @@ -24,8 +24,8 @@ config TERRAFORM select EXTRA_STORAGE_SUPPORTS_2K select EXTRA_STORAGE_SUPPORTS_4K help - This option will enable use of Vagrant. Enable this if you want to - use terraform to create nodes on a cloud environment such as: + Enable this if you want to use terraform to create nodes on a cloud + environment such as: * Azure * AWS @@ -54,12 +54,11 @@ config SKIP_BRINGUP endchoice config LIBVIRT - bool - depends on VAGRANT_LIBVIRT_SELECT || GUESTFS - default y + bool + depends on GUESTFS + default y source "kconfigs/Kconfig.guestfs" -source "vagrant/Kconfig" source "terraform/Kconfig" if LIBVIRT source "kconfigs/Kconfig.libvirt" diff --git a/kconfigs/Kconfig.hypervisor b/kconfigs/Kconfig.hypervisor index c37d64549..8a68af8b2 100644 --- a/kconfigs/Kconfig.hypervisor +++ b/kconfigs/Kconfig.hypervisor @@ -15,7 +15,7 @@ if HYPERVISOR_TUNING config HYPERVISOR_TUNING_KSM bool "Enable Kernel same page merging on the host" - default y if LIBVIRT || VAGRANT_VIRTUALBOX + default y if LIBVIRT help Enabling KSM can save tons of memory, in some kernel-ci systems with about 60 guests it has saved about 135 GiB of RAM. If you enable this @@ -29,7 +29,7 @@ config HYPERVISOR_TUNING_KSM config HYPERVISOR_TUNING_ZSWAP bool "Enable zswap on the host" - default y if LIBVIRT || VAGRANT_VIRTUALBOX + default y if LIBVIRT help Zswap is a lightweight compressed cache for swap pages Although in theory designed for swap, you can enable zswap and still diff --git a/kconfigs/Kconfig.kdevops b/kconfigs/Kconfig.kdevops index 35e9758d7..ebec17ffd 100644 --- a/kconfigs/Kconfig.kdevops +++ b/kconfigs/Kconfig.kdevops @@ -25,15 +25,11 @@ config HAVE_DISTRO_REQUIRES_CUSTOM_SSH_KEXALGORITHMS config CUSTOM_DISTRO_HOST_PREFIX string depends on HAVE_CUSTOM_DISTRO_HOST_PREFIX - default VAGRANT_DEBIAN_BOX_SHORT if VAGRANT_DEBIAN - default VAGRANT_OPENSUSE_BOX_SHORT if VAGRANT_OPENSUSE - default VAGRANT_REDHAT_GENERIC_BOX_SHORT if VAGRANT_REDHAT_GENERIC - default GUESTFS_DEBIAN_BOX_SHORT if GUESTFS_DEBIAN + default GUESTFS_DEBIAN_BOX_SHORT if GUESTFS_DEBIAN config CUSTOM_SSH_KEXALGORITHMS string depends on HAVE_DISTRO_REQUIRES_CUSTOM_SSH_KEXALGORITHMS - default VAGRANT_SUSE_CUSTOM_SSH_KEXALGORITHMS if VAGRANT_SUSE config KDEVOPS_USE_DISTRO_HOSTS_PREFIX bool "Use a distribution release code name as prefix for hosts" @@ -184,7 +180,6 @@ if KDEVOPS_ENABLE_DISTRO_EXTRA_ADDONS config KDEVOPS_EXTRA_ADDON_SOURCE string depends on HAVE_DISTRO_SUSE - default VAGRANT_SUSE_EXTRA_ADDON_SOURCE if VAGRANT endif # KDEVOPS_ENABLE_DISTRO_EXTRA_ADDONS diff --git a/kconfigs/Kconfig.kernel-ci b/kconfigs/Kconfig.kernel-ci index 0bc6710c4..ff975a3b3 100644 --- a/kconfigs/Kconfig.kernel-ci +++ b/kconfigs/Kconfig.kernel-ci @@ -90,8 +90,8 @@ config KERNEL_CI_EMAIL_REPORT if KERNEL_CI_EMAIL_REPORT config KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC - bool "Enable a custom kernel-ci subject topic for email reports" - default y if BOOTLINUX || VAGRANT + bool "Enable a custom kernel-ci subject topic for email reports" + default y if BOOTLINUX help Enable this so that you can customize the subject slightly for kernel-ci email reports. The email subject prefix will always @@ -108,9 +108,8 @@ if KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC config KERNEL_CI_SUBJECT_TOPIC string "Main email subject topic prefix to use" - default "" if !BOOTLINUX && !VAGRANT - default VAGRANT_PREFERRED_KERNEL_CI_SUBJECT_TOPIC if !BOOTLINUX && VAGRANT - default BOOTLINUX_TREE_NAME if BOOTLINUX + default "" if !BOOTLINUX + default BOOTLINUX_TREE_NAME if BOOTLINUX help Email kernel-ci subject will include the git tree name you are using. This is set in the BOOTLINUX_TREE_NAME kconfig variable. For instance, diff --git a/kconfigs/Kconfig.libvirt b/kconfigs/Kconfig.libvirt index 1b8f4b95f..2f4568636 100644 --- a/kconfigs/Kconfig.libvirt +++ b/kconfigs/Kconfig.libvirt @@ -18,9 +18,7 @@ config LIBVIRT_CONFIGURE in again, to ensure the new group takes effect. The goal in the configuration will be to ensure you can use libvirt to spawn guests as a regular user. You are encouraged to say y here unless you know - what you are doing or you already know this works. If you are unsure, - the litmus test for this is if you can run vagrant up, on any public - demo box available. + what you are doing or you already know this works. config LIBVIRT_VERIFY bool "Verify that a user can spawn libvirt as a regular user" @@ -30,7 +28,7 @@ config LIBVIRT_VERIFY To enable a user to be able to spawn libvirt guests as a regular user a user is typically added to a few groups. These groups are not effective immediately, and so before a user can assume that they - use Vagrant they must verify that the required groups are effective. + start guests they must verify that the required groups are effective. If you enable this option, we will spawn an Ansible role that will verify and ensure that your user is already part of these groups. You can safely say yes here. @@ -60,7 +58,7 @@ config LIBVIRT_URI_SYSTEM proper networkings via bridges or virtual networks. qemu:///system is generally what tools like virt-manager default to. - When this option is enabled vagrant's libvirt default built-in + When this option is enabled libvirt default built-in URI is used along with the default network management interface, libvirt socket, and the network interface assumed for bridging. @@ -92,7 +90,7 @@ config LIBVIRT_URI_SESSION you are doing custom networking stuff this may be more relevant for you. Fedora defaults to the session URI. - When this option is enabled we modify vagrant's libvirt default + When this option is enabled we modify libvirt default built-in URI for the session URI, and we also modify the default network management interface to be virbr0, the default socket is assumed to be /run/libvirt/libvirt-sock-ro. New Kconfig options @@ -120,14 +118,14 @@ config LIBVIRT_URI_PATH string "Libvirt QEMU URI to use" default "qemu:///system" if LIBVIRT_URI_SYSTEM || LIBVIRT_URI_CUSTOM default "qemu:///session" if LIBVIRT_URI_SESSION - help - By default Vagrant uses a qemu:///system URI which assumes the libvirt - daemon runs as a user other than the user which is running the vagrant - commands. Libvirt has support for running the libvirt daemon as other - users using session support. This will be modified to a session URI - if you enable LIBVIRT_URI_SESSION. You can however set this to - something different to suit your exact needs here. This is the value - passed to the vagrant-libvirt plugin libvirt.uri. You should not have + help + By default libvirt uses a qemu:///system URI which assumes the libvirt + daemon runs as a user other than the user running the commands. + Libvirt has support for running the libvirt daemon as other + users using session support. This will be modified to a session URI + if you enable LIBVIRT_URI_SESSION. You can however set this to + something different to suit your exact needs here. This is the value + passed to the libvirt plugin libvirt.uri. You should not have to modify this value if you selected LIBVIRT_URI_SYSTEM or LIBVIRT_URI_SESSION and are starting from a fresh 'make mrproper' setting on kdevops, the appropriate value will be set for you. @@ -139,14 +137,14 @@ config LIBVIRT_SYSTEM_URI_PATH default "qemu:///system" help This is the URI of QEMU system connection, used to obtain the IP - address for management. This is used for the vagrant-libvirt plugin - libvirt.system_uri setting. If for whatever reason this needs to + address for management. This is used for the libvirt plugin + libvirt.system_uri setting. If for whatever reason this needs to be modified you can do so here. Even if you are using session support you should leave this with the default qemu:///system setting as this is still used to ensure your guest's IP address will be - communicated back to Vagrant so it determines the guest is up and + communicated back to kdevops so it determines the guest is up and you can ssh to it. Setting this to qemu:///session still gets the - guest up but Vagrant won't know the guest is up, even though the + guest up but kdevops won't know the guest is up, even though the host can ssh to the guest. You should only modify this value if you know what you are doing. @@ -162,7 +160,6 @@ config LIBVIRT_STORAGE_POOL_PATH default LIBVIRT_STORAGE_POOL_PATH_AUTO if LIBVIRT && !LIBVIRT_STORAGE_POOL_PATH_CUSTOM_MANUAL default LIBVIRT_STORAGE_POOL_PATH_AUTO if LIBVIRT && LIBVIRT_STORAGE_POOL_PATH_CUSTOM_CWD default LIBVIRT_STORAGE_POOL_PATH_CUSTOM if LIBVIRT && LIBVIRT_STORAGE_POOL_PATH_CUSTOM_MANUAL - default VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM if VAGRANT_VIRTUALBOX config QEMU_BIN_PATH string @@ -464,7 +461,7 @@ config HAVE_LIBVIRT_PCIE_PASSTHROUGH default $(shell, scripts/check_pciepassthrough_kconfig.sh passthrough_libvirt.generated) if HAVE_LIBVIRT_PCIE_PASSTHROUGH -source "vagrant/Kconfig.pcie_passthrough_libvirt" +source "kconfigs/Kconfig.pcie_passthrough_libvirt" endif # HAVE_LIBVIRT_PCIE_PASSTHROUGH choice @@ -473,15 +470,14 @@ choice default LIBVIRT_MACHINE_TYPE_VIRT if TARGET_ARCH_ARM64 config LIBVIRT_MACHINE_TYPE_DEFAULT - bool "Use the default machine type" - depends on VAGRANT + bool "Use the default machine type" help Use whatever default the guest was intended to use. This will either be the machine type used at virt-install time or some other default by QEMU / libvirt. This is important for backward compatibility with older kernels. For example if you enable q35 on an old kernel the old kernel may not boot. For details refer to kdevops commit 83952e2e532e - ("vagrant/kdevops_nodes.yaml.in: remove machine_type)". + ("kdevops_nodes.yaml.in: remove machine_type)". It would seem today's default for libvirt is to still use "pc" which is the old i440x, so you will not get PCIe support. @@ -968,7 +964,7 @@ config LIBVIRT_STORAGE_POOL_PATH_INFER_ADVANCED bool "Use an advanced smart inference for what storage pool path to use" help If you are a power user of kdevops you likely want to enable this. - By default vagrant will assume that if you don't have a virsh pool + By default libvirt will assume that if you don't have a virsh pool that the current directory will become the "default" storage pool path. This is rather silly for an advanced setup. Consider a setup where you have a set of different NVMe drivers mounted on different @@ -996,9 +992,9 @@ config LIBVIRT_STORAGE_POOL_PATH_INFER_ADVANCED that the heuristics will work on each distro with their own defaults. config LIBVIRT_STORAGE_POOL_PATH_CUSTOM_CWD - bool "Use the current vagrant working directory" + bool "Use the current kdevops working directory" help - Select this option if you want to use the vagrant directory inside + Select this option if you want to use the kdevops directory inside where you git cloned kdevops as the libvirt storage pool path where we'll download images and store images for guests spawned. If users git cloned kdevops somewhere in their home directory they'll have to @@ -1031,16 +1027,16 @@ config LIBVIRT_STORAGE_POOL_PATH_AUTO string default $(shell, ./scripts/get_libvirsh_pool_path.sh) if LIBVIRT_STORAGE_POOL_PATH_INFER_ADVANCED default "/var/lib/libvirt/images" if LIBVIRT_STORAGE_POOL_PATH_CUSTOM_DEFAULT_DISTRO - default $(shell, scripts/cwd-append.sh vagrant) if LIBVIRT_STORAGE_POOL_PATH_CUSTOM_CWD + default $(shell, scripts/cwd-append.sh guestfs) if LIBVIRT_STORAGE_POOL_PATH_CUSTOM_CWD help The path to use for the libvirt storage pool path. Since kdevops uses - Vagrant for virtualization this is also the path used to place the + libvirt for virtualization this is also the path used to place the additional NVMe drives created. kdevops adds a postfix "kdevops" to - this directory as it wants to allow Vagrant full control over that + this directory as it wants to allow libvirt full control over that directory. For instance if this is /var/lib/libvirt/images/ kdevops - will let Vagrant store images in /var/lib/libvirt/images/ and + will let libvirt store images in /var/lib/libvirt/images/ and the NVMe qcow2 files created will go in by default to the directory - /var/lib/libvirt/images/kdevops/.vagrant/nvme_disks/guest-hostname/. + /var/lib/libvirt/images/kdevops/guestfs/nvme_disks/guest-hostname/. if LIBVIRT_STORAGE_POOL_PATH_CUSTOM_MANUAL @@ -1049,13 +1045,13 @@ config LIBVIRT_STORAGE_POOL_PATH_CUSTOM default "/var/lib/libvirt/images" help The path to use for the libvirt storage pool path. Since kdevops uses - Vagrant for virtualization this is also the path used to place the + libvirt for virtualization this is also the path used to place the additional NVMe drives created. kdevops adds a postfix "kdevops" to - this directory as it wants to allow Vagrant full control over that + this directory as it wants to allow libvirt full control over that directory. For instance if this is /var/lib/libvirt/images/ kdevops - will let Vagrant store images in /var/lib/libvirt/images/ and + will let libvirt store images in /var/lib/libvirt/images/ and the NVMe qcow2 files created will go in by default to the directory - /var/lib/libvirt/images/kdevops/.vagrant/nvme_disks/guest-hostname/. + /var/lib/libvirt/images/kdevops/guestfs/nvme_disks/guest-hostname/. endif @@ -1065,7 +1061,7 @@ config LIBVIRT_STORAGE_POOL_CREATE default n if !LIBVIRT_STORAGE_POOL_PATH_INFER_ADVANCED default $(shell, ./scripts/get_libvirsh_pool_enabled.sh) if LIBVIRT_STORAGE_POOL_PATH_INFER_ADVANCED help - By default vagrant assumes your storage pool name is "default" and + By default libvirt assumes your storage pool name is "default" and it expects libvirt to have created this for you. If you want to use a custom pool name and path enable this. This is useful if you want to place guest images on another path other than the diff --git a/kconfigs/Kconfig.libvirt.largeio b/kconfigs/Kconfig.libvirt.largeio index 0d9e5973b..5a6590832 100644 --- a/kconfigs/Kconfig.libvirt.largeio +++ b/kconfigs/Kconfig.libvirt.largeio @@ -10,8 +10,8 @@ config QEMU_ENABLE_EXTRA_DRIVE_LARGEIO which are dedicated for largio experimentation testing. For now you will need a distribution with a root filesystem on XFS - or btrfs, and so you will want to enable the kdevops distribution and - VAGRANT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427. This is a requirement + or btrfs, and so you will want to enable the kdevops distribution and + the guestfs Debian testing XFS image from 20230427. This is a requirement given all block devices must use iomap and that is the only current way to disable buffer-heads. Eventually this limitation is expected You can also use large-block-20230525 with Amazon Linux 2023 on AWS. diff --git a/kconfigs/Kconfig.pcie_passthrough_libvirt b/kconfigs/Kconfig.pcie_passthrough_libvirt new file mode 100644 index 000000000..b6a47f285 --- /dev/null +++ b/kconfigs/Kconfig.pcie_passthrough_libvirt @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: copyleft-next-0.3.1 + +config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH + bool "Enable libvirt PCIE passthrough support" + default n + help + Enable this if you want to enable PCI-E passthrough onto target + guests. + +if KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH + +choice + prompt "What guest target type to passthrough to" + default KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_FIRST + +config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_FIRST + bool "Onto the first guest" + help + Select this option if you want to passthrough PCI-E devices selected + onto the first guest that kdevops generates on the nodes list. + +config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_SPECIFIC + bool "Onto a specific host name you'll specify" + help + Select this option if you want to passthrough PCI-E devices onto + a guest hostname. This means you have foresight into the future + generated kdevops nodes that will be available and you will manually + specify a target hostname you want to use to pass on the selected + PCI-E devices to. + +config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_EACH + bool "Per device specific host" + help + Select this option if you want to have the option passthrough PCI-E + devices to different target guests. This will allow you to have the + ability to specify for each found PCI-E device which, to which target + guest you want to enable the device to passthrough onto. + +endchoice + +config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TARGET_HOSTNAME + string "Guest target hostname to passthrough PCI-E devices to" + default "enter-valid-hostname" + depends on KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_SPECIFIC + help + Set this to the hostname of the target guest you want to passthrough + the enabled PCI-E devices to. + +menu "Select which PCI-E devices to passthrough" +source "kconfigs/Kconfig.passthrough_libvirt.generated" +endmenu + +endif # KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH diff --git a/kconfigs/Kconfig.ssh b/kconfigs/Kconfig.ssh index 3b85568e1..4460908db 100644 --- a/kconfigs/Kconfig.ssh +++ b/kconfigs/Kconfig.ssh @@ -50,8 +50,8 @@ config KDEVOPS_SSH_CONFIG_UPDATE_STRICT IdentitiesOnly yes LogLevel FATAL - You are encouraged to use this. Vagrant does this, and so you can't - disable this if you are using Vagrant. + You are encouraged to use this. It mirrors the settings used when + bringing up guests with libguestfs or terraform. config KDEVOPS_SSH_CONFIG_UPDATE_BACKUP bool "Create a backup when updating your SSH config file" @@ -62,6 +62,6 @@ config KDEVOPS_SSH_CONFIG_UPDATE_BACKUP ~/.ssh/config.backup.kdevops.$method - where $method is either Vagrant or terraform. + where $method is either guestfs or terraform. endif # KDEVOPS_SSH_CONFIG_UPDATE diff --git a/kconfigs/workflows/Kconfig.data_partition b/kconfigs/workflows/Kconfig.data_partition index 7a6a592fa..8d0d74a5c 100644 --- a/kconfigs/workflows/Kconfig.data_partition +++ b/kconfigs/workflows/Kconfig.data_partition @@ -55,8 +55,8 @@ config WORKFLOW_INFER_USER_AND_GROUP typically set the username and group ownership of that partition based on passed manual settings. Providing a good guess as defaults through kconfig about what the target user and group should be for the - data partition for systems created with vagrant is easy, but this is - not as easy when users are using Terraform or bare metal. Instead of + data partition for systems created with libvirt is easy, but this is + not as easy when users are using Terraform or bare metal. Instead of extending the possible sensible defaults for the target username and group to use for the data partition based the mechanism used for bringup or Linux distribution chosen, we also provide support to infer @@ -72,7 +72,6 @@ if !WORKFLOW_INFER_USER_AND_GROUP config WORKFLOW_DATA_USER string "The username to use to chown on the target data workflow directory" default "kdevops" if GUESTFS - default "vagrant" if VAGRANT default TERRAFORM_SSH_CONFIG_USER if TERRAFORM help Manual setting for the username to chown the data workflow path. @@ -80,15 +79,13 @@ config WORKFLOW_DATA_USER config WORKFLOW_DATA_GROUP string "The group to use to chown on the target data workflow directory" default "kdevops" if GUESTFS - default "vagrant" if VAGRANT default TERRAFORM_SSH_CONFIG_USER if TERRAFORM_AWS_AMI_DEBIAN || TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN default "users" if !TERRAFORM_AWS_AMI_DEBIAN && !TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN - default "root" if !VAGRANT && !TERRAFORM_AWS_AMI_DEBIAN && !TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN + default "root" if !TERRAFORM_AWS_AMI_DEBIAN && !TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN help Manual setting for the group to chgrp the data workflow path. - We default to "vagrant" if you are using vagrant, otherwise we rely - on the the assumption your distribution has the "users" group created + We rely on the assumption your distribution has the "users" group created for distributions where we are certain of that. If on debian based systems we assume the same group exists with the username you used to log in. diff --git a/kconfigs/workflows/Kconfig.shared b/kconfigs/workflows/Kconfig.shared index 29176b89e..1defacccd 100644 --- a/kconfigs/workflows/Kconfig.shared +++ b/kconfigs/workflows/Kconfig.shared @@ -51,7 +51,6 @@ config WORKFLOW_MAKE_CMD default "make -j 16" if TERRAFORM_AWS_INSTANCE_M5AD_4XLARGE default "make -j 1" if TERRAFORM_AZURE_VM_SIZE_STANDARD_DS1_V2 default "make -j 4" if TERRAFORM_AZURE_VM_SIZE_STANDARD_DS3_V2 - default "make -j 8" if VAGRANT help The actual make command to use when building Linux. You want to optimize this as per the number of cores you have. @@ -98,7 +97,6 @@ config WORKFLOW_KDEVOPS_GIT default "https://github.com/linux-kdevops/kdevops.git" if !GIT_ALTERNATIVES && !HAVE_CUSTOM_KDEVOPS_GIT && !WORKFLOW_KDEVOPS_GIT_SET_BY_CLI default "https://github.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITHUB && !HAVE_MIRROR_KDEVOPS default "https://gitlab.com/linux-kdevops/kdevops.git" if GIT_LINUX_KDEVOPS_GITLAB && !HAVE_MIRROR_KDEVOPS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/kdevops.git) if HAVE_MIRROR_KDEVOPS && VAGRANT && !WORKFLOW_KDEVOPS_GIT_SET_BY_CLI default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/kdevops.git) if HAVE_MIRROR_KDEVOPS && GUESTFS && !WORKFLOW_KDEVOPS_GIT_SET_BY_CLI default $(shell, ./scripts/append-makefile-vars.sh $(GUEST_KDEVOPS_REPO)) if WORKFLOW_KDEVOPS_GIT_SET_BY_CLI help @@ -163,7 +161,6 @@ config CUSTOM_DISTRO_KOTD_REPO string "Distribution KOTD repository" depends on WORKFLOW_KOTD_ENABLE depends on HAVE_DISTRO_CUSTOM_KOTD_REPO - default VAGRANT_SUSE_KOTD_REPO if VAGRANT_SUSE help The URL of the custom KOTD repo for your Linux distribution. @@ -171,6 +168,5 @@ config CUSTOM_DISTRO_KOTD_REPO_NAME string "Distribution KOTD repository name" depends on WORKFLOW_KOTD_ENABLE depends on HAVE_DISTRO_CUSTOM_KOTD_REPO - default VAGRANT_SUSE_KOTD_REPO_NAME if VAGRANT_SUSE help The name of the custom KOTD repo for your Linux distribution. diff --git a/playbooks/install_vagrant_boxes.yml b/playbooks/install_vagrant_boxes.yml deleted file mode 100644 index 8cffb36a9..000000000 --- a/playbooks/install_vagrant_boxes.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - tasks: - - include_role: - name: install_vagrant_boxes diff --git a/playbooks/roles/bootlinux/defaults/main.yml b/playbooks/roles/bootlinux/defaults/main.yml index fd5674b5f..27a6eef8d 100644 --- a/playbooks/roles/bootlinux/defaults/main.yml +++ b/playbooks/roles/bootlinux/defaults/main.yml @@ -4,8 +4,8 @@ kdevops_bootlinux: False infer_uid_and_group: False data_path: "/data" -data_user: "vagrant" -data_group: "vagrant" +data_user: "kdevops" +data_group: "kdevops" data_device: "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops0" data_fstype: "xfs" diff --git a/playbooks/roles/bootlinux/tasks/update-grub/install.yml b/playbooks/roles/bootlinux/tasks/update-grub/install.yml index 286bd32a0..06b962270 100644 --- a/playbooks/roles/bootlinux/tasks/update-grub/install.yml +++ b/playbooks/roles/bootlinux/tasks/update-grub/install.yml @@ -54,7 +54,7 @@ # So for instance, using GRUB_DISABLE_SUBMENU=y results in the following # options: # -# vagrant@kdevops-xfs-nocrc ~ $ awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | awk '{print NR-1" ... "$0}' +# example@kdevops-xfs-nocrc ~ $ awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | awk '{print NR-1" ... "$0}' # 0 ... Debian GNU/Linux, with Linux 5.16.0-4-amd64 # 1 ... Debian GNU/Linux, with Linux 5.16.0-4-amd64 (recovery mode) # 2 ... Debian GNU/Linux, with Linux 5.10.105 diff --git a/playbooks/roles/create_partition/README.md b/playbooks/roles/create_partition/README.md index 32409030d..43e47abf1 100644 --- a/playbooks/roles/create_partition/README.md +++ b/playbooks/roles/create_partition/README.md @@ -53,8 +53,8 @@ Below is an example playbook task: disk_setup_label : "truncated" disk_setup_fs_opts: "-L {{ disk_setup_label }}" disk_setup_path: "/media/truncated" - disk_setup_user: "vagrant" - disk_setup_group: "vagrant" + disk_setup_user: "kdevops" + disk_setup_group: "kdevops" tags: [ 'oscheck', 'truncated_partition' ] ``` diff --git a/playbooks/roles/create_tmpfs/README.md b/playbooks/roles/create_tmpfs/README.md index dfc9dda39..bcb64e9ce 100644 --- a/playbooks/roles/create_tmpfs/README.md +++ b/playbooks/roles/create_tmpfs/README.md @@ -37,8 +37,8 @@ Below is an example playbook task: vars: tmpfs_mount_options: "size=75%" tmpfs_mounted_on: "/test/tmpfs" - tmpfs_user: "vagrant" - tmpfs_group: "vagrant" + tmpfs_user: "kdevops" + tmpfs_group: "kdevops" tags: [ 'oscheck', 'test_tmpfs_enable' ] ``` diff --git a/playbooks/roles/devconfig/README.md b/playbooks/roles/devconfig/README.md index fa3553945..588493fb5 100644 --- a/playbooks/roles/devconfig/README.md +++ b/playbooks/roles/devconfig/README.md @@ -21,7 +21,7 @@ Role Variables -------------- * data_home_dir: the target home directory on each host, this defaults to - /home/vagrant + /home/kdevops * dev_gitconfig_src: your localhost .gitconfig file * dev_gitconfig_dest: where to copy the .gitconfig to on the target system * dev_bash_config: the .bashrc used diff --git a/playbooks/roles/devconfig/defaults/main.yml b/playbooks/roles/devconfig/defaults/main.yml index f746b8949..199df605d 100644 --- a/playbooks/roles/devconfig/defaults/main.yml +++ b/playbooks/roles/devconfig/defaults/main.yml @@ -2,7 +2,7 @@ --- # Your target home directory -data_home_dir: "/home/vagrant" +data_home_dir: "/home/kdevops" # On your own system dev_gitconfig_src: "~/.gitconfig" diff --git a/playbooks/roles/devconfig/scripts/prepare_suse_repos.sh b/playbooks/roles/devconfig/scripts/prepare_suse_repos.sh index 5abd9b4c2..13e173ca6 100755 --- a/playbooks/roles/devconfig/scripts/prepare_suse_repos.sh +++ b/playbooks/roles/devconfig/scripts/prepare_suse_repos.sh @@ -52,8 +52,8 @@ if [ "$(grep '^ID=' /etc/os-release | sed '/opensuse/d')" != "" ]; then # on SLED SUSEConnect tries to add the Nvidia repo with its own GPG key # => this causes a failure (as the key is unknown) - # we therefore disable the Nvidia repo here, as it doesn't work with SLED 12 - # anyway and isn't really useful for a vagrant box + # we therefore disable the Nvidia repo here, as it doesn't work with SLED 12 + # anyway and isn't really useful for automated guest images if [ "$REGISTER_SYSTEM" == "true" ]; then set +e # (need to `set +e` as the SUSEConnect can fail) SUSEConnect --regcode $REG_CODE diff --git a/playbooks/roles/gen_nodes/defaults/main.yml b/playbooks/roles/gen_nodes/defaults/main.yml index 2cf450b84..07839b802 100644 --- a/playbooks/roles/gen_nodes/defaults/main.yml +++ b/playbooks/roles/gen_nodes/defaults/main.yml @@ -2,11 +2,7 @@ --- kdevops_enable_guestfs: False kdevops_enable_terraform: False -kdevops_enable_vagrant: False -kdevops_vagrant: '/dev/null' -kdevops_vagrant_generated: '/dev/null' -kdevops_vagrant_template: '/dev/null' -kdevops_nodes: "vagrant/kdevops_nodes.yaml" +kdevops_nodes: "guestfs/kdevops_nodes.yaml" kdevops_baseline_and_dev: False kdevops_workflow_enable_cxl: False kdevops_workflow_enable_pynfs: False @@ -23,15 +19,13 @@ virtualbox_provider: False libvirt_provider: False libvirt_extra_drive_format: 'qcow2' -vagrant_box: "debian/testing64" -vagrant_box_version: "" libvirt_vcpus_count: 8 libvirt_mem_mb: 4096 gdb_port_conflict: False libvirt_enable_gdb: False libvirt_gdb_baseport: 1234 qemu_bin_path: "/usr/bin/qemu-system-x86_64" -extra_disk_path: ".vagrant/nvme_disks" +extra_disk_path: "guestfs/nvme_disks" extra_disk_driver: "nvme" extra_disk_controller: "NVMe" nvme_zone_enable: False diff --git a/playbooks/roles/gen_nodes/templates/Vagrantfile.j2 b/playbooks/roles/gen_nodes/templates/Vagrantfile.j2 deleted file mode 100644 index a52f55662..000000000 --- a/playbooks/roles/gen_nodes/templates/Vagrantfile.j2 +++ /dev/null @@ -1,478 +0,0 @@ -# -*- mode: ruby -*- -# # vi: set ft=ruby : -# Automatically generated file by kdevops {{ kdevops_version }} - -# This file should only be edited to *grow* support for new features. -# This file is automatically created for you from a jinja2 template file -# and parsed with ansible after extra_vars.yaml file is created. The source is -# playbooks/roles/gen_nodes/templates/Vagrantfile.j2 - -Vagrant.require_version ">= 1.6.0" - -require 'json' -require 'yaml' -require 'fileutils' -require 'rbconfig' - -@os = RbConfig::CONFIG['host_os'] - -# XXX: upstream libvirt enhancement needed -# -# Vagrant allows multiple provider code to be supported easily, however -# this logic assuems all provider setup is supported through configuration -# variables from the provider. This is not the case for libvirt. We need -# to create the qemu image, and the libvirt vagrant provider doesn't have -# support to create the images as virtual box does. We run the commands -# natively, however this also reveals that on execution path even code -# for other providers gets executed regardless of the provider you are -# using *unless* that code is using provider specific variables. Best we -# can do for now is detect your OS and set a local variable where we *do* -# run different local code paths depending on the target provider. -# -# Right now we make these assumptions: -# -# Your OS Provider -# ------------------------------- -# Linux libirt -# Mac OS X virtualbox -provider = "libvirt" - -# Are we in a nested virtualized environment? For now we just -# do something different if we're not on bare metal. We may want -# to do something different later to optimize this further but -# we have to draw the line somewhere. -nested = %x(which systemd-detect-virtd 1>/dev/null 2>&1 || systemd-detect-virt) != "none" - -case -when @os.downcase.include?('linux') - provider = "libvirt" -when @os.downcase.include?('darwin') - provider = "virtualbox" -else - puts "You OS hasn't been tested yet, go add support and send a patch." - exit -end - -# We assume if you are in kdevops/vagrant/ your project namespace is kdevops -project_namespace = File.basename(File.dirname(Dir.getwd)) - -node_config = "kdevops_nodes.yaml" -node_config_override = "kdevops_nodes_override.yaml" - -config_data = YAML.load_file(node_config) - -override_data = false -if File.file?(node_config_override) - override_data = true - config_data_override = YAML.load_file(node_config_override) -end - -global_data = config_data['vagrant_global'] -vagrant_boxes = config_data['vagrant_boxes'] - -if override_data - if config_data_override['vagrant_global'] - global_data = config_data_override['vagrant_global'] - end - if config_data_override['vagrant_boxes'] - vagrant_boxes = config_data_override['vagrant_boxes'] - end -end - -supported_provider = case provider - when "virtualbox" then true - when "libvirt" then true - else false -end - -if ! supported_provider - puts "Unsupported provider: #{provider} on " + RbConfig::CONFIG['host_os'] - puts "Consider adding support and send a patch" - exit -end - -qemu_group = global_data['libvirt_cfg']['qemu_group'] -qemu_group_auto = global_data['libvirt_cfg']['qemu_group_auto'] - -if qemu_group_auto - if File.exist?('/etc/debian_version') - qemu_group = 'libvirt-qemu' - else - qemu_group = 'qemu' - end -end - -kdevops_pool_path = global_data['storage_pool_path'] - -libvirt_session_public_network_dev = global_data['libvirt_cfg']['session_public_network_dev'] - -Vagrant.configure("2") do |config| - vagrant_boxes.each do |server_data| - if Vagrant.has_plugin?("vagrant-timezone") - config.timezone.value = "{{ kdevops_host_timezone.stdout }}" - end - # Using sync folders won't work for say openstack / aws / azure / gce, and - # for that we'll use terraform, so best to allow whatever data we want to - # sync be provisioned with ansible. - config.vm.synced_folder './', '/vagrant', type: '9p', disabled: true, accessmode: "mapped", mount: false - config.vm.define server_data["name"] do |srv| - srv.vm.box = server_data['box'] ? server_data['box'] : global_data["box"] - server_box_version = server_data['box_version'] ? server_data['box_version'] : global_data["box_version"] - if server_box_version != "" - srv.vm.box_version = server_box_version - end -{% if not libvirt_session %} - if ! nested - srv.vm.network "private_network", ip: server_data["ip"] - end -{% endif %} - host_name = server_data["name"] - node_custom_data_path = kdevops_pool_path + "/#{host_name}" - FileUtils.mkdir_p(node_custom_data_path) unless File.exist?(node_custom_data_path) - extra_disk_path = "#{node_custom_data_path}/" + "{{ extra_disk_path }}" - FileUtils.mkdir_p(extra_disk_path) unless File.exist?(extra_disk_path) -{% if libvirt_enable_cxl %} - cxl_path = "#{node_custom_data_path}" + "/cxl" - FileUtils.mkdir_p(cxl_path) unless File.exist?(cxl_path) -{% endif %} -{% if virtualbox_provider %} - srv.vm.provider "virtualbox" do |vb, override| - if provider == "virtualbox" && ! global_data['virtualbox_cfg']['auto_update'] - # we'll need to run later: vagrant vbguest install - config.vbguest.auto_update = false - end - override.vm.hostname = host_name - override.vm.boot_timeout = global_data['boot_timeout'] - vb.memory = global_data["memory"] - vb.cpus = global_data["cpus"] - if global_data['extra_disks'] - port = 0 - port_count = global_data['extra_disks'].size() - global_data['extra_disks'].each do |key, value| - size = value['size'] - # The "purpose" value below is currently an unused label at - # the moment. The serial number is we really use with the - # /dev/disk-id to ensure the extra drives are used as intended. - purpose = key - port_plus = port + 1 - extra_disk = extra_disk_path + "/{{ extra_disk_driver }}#{port}n#{port_plus}.{{ libvirt_extra_drive_format }}" - - # "Standard" provides a sparse file. That's what we want, we cheat - # the OS and only use what we need. If you want the real file size - # add a global config option and send a patch and justify it. I'd - # like to hear about it. We use sparse files for libvirt as well - # and should try to keep setup in sync. - if (! File.file?(extra_disk)) - vb.customize ["createmedium", "disk", "--filename", extra_disk, "--variant", "Standard", "--format", "{{ libvirt_extra_drive_format | upper }}", "--size", size] - end - # Virtualbox supports only one nvme controller... this will fail - # unless you are a Virtualbox hacker adding support for this :) - if global_data['virtualbox_cfg']['nvme_controller_per_disk'] - # https://www.virtualbox.org/manual/ch08.html#vboxmanage-storagectl - # This command attaches, modifies, and removes a storage - # controller. After this, virtual media can be attached to the - # controller with the storageattach command. - extra_drive_name = "{{ extra_disk_driver }}#{port}" - if (! File.file?(extra_disk)) - vb.customize ["storagectl", :id, "--name", "#{extra_drive_name}", "--add", "pcie", "--controller", "{{ extra_disk_controller }}", "--portcount", 1, "--bootable", "off"] - end - # Now attach the drive - vb.customize ["storageattach", :id, "--storagectl", "#{extra_drive_name}", "--type", "hdd", "--medium", extra_disk, "--port", 0] - else - if (port == 0 && !File.file?(extra_disk)) - vb.customize ["storagectl", :id, "--name", "{{ extra_disk_driver }}0", "--add", "pcie", "--controller", "{{ extra_disk_controller }}", "--portcount", port + 1, "--bootable", "off"] - end - vb.customize ["storageattach", :id, "--storagectl", "{{ extra_disk_driver }}0", "--type", "hdd", "--medium", extra_disk, "--port", port] - end - - if global_data['enable_sse4'] - # Support for the SSE4.x instruction is required in some versions of VB. - vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.1", "1"] - vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.2", "1"] - end - port += 1 - end # end of looping all extra disks - end # end of checking for extra disks - end # end of virtualbox provider section -{% endif %} -{% if libvirt_provider %} - # For details see: https://github.com/vagrant-libvirt/vagrant-libvirt - srv.vm.provider "libvirt" do |libvirt, override| - #libvirt.host = "localhost" - override.vm.hostname = host_name - override.vm.boot_timeout = global_data['boot_timeout'] - libvirt.watchdog :model => 'i6300esb', :action => 'reset' - libvirt.storage_pool_path = kdevops_pool_path -{% if libvirt_host_passthrough %} - libvirt.cpu_mode = 'host-passthrough' -{% endif %} -{% if libvirt_storage_pool_create %} - libvirt.storage_pool_name = '{{ libvirt_storage_pool_name }}' -{% endif %} -{% if libvirt_session %} - libvirt.qemu_use_session = true - libvirt.uri = global_data['libvirt_cfg']['uri'] - libvirt.system_uri = global_data['libvirt_cfg']['system_uri'] - libvirt.socket = global_data['libvirt_cfg']['session_socket'] - libvirt.management_network_device = global_data['libvirt_cfg']['session_management_network_device'] -{% else %} - if nested - libvirt.management_network_name = 'vagrant-libvirt-private' - libvirt.management_network_address = '192.168.124.0/24' - libvirt.management_network_device = global_data['libvirt_cfg']['session_management_network_device'] - end -{% endif %} - libvirt.memory = global_data["memory"] - libvirt.cpus = global_data["cpus"] - libvirt.emulator_path = global_data['libvirt_cfg']['emulator_path'] - if server_data["machine_type"] - libvirt.machine_type = server_data["machine_type"] - else - if global_data['libvirt_cfg']['machine_type'] - libvirt.machine_type = global_data['libvirt_cfg']['machine_type'] - end - end - # Add an extra spare PCI or PCI-E root bus to be used for extra drives. - # - # We use a dedicated PCI or PCI-E root bus to not clash with defaults - # which libvirt may use on PCI root bus (pci.0 if PCI, pcie.0 if PCI-E). - # For a while in kdevops we were not clashing with the defaults brought - # up by libvirt-qemu, however recent versions seem to start clashing up - # to pci.0,addr=0x3 so we'd see an error like: - # - # PCI: slot 3 function 0 not available for virtio-blk-pci, in use by nvme,id=(null) (Libvirt::Error) - # - # Just create a PCI or PCI-E root bus dedicated for extra drives. We - # use 0x08 to place this PCI / PCI-E root bus as we know this is - # available on modern x86-64 systems. Eventually we may need to bump - # this to 0x9, but it would be better instead to have vagant-libvirt - # speak "add a new PCI or PCI-E root bus" and "add extra drives" whether - # that is nvme or virtio. - # -{% if not libvirt_override_machine_type %} - # For i440x on x86_64 (default on libvirt as of today) we use PCI, not - # PCI-E. Below assumes i440x. i440x cannot support CXL as it does not - # support PCI-E. - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "pci-bridge,id=custom-pci-for-{{ extra_disk_driver }},chassis_nr=1,bus=pci.0,addr=0x8" -{% else %} -{% if libvirt_machine_type == "q35" %} - libvirt.qemuargs :value => "-global" - libvirt.qemuargs :value => "ICH9-LPC.disable_s3=0" - libvirt.qemuargs :value => "-global" - libvirt.qemuargs :value => "ICH9-LPC.disable_s4=0" -{% endif %} - # This is for exclusive PCIe hierarchies. - # - # For 'q35' on x86_64 and 'virt' for AArch64 we use can use PCI-E - # only hierarchies. - # - # We add a dedicated PCI root bus (pxb-pcie) just for dedicated PCI - # root ports for extra drives, this will be pcie.1. - # - # We can keep doing this to support new technologies. For instance, - # it may be reasonable to add a PCI-E root bus also to support PCI-E - # hotplug on PCI-E capable systems and avoid clashes with libvirt - # defaults on pcie.0. CXL uses its own host bridge so device - # enumeration is pretty well isolated already so no need to do anything - # extra there. - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "pxb-pcie,id=pcie.1,bus_nr=32,bus=pcie.0,addr=0x8" -{% if libvirt_enable_cxl %} - libvirt.qemuargs :value => "-machine" - libvirt.qemuargs :value => "cxl=on" - cpus = global_data["cpus"] - memory = global_data["memory"] - libvirt.numa_nodes = [ - {:cpus => "0-#{cpus - 1}", :memory => global_data["memory"]} - ] - libvirt.qemuargs :value => "-m" - libvirt.qemuargs :value => "maxmem=#{memory *2}M,slots=16" - # CXL host bus - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "pxb-cxl,bus=pcie.0,id=cxl.0,bus_nr=52,addr=0x9" - - - cxl_mem1_path = cxl_path + "/cxl-mem1.raw" - libvirt.qemuargs :value => "-object" - libvirt.qemuargs :value => "memory-backend-file,id=kdevops-cxl-mem1,share=on,mem-path=#{cxl_mem1_path},size=4G" - - # Label Storage Area, used to store CXL namespace labels and region labels - cxl_lsa1_path = cxl_path + "/cxl-lsa1.raw" - libvirt.qemuargs :value => "-object" - libvirt.qemuargs :value => "memory-backend-file,id=kdevops-cxl-lsa1,share=on,mem-path=#{cxl_lsa1_path},size=256M" - - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-rp,port=0,bus=cxl.0,id=kdevops_cxl_root_port0,chassis=0,slot=2" - -{% if libvirt_enable_cxl_demo_topo2 %} - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-rp,port=1,bus=cxl.0,id=kdevops_cxl_root_port1,chassis=0,slot=3" -{% endif %} # TOPO 2 - - -{% if libvirt_enable_cxl_switch_topo1 %} - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-upstream,bus=kdevops_cxl_root_port0,id=kdevops_cxl_us0,addr=0.0,multifunction=on" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-switch-mailbox-cci,bus=kdevops_cxl_root_port0,addr=0.1,target=kdevops_cxl_us0" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-downstream,port=0,bus=kdevops_cxl_us0,id=kdevops_cxl_swport0,chassis=0,slot=4" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-downstream,port=1,bus=kdevops_cxl_us0,id=kdevops_cxl_swport1,chassis=0,slot=5" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-type3,bus=kdevops_cxl_swport0,memdev=kdevops-cxl-mem1,lsa=kdevops-cxl-lsa1,id=kdevops-cxl-pmem0" -{% else %} # !switch topo1 - {% if not libvirt_enable_cxl_dcd_topo1 %} - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-type3,bus=kdevops_cxl_root_port0,memdev=kdevops-cxl-mem1,lsa=kdevops-cxl-lsa1,id=kdevops-cxl-pmem0" - {% else %} # dcd_topo1 - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "cxl-type3,bus=kdevops_cxl_root_port0,nonvolatile-dc-memdev=kdevops-cxl-mem1,lsa=kdevops-cxl-lsa1,id=kdevops-cxl-dcd0,num-dc-regions=2" - {% endif %} # dcd topo1 -{% endif %} # !switch topo1 - libvirt.qemuargs :value => "-M" - libvirt.qemuargs :value => "cxl-fmw.0.targets.0=cxl.0,cxl-fmw.0.size=8G" -{% if libvirt_enable_qmp %} - libvirt.qemuargs :value => "-qmp" -{% if libvirt_qemu_qmp_wait %} - libvirt.qemuargs :value => "{{ libvirt_qemu_qmp_string }},wait=on" -{% else %} # !qmp_wait - libvirt.qemuargs :value => "{{ libvirt_qemu_qmp_string }},wait=off" -{% endif %} # libvirt_qemu_qmp_wait -{% endif %} # libvirt_enable_qmp -{% endif %} # CXL -{% endif %} - - if server_data['pcipassthrough'] - server_data['pcipassthrough'].each do |key, value| - libvirt.pci :domain => value['domain'], :bus => value['bus'], :slot => value['slot'], :function => value['function'] - end - end - if global_data['extra_disks'] - port = 0 - port_count = global_data['extra_disks'].size() - global_data['extra_disks'].each do |key, value| - size = value['size'] - zoned = value['zoned'] - largio = value['largio'] - if zoned && !global_data['enable_zns'] - next - end - extra_drive_largio_args="" - if zoned - logical_block_size = value['logical_block_size'] - physical_block_size = value['physical_block_size'] - zone_size = value['zone_size'] - zone_capacity = value['zone_capacity'] - zone_max_open = value['zone_max_open'] - zone_max_active = value['zone_max_active'] - zone_zasl = value['zone_zasl'] - end - if largio - largeio_logical_block_size = value['logical_block_size'] - largeio_physical_block_size = value['physical_block_size'] - extra_drive_logical_block_size_args = "logical_block_size=#{largeio_logical_block_size}" - extra_drive_physical_block_size_args = "physical_block_size=#{largeio_physical_block_size}" - extra_drive_largio_args=",#{extra_drive_logical_block_size_args},#{extra_drive_physical_block_size_args}" - end - purpose = key - port_plus = port + 1 - key_id_prefix = "{{ libvirt_extra_drive_id_prefix }}" - disk_id = "#{key_id_prefix}#{port}" - serial_id = "kdevops#{port}" - extra_disk_name = "{{ extra_disk_driver }}#{port}n#{port_plus}.{{ libvirt_extra_drive_format }}" - extra_disk = extra_disk_path + "/" + "#{extra_disk_name}" - unless File.exist? (extra_disk) - if provider == "libvirt" - cmd = "qemu-img create -f {{ libvirt_extra_drive_format }} #{extra_disk} #{size}M" - ok = system(cmd) - if ! ok - puts "Command failed: #{cmd}" - exit - end - end - end -{% if not libvirt_override_machine_type %} - bus_for_extra_drives = "custom-pci-for-{{ extra_disk_driver }}" - pci_function = 0 + port -{% else %} - # A PCI-E root port must be added per extra drive. - # Chassis must be something unique for the entire topology it seems (?) - chassis = 50 + port - bus_for_extra_drives = "pcie-port-for-{{ extra_disk_driver }}-#{port}" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "pcie-root-port,id=#{bus_for_extra_drives},multifunction=on,bus=pcie.1,addr=0x#{port},chassis=#{chassis}" - pci_function = "0x0" -{% endif %} -{% if libvirt_extra_storage_drive_ide %} - libvirt.qemuargs :value => "-drive" - libvirt.qemuargs :value => "file=#{extra_disk},format={{ libvirt_extra_drive_format }},aio={{ libvirt_extra_storage_aio_mode }},cache={{ libvirt_extra_storage_aio_cache_mode }},if=ide,serial=#{serial_id}" -{% elif libvirt_extra_storage_drive_virtio %} - virtio_pbs = "{{ libvirt_extra_storage_virtio_physical_block_size }}" - virtio_lbs = "{{ libvirt_extra_storage_virtio_logical_block_size }}" - libvirt.qemuargs :value => "-object" - libvirt.qemuargs :value => "iothread,id=kdevops-virtio-iothread-#{port}" - libvirt.qemuargs :value => "-drive" - libvirt.qemuargs :value => "file=#{extra_disk},format={{ libvirt_extra_drive_format }},if=none,aio={{ libvirt_extra_storage_aio_mode }},cache={{ libvirt_extra_storage_aio_cache_mode }},id=#{disk_id}" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "virtio-blk-pci,drive=#{disk_id},id=virtio-#{disk_id},serial=#{serial_id},bus=#{bus_for_extra_drives},addr=#{pci_function},iothread=kdevops-virtio-iothread-#{port}#{extra_drive_largio_args},logical_block_size=#{virtio_lbs},physical_block_size=#{virtio_pbs}" -{% elif libvirt_extra_storage_drive_scsi %} - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "virtio-scsi-pci,id=scsi#{port},bus=#{bus_for_extra_drives},addr=#{pci_function}" - libvirt.qemuargs :value => "-drive" - libvirt.qemuargs :value => "file=#{extra_disk},format={{ libvirt_extra_drive_format }},if=none,aio={{ libvirt_extra_storage_aio_mode }},cache={{ libvirt_extra_storage_aio_cache_mode }},id=#{disk_id}" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "scsi-hd,drive=#{disk_id},bus=scsi#{port}.0" -{% elif libvirt_extra_storage_drive_nvme %} - if ! largio - nvme_lbs = "{{ libvirt_extra_storage_nvme_logical_block_size }}" - extra_drive_largio_args=",logical_block_size=#{nvme_lbs},physical_block_size=#{nvme_lbs}" - end - extra_drive_interface = "none" - if zoned - libvirt.qemuargs :value => "-drive" - libvirt.qemuargs :value => "file=#{extra_disk},format={{ libvirt_extra_drive_format }},aio={{ libvirt_extra_storage_aio_mode }},cache={{ libvirt_extra_storage_aio_cache_mode }},if=#{extra_drive_interface},id=#{disk_id}" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "nvme,id={{ extra_disk_driver }}#{port},serial=#{serial_id},bus=#{bus_for_extra_drives},addr=#{pci_function},zoned.zasl=#{zone_zasl}" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "nvme-ns,drive=#{disk_id},bus={{ extra_disk_driver }}#{port},nsid=1,logical_block_size=#{logical_block_size},physical_block_size=#{physical_block_size},zoned=true,zoned.zone_size=#{zone_size},zoned.zone_capacity=#{zone_capacity},zoned.max_open=#{zone_max_open},zoned.max_active=#{zone_max_active}" - else - libvirt.qemuargs :value => "-drive" - libvirt.qemuargs :value => "file=#{extra_disk},format={{ libvirt_extra_drive_format }},aio={{ libvirt_extra_storage_aio_mode }},cache={{ libvirt_extra_storage_aio_cache_mode }},if=#{extra_drive_interface},id=#{disk_id}" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "nvme,id={{ extra_disk_driver }}#{port},serial=#{serial_id},bus=#{bus_for_extra_drives},addr=#{pci_function}" - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "nvme-ns,drive=#{disk_id},bus={{ extra_disk_driver }}#{port},nsid=1#{extra_drive_largio_args}" - end -{% endif %} - port += 1 - end - if provider == "libvirt" - cmd = "sudo chgrp -R #{qemu_group} #{node_custom_data_path}" - ok = system("#{cmd}") - if ! ok - puts "Command failed: #{cmd}" - exit - end - cmd = "sudo chmod -R g+rw #{node_custom_data_path}" - ok = system("#{cmd}") - if ! ok - puts "Command failed: #{cmd}" - exit - end - end # end of provider check for libvirt - end # end of check for extra disks for libvirt -{% if bootlinux_9p %} - - libvirt.qemuargs :value => "-device" - libvirt.qemuargs :value => "{{ bootlinux_9p_driver }},fsdev={{ bootlinux_9p_fsdev }},mount_tag={{ bootlinux_9p_mount_tag }},bus=pcie.0,addr=0x10" - libvirt.qemuargs :value => "-fsdev" - libvirt.qemuargs :value => "local,id={{ bootlinux_9p_fsdev }},path={{ bootlinux_9p_host_path }},security_model={{ bootlinux_9p_security_model }}" - -{% endif %} - end # end of libvirt provider code -{% endif %} - end # end of srv defined loop - end # end of vagrant_boxes loop -end diff --git a/playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml b/playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml deleted file mode 100644 index 91e105cd3..000000000 --- a/playbooks/roles/gen_nodes/templates/kdevops_nodes_split_start.j2.yaml +++ /dev/null @@ -1,171 +0,0 @@ ---- -vagrant_global: - box: "{{ vagrant_box }}" - box_version: "{{ vagrant_box_version }}" - memory: {{ libvirt_mem_mb }} - cpus: {{ libvirt_vcpus_count }} -{% if nvme_zone_enable %} - enable_zns: True -{% endif %} - storage_pool_path: "{{ kdevops_storage_pool_path }}" -{% if virtualbox_provider %} - virtualbox_cfg: - auto_update: false - enabled: "true" - enable_sse4: "true" - # To stress test a virtual NVMe controller you could peg all disks onto - # one controller. We want to avoid this as our focus is testing filesystems - # and not storage controllers however VirtualBox currently only supports - # one NVMe storage controller. Set this to true only if you are adding - # support for this upstream to VirtualBox. - nvme_controller_per_disk: false -{% endif %} -{% if libvirt_provider %} - libvirt_cfg: -{% if libvirt_override_machine_type %} - machine_type: '{{ libvirt_machine_type }}' -{% endif %} - # This lets the Ansible role kdevops_vagrant try to infer your default - # distro group to use for QEMU. OpenSUSE and Fedora uses QEMU here by - # default, debian uses libvirt-qemu. You can always override with the - # environment variable KDEVOPS_VAGRANT_QEMU_GROUP. If not sure edit - # /etc/libvirt/qemu.conf user and group settings. If using AppArmor / - # SELinux you may run into snags, but that is out of scope of this project. - qemu_group_auto: true - qemu_group: 'libvirt-qemu' - emulator_path: '{{ qemu_bin_path }}' - uri: '{{ libvirt_uri }}' - system_uri: '{{ libvirt_system_uri }}' -{% if libvirt_session %} - session_socket: '{{ libvirt_session_socket }}' - session_management_network_device: '{{ libvirt_session_management_network_device }}' - session_public_network_dev: '{{ libvirt_session_public_network_dev }}' -{% endif %} -{% endif %} - # This ends up slightly different depending on the vagrant provider right now. - # For VirtualBox: /dev/nvme0n1, /dev/nvme0n2, etc. - # For libvirt: /dev/nvme0n1, /dev/nvme1n1, etc. - # This is due to how VirtualBox only supports one NVMe storage controller -{% if libvirt_extra_storage_drive_ide %} - extra_disks: - data: - size: 102400 - scratch: - size: 102400 - extra1: - size: 102400 - extra2: - size: 102400 -{% elif libvirt_extra_storage_drive_virtio %} - extra_disks: - data: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_virtio_physical_block_size }} - logical_block_size: {{ libvirt_extra_storage_virtio_logical_block_size }} - scratch: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_virtio_physical_block_size }} - logical_block_size: {{ libvirt_extra_storage_virtio_logical_block_size }} -{% if not libvirt_largeio_enable %} - extra1: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_virtio_physical_block_size }} - logical_block_size: {{ libvirt_extra_storage_virtio_logical_block_size }} - extra2: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_virtio_physical_block_size }} - logical_block_size: {{ libvirt_extra_storage_virtio_logical_block_size }} -{% endif %} -{% elif libvirt_extra_storage_drive_scsi %} - extra_disks: - data: - size: 102400 - scratch: - size: 102400 - extra1: - size: 102400 - extra2: - size: 102400 -{% elif libvirt_extra_storage_drive_nvme %} - extra_disks: - data: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} - logical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} - scratch: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} - logical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} -{% if not libvirt_largeio_enable %} - extra1: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} - logical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} - extra2: - size: 102400 - physical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} - logical_block_size: {{ libvirt_extra_storage_nvme_logical_block_size }} -{% endif %} -{% endif %} - -{% if nvme_zone_enable %} -{% for n in range(1,14) %} - zone{{ n }}: - size: {{ nvme_zone_drive_size }} - zoned: true - zone_zasl: {{ nvme_zone_zasl }} - zone_size: '{{ nvme_zone_size }}' - zone_capacity: {{ nvme_zone_capacity }} - zone_max_active: {{ nvme_zone_max_active }} - zone_max_open: {{ nvme_zone_max_open }} - physical_block_size: {{ nvme_zone_physical_block_size }} - logical_block_size: {{ nvme_zone_logical_block_size }} -{% endfor %} -{% for n in range(1,2) %} - zonenptwo{{ n }}: - size: 98304 - zoned: true - zone_zasl: 0 - zone_size: 96M - zone_capacity: 0 - zone_max_active: 0 - zone_max_open: 0 - physical_block_size: 4096 - logical_block_size: 4096 -{% endfor %} -{% endif %} -{% if libvirt_largeio_enable %} -{% set ns = namespace(lbs_idx=1) %} -{% set max_pbs = libvirt_largeio_logical_compat_size * (2 ** libvirt_largeio_pow_limit) %} -{% for n in range(0,libvirt_largeio_pow_limit+1) %} -{% for x in range(0,libvirt_largeio_drives_per_space) %} -{% set ns2 = namespace(pbs=libvirt_largeio_logical_compat_size * (2 ** n)) %} -{% set ns3 = namespace(pbs_next_two=ns2.pbs * (2*(x-1))) %} -{% if (ns2.pbs == 512 or ns2.pbs == 4096 or ns2.pbs >= 16384) and (ns3.pbs_next_two <= max_pbs) %} - largio{{ ns.lbs_idx }}: - largio: true - size: {{ libvirt_largeio_base_size }} - physical_block_size: {{ ns2.pbs }} -{% if libvirt_largeio_logical_compat %} - logical_block_size: {{ libvirt_largeio_logical_compat_size }} -{% else %} - logical_block_size: {{ ns2.pbs }} -{% endif %} -{% set ns.lbs_idx = ns.lbs_idx + 1 %} -{% endif %} -{% endfor %} -{% endfor %} -{% endif %} - -# Note: vagrant is not a fan of hosts with underscores. -# -# Modify the hostname to include a purpose, and then extract it later with -# ansible, for instance with: -# -# section: "{{ ansible_hostname | regex_replace('kdevops-') | regex_replace('-dev') | regex_replace('-', '_') }}" -# -# So if you say embraced kdevops-pokeyman and kdevops-pokeyman-dev you'd end up -# getting in the section always as pokeyman. As is below, with the above -# ansible regex you'd get the digits. -vagrant_boxes: -{% include './templates/hosts.j2' %} diff --git a/playbooks/roles/gen_pci_kconfig/tasks/main.yml b/playbooks/roles/gen_pci_kconfig/tasks/main.yml index fefd3b8be..b491426ff 100644 --- a/playbooks/roles/gen_pci_kconfig/tasks/main.yml +++ b/playbooks/roles/gen_pci_kconfig/tasks/main.yml @@ -5,6 +5,6 @@ - kdevops_pcie_dynamic_kconfig - name: Generate libvirt PCI-E kcofig files - shell: "./python/workflows/dynamic-kconfig/gen-dynamic-pci.py {{ topdir_path }}/.dynamic-kconfig.pci.txt > {{ topdir_path }}/vagrant/Kconfig.passthrough_libvirt.generated" + shell: "./python/workflows/dynamic-kconfig/gen-dynamic-pci.py {{ topdir_path }}/.dynamic-kconfig.pci.txt > {{ topdir_path }}/kconfigs/Kconfig.passthrough_libvirt.generated" when: - kdevops_pcie_dynamic_kconfig diff --git a/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml b/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml index 0b24a06ae..39cebe6f6 100644 --- a/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml +++ b/playbooks/roles/install_terraform/tasks/install-deps/suse/main.yml @@ -30,7 +30,7 @@ - force_install_zip|bool - force_install_if_present|bool or (is_sle or is_leap and terraform_present.rc != 0) -- name: Install vagrant and vagrant-libvirt from your tumbleweed repository +- name: Install terraform from your tumbleweed repository become: yes become_method: sudo ansible.builtin.package: diff --git a/playbooks/roles/install_vagrant_boxes/README.md b/playbooks/roles/install_vagrant_boxes/README.md deleted file mode 100644 index b755febc2..000000000 --- a/playbooks/roles/install_vagrant_boxes/README.md +++ /dev/null @@ -1,46 +0,0 @@ -install-vagrant-boxes -===================== - -The ansible install-vagrant-boxes role lets you get install additional vagrant -boxes which may be outside of the public catalog. - -Requirements ------------- - -Run system using vagrant. - -Role Variables --------------- - - * kdevops_install_vagrant_boxes: set to True to enable installing boxes - * vagrant_boxes: this role is designed so that you override this varaible - your own list of boxes. - -Dependencies ------------- - -None. - -Example Playbook ----------------- - -Below is an example playbook, say a install-vagrant-boxes-sle.yml file which -would try to install the aarch64 vagrant boxes for SLE using some URLs you -have access to: - -``` ---- -- hosts: localhost - tasks: - - include_role: - name: install-vagrant-boxes - vars: - vagrant_boxes: - - { name: 'suse/sle12sp5.aarch64', box_url: 'http://some.com/SLES12-SP5-Vagrant.aarch64-12.5-libvirt_aarch64-GM.vagrant.libvirt.box' } - - { name: 'suse/sle15sp2.aarch64', box_url: 'http://some.com/SLES15-SP2-Vagrant.aarch64-15.2-libvirt_aarch64-Snapshot2.vagrant.libvirt.box' } -``` - -License -------- - -copyleft-next-0.3.1 diff --git a/playbooks/roles/install_vagrant_boxes/defaults/main.yml b/playbooks/roles/install_vagrant_boxes/defaults/main.yml deleted file mode 100644 index 13165a7ce..000000000 --- a/playbooks/roles/install_vagrant_boxes/defaults/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Example boxes with URLs. You would override this. -kdevops_install_vagrant_boxes: False -vagrant_boxes: - - { name: 'suse/sle12sp5.x86_64', box_url: 'http://example.com/SLE-12-SP5-Vagrant-GM/SLES12-SP5-Vagrant.x86_64-12.5-libvirt-GM.vagrant.libvirt.box' } - - { name: 'suse/sle15sp2.x86_64', box_url: 'http://example.com/SLES15-SP2-Vagrant.x86_64-15.2-libvirt-Snapshot2.vagrant.libvirt.box' } diff --git a/playbooks/roles/install_vagrant_boxes/scripts/add-box-if-missing.sh b/playbooks/roles/install_vagrant_boxes/scripts/add-box-if-missing.sh deleted file mode 100755 index b14a52f3e..000000000 --- a/playbooks/roles/install_vagrant_boxes/scripts/add-box-if-missing.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# Looks to see if a vagrant box is present -# Vagrant lacks the ability to tell you if a box is present in one -# single command line so we have to wrap this up for it. - -TMP_FILE="" - -box_search_finish() -{ - if [[ ! -z $TMP_FILE ]]; then - rm -f $TMP_FILE - fi -} - -trap "box_search_finish" EXIT - -if [[ $# -ne 2 ]]; then - echo "Usage: $0 " - exit 1 -fi - -BOX=$1 -BOX_URL=$2 - -BOX_SEARCH="$1\s\+" -TMP_FILE=$(mktemp) - -vagrant box list > $TMP_FILE -grep -q "$BOX_SEARCH" $TMP_FILE -if [ $? -eq 0 ] ; then - exit 0 -else - NAME_ARGS="" - echo $BOX_URL | grep -q json$ - # Sadly we cannot rename boxes in json format, so we must stick to - # what is given. - if [[ $? -ne 0 ]]; then - NAME_ARGS="--name $BOX" - fi - vagrant box add --provider=libvirt --insecure $NAME_ARGS $BOX_URL - RET=$? - # We use a special return value to indicate change to the - # ansible script, so that it can tell a change has occurred. - if [ $RET -eq 0 ]; then - exit 314 - fi - exit $RET -fi diff --git a/playbooks/roles/install_vagrant_boxes/tasks/main.yml b/playbooks/roles/install_vagrant_boxes/tasks/main.yml deleted file mode 100644 index 430050f5c..000000000 --- a/playbooks/roles/install_vagrant_boxes/tasks/main.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- name: Import optional extra_args file - include_vars: "{{ item }}" - ignore_errors: yes - with_first_found: - - files: - - "../extra_vars.yml" - - "../extra_vars.yaml" - - "../extra_vars.json" - skip: true - tags: vars - -- name: Import optional distribution specific variables - include_vars: "{{ item }}" - ignore_errors: yes - with_first_found: - - files: - - "{{ ansible_facts['os_family']|lower }}.yml" - skip: true - tags: vars - -- name: Verify vagrant installation - command: "which vagrant" - register: vagrant_present - changed_when: vagrant_present.rc == 0 - failed_when: vagrant_present.rc != 0 - tags: [ 'vagrant', 'verify' ] - when: - - kdevops_install_vagrant_boxes|bool - -# vagrant has no single command line to check for this so we have to -# wrap it up ourselves, and we only add a box if not present -- name: Add vagrant box if not present - shell: | - set -o pipefail - {{ role_path }}/scripts/add-box-if-missing.sh {{ item.name }} {{ item.box_url }} - args: - executable: /bin/bash - chdir: "{{ role_path }}" - register: box_check - changed_when: box_check.rc == 314 - failed_when: ( box_check.rc not in [ 0, 314, 58 ] ) - with_items: - - "{{ vagrant_boxes }}" - loop_control: - label: "Adding vagrant box {{ item.name }} if not present" - tags: [ 'vagrant', 'box', 'install' ] - when: - - kdevops_install_vagrant_boxes|bool diff --git a/playbooks/roles/libvirt_storage_pool_create/README.md b/playbooks/roles/libvirt_storage_pool_create/README.md index 91b2456e0..5ece8a84d 100644 --- a/playbooks/roles/libvirt_storage_pool_create/README.md +++ b/playbooks/roles/libvirt_storage_pool_create/README.md @@ -1,8 +1,8 @@ libvirt_storage_pool_create ============================ -vagrant uses a the expected "default" storage pool name to create guests. -If you want to use a custom path you need to use a custom pool name but +libvirt defaults to using a "default" storage pool when guests are first +created. If you want to use a custom path you need to use a custom pool name but we need to create this pool for you based on your configuration. This ansible role takes care of that for you. diff --git a/playbooks/roles/libvirt_user/README.md b/playbooks/roles/libvirt_user/README.md index 2120e8417..0aa3c9f2b 100644 --- a/playbooks/roles/libvirt_user/README.md +++ b/playbooks/roles/libvirt_user/README.md @@ -77,8 +77,8 @@ ansible-playbook -i hosts playbooks/libvirt_user.yml -e "only_verify_user=True" This documents the logic used by this Ansible role to let a regular user run libvirt. -Vagrant can be used to call libvirt without requiring root privileges. To do -this this Ansible role ensures the user which runs vagrant is part of the +Guests created with libguestfs can be managed without root privileges. To do +this this Ansible role ensures the user running the build is part of the following groups: * kvm diff --git a/playbooks/roles/update_ssh_config_vagrant/README.md b/playbooks/roles/update_ssh_config_vagrant/README.md deleted file mode 100644 index ddd6989d7..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/README.md +++ /dev/null @@ -1,66 +0,0 @@ -update_ssh_config_vagrant -========================= - -Update your `~/.ssh/config` with the same information vagrant has. -If you `vagrant destroy -f` and then `vagrant up` and information -has changed, this role will delete old stale entries and replace -them with the new ones. - -Care must be taken as this *does* update your local user's ~/.ssh/config by -default. That is, this role is intended to be run locally, never on virtual -host, unless of course you are doing nested virtualization. - -Development notes ------------------ -The code for updating your ssh configuration is shared with terraform. -We do this by having the code for this ansible role effectively -present on this ansible role through a git subtree within kdevops. -The code upstream on that tree is used to publish a terraform module: - - * https://registry.terraform.io/modules/mcgrof/add-host-ssh-config - -To learn how to make changes to the shared code read: - - * [update_ssh_config documentation](playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md) - -Requirements ------------- - -You can use this if you are using vagrant to deploy guests. - -Role Variables --------------- - - * sshconfig: your ssh configuration file - * sshconfig_backup: where to dump the backup file - * vagrant_dir: the location of your vagrant deployment - * kexalgorithms: if set, this sets a custom ssh KexAlgorithms, useful - on older hosts - -Dependencies ------------- - -You should be using vagrant if you are using this role. Your system -isa lso expected to have some sort of .ssh/config file. This runs -*locally* on your system. - -Example Playbook ----------------- - -Below is an example playbook, say a update_ssh_config_vagrant.yml file, this -would be fine if your vagrant deployment is located on ../vagrant/ directory: - -``` ---- -- hosts: localhost - roles: - - role: update_ssh_config_vagrant -``` - -For further examples refer to one of this role's users, the -[https://github.com/mcgrof/kdevops](kdevops) project. - -License -------- - -copyleft-next-0.3.1 diff --git a/playbooks/roles/update_ssh_config_vagrant/defaults/main.yml b/playbooks/roles/update_ssh_config_vagrant/defaults/main.yml deleted file mode 100644 index 5b488e7a5..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/defaults/main.yml +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier copyleft-next-0.3.1 ---- -# Our sensible defaults for dev_config. You can override them by putting -# your variables in these files, the later has major precedence: -# -# ansible/extra_vars.yml - -# On your own system -sshconfig: "~/.ssh/config" -sshconfig_backup: "{{sshconfig}}.backup.kdevops.vagrant" -vagrant_dir: "../vagrant" -use_kexalgorithms: False -kexalgorithms: "" diff --git a/playbooks/roles/update_ssh_config_vagrant/python/update_ssh_config.py b/playbooks/roles/update_ssh_config_vagrant/python/update_ssh_config.py deleted file mode 120000 index c3c2d5f7e..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/python/update_ssh_config.py +++ /dev/null @@ -1 +0,0 @@ -../update_ssh_config/update_ssh_config.py \ No newline at end of file diff --git a/playbooks/roles/update_ssh_config_vagrant/tasks/main.yml b/playbooks/roles/update_ssh_config_vagrant/tasks/main.yml deleted file mode 100644 index c11dfe7ed..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/tasks/main.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -- name: Import optional extra_args file - include_vars: "{{ item }}" - ignore_errors: yes - with_first_found: - - files: - - "../extra_vars.yml" - - "../extra_vars.yaml" - - "../extra_vars.json" - skip: true - tags: vars - -- name: Set kexalgorithms preference - set_fact: - custom_ssh_kexalgorithms: '--kexalgorithms {{ kexalgorithms }}' - when: - - use_kexalgorithms|bool - -- name: Ignoring kexalgorithms - set_fact: - custom_ssh_kexalgorithms: '' - when: - - not use_kexalgorithms|bool - -- name: Get target hosts - shell: | - set -o pipefail - if [ -d .vagrant ]; then - if uname | grep Darwin >/dev/null; then - SED='gsed' - else - SED='sed' - fi - vagrant ssh-config | $SED '/^[[:space:]]*$/d' | grep ^Host | awk '{print $2}' | $SED ':a;N;$!ba;s/\n/,/g' - else - echo You are not in a directory with a .vagrant directory - exit 1 - fi - args: - executable: /bin/bash - chdir: "{{ vagrant_dir }}" - register: target_hosts_comma - changed_when: "target_hosts_comma.rc == 0" - -- name: Verify sshconfig directory exists - delegate_to: localhost - local_action: file path="{{ sshconfig | dirname }}" state=directory - run_once: true - -- name: Verify sshconfig file exists - delegate_to: localhost - local_action: file path="{{ sshconfig }}" state=touch - run_once: true - -- name: Set vagrant python extra args - set_fact: - update_extra_args: '--remove {{ target_hosts_comma.stdout }} --addvagranthosts {{ custom_ssh_kexalgorithms }}' - -- name: Update {{ sshconfig }} with hosts entries for vagrant - delegate_to: localhost - shell: | - set -o pipefail - {{ role_path }}/python/update_ssh_config.py {{ sshconfig }} --backup_file {{ sshconfig_backup }} {{ update_extra_args }} - args: - executable: /bin/bash - chdir: "{{ vagrant_dir }}" - register: add_entry - changed_when: "add_entry.rc == 0" - run_once: true diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.gitignore b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.gitignore deleted file mode 100644 index e02dcd09f..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -tests/*.copy -tests/*.bk - -*.swp -__pycache__/ - diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.travis.yml b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.travis.yml deleted file mode 100644 index 1d14a66be..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: python -python: - - "3.6" -script: - - make test - - make flake8 -notifications: - email: - recipients: - - mcgrof@kernel.org - on_success: never - on_failure: always diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/CONTRIBUTING b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/CONTRIBUTING deleted file mode 100644 index f2889597b..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/CONTRIBUTING +++ /dev/null @@ -1,49 +0,0 @@ - -This project embraces the Developer Certificate of Origin (DCO) for -contributions. This means you must agree to the following prior to submitting -patches, if you agree with this developer certificate you acknowledge this by -adding a Signed-off-by tag to your patch commit log. Every submitted patch -must have this. - -The source for the DCO: - -http://developercertificate.org/ - ------------------------------------------------------------------------ - -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -660 York Street, Suite 102, -San Francisco, CA 94110 USA - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/LICENSE b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/LICENSE deleted file mode 100644 index 431ea9e9e..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/LICENSE +++ /dev/null @@ -1,239 +0,0 @@ -Valid-License-Identifier: copyleft-next-0.3.1 -SPDX-URL: https://spdx.org/licenses/copyleft-next-0.3.1 -Usage-Guide: - This license can be used in code, it has been found to be GPLv2 compatible - by attorneys at Redhat and SUSE, however to err on the side of caution, - if used on Linux it's best to only use it together with a GPL2 compatible - license using "OR". You do not have to do this for this project, kdevops, - as this project is licensed under the copyleft-next-0.3.1 license. - To use the copyleft-next-0.3.1 license on Linux put the following SPDX - tag/value pair into a comment according to the placement guidelines in the - licensing rules documentation: - SPDX-License-Identifier: GPL-2.0 OR copyleft-next-0.3.1 - SPDX-License-Identifier: GPL-2.0-only OR copyleft-next 0.3.1 - SPDX-License-Identifier: GPL-2.0+ OR copyleft-next-0.3.1 - SPDX-License-Identifier: GPL-2.0-or-later OR copyleft-next-0.3.1 -License-Text: - -======================================================================= - - copyleft-next 0.3.1 ("this License") - Release date: 2016-04-29 - -1. License Grants; No Trademark License - - Subject to the terms of this License, I grant You: - - a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable - copyright license, to reproduce, Distribute, prepare derivative works - of, publicly perform and publicly display My Work. - - b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable - patent license under Licensed Patents to make, have made, use, sell, - offer for sale, and import Covered Works. - - This License does not grant any rights in My name, trademarks, service - marks, or logos. - -2. Distribution: General Conditions - - You may Distribute Covered Works, provided that You (i) inform - recipients how they can obtain a copy of this License; (ii) satisfy the - applicable conditions of sections 3 through 6; and (iii) preserve all - Legal Notices contained in My Work (to the extent they remain - pertinent). "Legal Notices" means copyright notices, license notices, - license texts, and author attributions, but does not include logos, - other graphical images, trademarks or trademark legends. - -3. Conditions for Distributing Derived Works; Outbound GPL Compatibility - - If You Distribute a Derived Work, You must license the entire Derived - Work as a whole under this License, with prominent notice of such - licensing. This condition may not be avoided through such means as - separate Distribution of portions of the Derived Work. - - If the Derived Work includes material licensed under the GPL, You may - instead license the Derived Work under the GPL. - -4. Condition Against Further Restrictions; Inbound License Compatibility - - When Distributing a Covered Work, You may not impose further - restrictions on the exercise of rights in the Covered Work granted under - this License. This condition is not excused merely because such - restrictions result from Your compliance with conditions or obligations - extrinsic to this License (such as a court order or an agreement with a - third party). - - However, You may Distribute a Covered Work incorporating material - governed by a license that is both OSI-Approved and FSF-Free as of the - release date of this License, provided that compliance with such - other license would not conflict with any conditions stated in other - sections of this License. - -5. Conditions for Distributing Object Code - - You may Distribute an Object Code form of a Covered Work, provided that - you accompany the Object Code with a URL through which the Corresponding - Source is made available, at no charge, by some standard or customary - means of providing network access to source code. - - If you Distribute the Object Code in a physical product or tangible - storage medium ("Product"), the Corresponding Source must be available - through such URL for two years from the date of Your most recent - Distribution of the Object Code in the Product. However, if the Product - itself contains or is accompanied by the Corresponding Source (made - available in a customarily accessible manner), You need not also comply - with the first paragraph of this section. - - Each direct and indirect recipient of the Covered Work from You is an - intended third-party beneficiary of this License solely as to this - section 5, with the right to enforce its terms. - -6. Symmetrical Licensing Condition for Upstream Contributions - - If You Distribute a work to Me specifically for inclusion in or - modification of a Covered Work (a "Patch"), and no explicit licensing - terms apply to the Patch, You license the Patch under this License, to - the extent of Your copyright in the Patch. This condition does not - negate the other conditions of this License, if applicable to the Patch. - -7. Nullification of Copyleft/Proprietary Dual Licensing - - If I offer to license, for a fee, a Covered Work under terms other than - a license that is OSI-Approved or FSF-Free as of the release date of this - License or a numbered version of copyleft-next released by the - Copyleft-Next Project, then the license I grant You under section 1 is no - longer subject to the conditions in sections 3 through 5. - -8. Copyleft Sunset - - The conditions in sections 3 through 5 no longer apply once fifteen - years have elapsed from the date of My first Distribution of My Work - under this License. - -9. Pass-Through - - When You Distribute a Covered Work, the recipient automatically receives - a license to My Work from Me, subject to the terms of this License. - -10. Termination - - Your license grants under section 1 are automatically terminated if You - - a) fail to comply with the conditions of this License, unless You cure - such noncompliance within thirty days after becoming aware of it, or - - b) initiate a patent infringement litigation claim (excluding - declaratory judgment actions, counterclaims, and cross-claims) - alleging that any part of My Work directly or indirectly infringes - any patent. - - Termination of Your license grants extends to all copies of Covered - Works You subsequently obtain. Termination does not terminate the - rights of those who have received copies or rights from You subject to - this License. - - To the extent permission to make copies of a Covered Work is necessary - merely for running it, such permission is not terminable. - -11. Later License Versions - - The Copyleft-Next Project may release new versions of copyleft-next, - designated by a distinguishing version number ("Later Versions"). - Unless I explicitly remove the option of Distributing Covered Works - under Later Versions, You may Distribute Covered Works under any Later - Version. - -** 12. No Warranty ** -** ** -** My Work is provided "as-is", without warranty. You bear the risk ** -** of using it. To the extent permitted by applicable law, each ** -** Distributor of My Work excludes the implied warranties of title, ** -** merchantability, fitness for a particular purpose and ** -** non-infringement. ** - -** 13. Limitation of Liability ** -** ** -** To the extent permitted by applicable law, in no event will any ** -** Distributor of My Work be liable to You for any damages ** -** whatsoever, whether direct, indirect, special, incidental, or ** -** consequential damages, whether arising under contract, tort ** -** (including negligence), or otherwise, even where the Distributor ** -** knew or should have known about the possibility of such damages. ** - -14. Severability - - The invalidity or unenforceability of any provision of this License - does not affect the validity or enforceability of the remainder of - this License. Such provision is to be reformed to the minimum extent - necessary to make it valid and enforceable. - -15. Definitions - - "Copyleft-Next Project" means the project that maintains the source - code repository at - as of the release date of this License. - - "Corresponding Source" of a Covered Work in Object Code form means (i) - the Source Code form of the Covered Work; (ii) all scripts, - instructions and similar information that are reasonably necessary for - a skilled developer to generate such Object Code from the Source Code - provided under (i); and (iii) a list clearly identifying all Separate - Works (other than those provided in compliance with (ii)) that were - specifically used in building and (if applicable) installing the - Covered Work (for example, a specified proprietary compiler including - its version number). Corresponding Source must be machine-readable. - - "Covered Work" means My Work or a Derived Work. - - "Derived Work" means a work of authorship that copies from, modifies, - adapts, is based on, is a derivative work of, transforms, translates or - contains all or part of My Work, such that copyright permission is - required. The following are not Derived Works: (i) Mere Aggregation; - (ii) a mere reproduction of My Work; and (iii) if My Work fails to - explicitly state an expectation otherwise, a work that merely makes - reference to My Work. - - "Distribute" means to distribute, transfer or make a copy available to - someone else, such that copyright permission is required. - - "Distributor" means Me and anyone else who Distributes a Covered Work. - - "FSF-Free" means classified as 'free' by the Free Software Foundation. - - "GPL" means a version of the GNU General Public License or the GNU - Affero General Public License. - - "I"/"Me"/"My" refers to the individual or legal entity that places My - Work under this License. "You"/"Your" refers to the individual or legal - entity exercising rights in My Work under this License. A legal entity - includes each entity that controls, is controlled by, or is under - common control with such legal entity. "Control" means (a) the power to - direct the actions of such legal entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent of the - outstanding shares or beneficial ownership of such legal entity. - - "Licensed Patents" means all patent claims licensable royalty-free by - Me, now or in the future, that are necessarily infringed by making, - using, or selling My Work, and excludes claims that would be infringed - only as a consequence of further modification of My Work. - - "Mere Aggregation" means an aggregation of a Covered Work with a - Separate Work. - - "My Work" means the particular work of authorship I license to You - under this License. - - "Object Code" means any form of a work that is not Source Code. - - "OSI-Approved" means approved as 'Open Source' by the Open Source - Initiative. - - "Separate Work" means a work that is separate from and independent of a - particular Covered Work and is not by its nature an extension or - enhancement of the Covered Work, and/or a runtime library, standard - library or similar component that is used to generate an Object Code - form of a Covered Work. - - "Source Code" means the preferred form of a work for making - modifications to it. diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/Makefile b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/Makefile deleted file mode 100644 index 5dbca28d7..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -all: python-tests -PHONY += all - -python-tests: test flake8 -PHONY += python-tests - -test: - python3 -m unittest discover -v -PHONY += test - -flake8: - flake8 --statistics -PHONY += flake8 - -.PHONY: $(PHONY) diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md deleted file mode 100644 index 6b540c8a6..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# Project home - -This project's home page is: - - * https://github.com/linux-kdevops/update_ssh_config/ - -This code lives under the linux-kdevops organization as code changes -can be made to it there by any member of the linux-kdevops organization. - -# Sharing this code between vagrant and terraform - -The main user of this project is [kdevops](https://github.com/linux-kdevops/kdevops) -and it uses this code today for vagranta nd terraform bringup methods. When -using terraform, as part of the last part of bring up it calls ansible -against the localhost with an ansible role [update_ssh_config_vagrant](https://github.com/linux-kdevops/kdevops/tree/master/playbooks/roles/update_ssh_config_vagrant). - -Kdevop's terraform provisioning uses this code by publishing an terraform -module and referring to it on each cloud specific provider: - - * https://registry.terraform.io/modules/linux-kdevops/add-host-ssh-config/kdevops/latest - -kdevops uses the code in this tree as a git subtree. Delta for the code -in this directory can be queued up in kdevops, but a developer should at some -point in time push the code also back up to the master tree. This can be done -with something like this: - -```bash -git subtree push --prefix=playbooks/roles/update_ssh_config_vagrant/update_ssh_config update_ssh_config master -``` - -This will only push the code changes under the directory `playbooks/roles/update_ssh_config_vagrant/update_ssh_config` -back to the update_ssh_config repository. In order for a new terraform -module to be published a git tag is required to be tagged on the -`update_ssh_config` git tree. Terraform will do sanity checks and publish -a new module once that is available. Then each terraform provider file -must be updated to ensure they use the latest avilable version of the module. - -# update_ssh_config - -This Python script you update your ssh configuration file, typically -` ~/.ssh/config` programatically. It was originally designed to extend -vagrant so that it would update your user's ssh configuration, and later -terraform support was added. The same python script however is shared -between both projects: - - * [update_ssh_config_vagrant](https://github.com/linux-kdevops/update_ssh_config_vagrant) - ansible role for vagrant to update your ssh configuration - * [terraform-kdevops-add-host-ssh-config](https://github.com/linux-kdevops/terraform-kdevops-add-host-ssh-config) - terraform module to update you ssh configuration - -This git tree aims at providing a mechanism to allow both projects to share -the same python script. They bring in this code using a git subtree. - -## Usage - -Below are example command line uses: - -## Adding hosts to the top - -Note that as noted on the reported [issue#3](https://github.com/mcgrof/kdevops/issues/3) -[ssh_config(5)](https://man7.org/linux/man-pages/man5/ssh_config.5.html) -man page states that we should add entries at the top: - -``` -Since the first obtained value for each parameter is used, more host-specific -declarations should be given near the beginning of the file, and general -defaults at the end. -``` - -This project adheres to this best practice. - -## Tests - -To run tests: - -```bash -make test -make flake8 -``` - -### The vagrant use case - -This will remove the hosts entries for two hosts, kdevops and kdevops-dev, -and then it adds the hosts using the output from `vagrant ssh-config`. The -output from the command `vagrant ssh-config` is processed by the script, -to allow further extensions. - -A backup file is used, just for safe measures. - -``` -update_ssh_config.py \ - ~/.ssh/config \ - --backup_file ~/.ssh/config.backup.kdevops.vagrant \ - --remove kdevops,kdevops-dev \ - --addvagranthosts -``` - -Contrary to the terraform use case we don't perform two operations, and so -we only use one backup file. This is tested under the test case: - - * `test_0009_add_hosts_vagrant_emulate_top()` - -## The terraform use case - -Terraform does the same, both removal and addition in one shot, but it passes -the parameters on the command line: - -``` -update_ssh_config.py \ - --addhost kdevops,kdevops-dev \ - --hostname 51.179.84.243,52.195.142.18 \ - --username mcgrof \ - --port 22 \ - --identity \ - ~/.ssh/kdevops_terraform \ - --addstrict \ - --backup_file ~/.ssh/config.backup.kdevops.terraform \ - ~/.ssh/config -``` - -This is tested under test case: - - * `test_0008_add_remove_hosts_one_shot_top()` - -## Custom KexAlgorithms - -Certain old hosts require a custom KexAlgorithms entry to be added. -To add that use the `--kexalgorithms` parameter. This is tested -with the following test test cases: - - * `0010_add_hosts_kexalgorithms_vagrant_emulate_top()`: to mimic the use - case if used by vagrant - * `0011_add_remove_hosts_two_separate_ops_kexalgorithms_top()`: to mimic the - use case if used by terraform - -## Rationale for using Python3 - -We explicitly rely on python3 because our current use case is vagrant and -terraform users, and that software should be used on recent distributions, -hopefully rolling distrubutions which get updated more often than not. Because -modern distributions are expected to be used as your command and control, it -is a safe assumption you must have python3 available. - -Also, some distributions, such as Debian testing as of September 2020, no longer -have a `/usr/bin/python` symlink, and the -[Debian Python Policy](https://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html#s-interpreter) -specifically requests that scripts do not use `/usr/bin/env`, do not use -`/usr/bin/python` and instead use the exact version desired. - -If you'd like to add Python2 support feel free to add a python2 version file, -maybe `update_ssh_config2.py` and just have your project symlink to it. The -way vagrant and terraform will use this script is to symlink to the Python3 -version. - -### Author - -[Luis Chamberlain](https://www.do-not-panic.com) - -### License - -copyleft-next-0.3.1 diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/test_update_ssh_config.py b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/test_update_ssh_config.py deleted file mode 100755 index f28d9cba5..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/test_update_ssh_config.py +++ /dev/null @@ -1,417 +0,0 @@ -#!/usr/bin/python3 -# SPDX-License-Identifier: copyleft-next-0.3.1 - -import unittest -import re -from filecmp import cmp -import inspect -from os import listdir, remove, path -from shutil import copyfile -from update_ssh_config import parse_args, run_args - -""" -Unit tests for update_ssh_config.py -""" - - -def get_test_files(function_name): - test_names = [] - target_sshconfig = 'tests/' + re.sub('^test_', '', function_name) - test_names.append(target_sshconfig) - target_sshconfig_orig = target_sshconfig + '.orig' - test_names.append(target_sshconfig_orig) - target_sshconfig_copy = target_sshconfig + '.copy' - test_names.append(target_sshconfig_copy) - target_sshconfig_res = target_sshconfig + '.res' - test_names.append(target_sshconfig_res) - target_sshconfig_bk = target_sshconfig + '.bk' - test_names.append(target_sshconfig_bk) - return test_names - - -class TestUpdateSshConfig(unittest.TestCase): - def test_0001_remove_hosts_top(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args([target_sshconfig_copy, - '--backup_file', - target_sshconfig_bk, - '--remove', - 'kdevops,kdevops-dev']) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0002_remove_hosts_middle(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args([target_sshconfig_copy, - '--backup_file', - target_sshconfig_bk, - '--remove', - 'kdevops,kdevops-dev']) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0003_remove_hosts_bottom(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args([target_sshconfig_copy, - '--backup_file', - target_sshconfig_bk, - '--remove', - 'kdevops,kdevops-dev']) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0004_remove_hosts_missing(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args([target_sshconfig_copy, - '--backup_file', - target_sshconfig_bk, - '--remove', - 'kdevops,kdevops-dev']) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0005_remove_hosts_similar(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args([target_sshconfig_copy, - '--backup_file', - target_sshconfig_bk, - '--remove', - 'kdevops,kdevops-dev']) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0006_add_hosts_manual(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args(['--addhost', - 'kdevops,kdevops-dev', - '--backup_file', - target_sshconfig_bk, - '--username', - 'alpha', - '--hostname', - '51.179.89.243,52.195.142.19', - '--port', - '25', - '--identity', - '~alpha/.ssh/go', - '--addstrict', - target_sshconfig_copy]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0007_add_remove_hosts_two_separate_ops_top(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig = tests_names[0] - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - - target_sshconfig_res_remove = target_sshconfig + '.remove.res' - target_sshconfig_res_add = target_sshconfig + '.add.res' - - target_sshconfig_bk_remove = target_sshconfig + '.remove.bk' - target_sshconfig_bk_add = target_sshconfig + '.add.bk' - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args(['--remove', - 'kdevops,kdevops-dev', - '--backup_file', - target_sshconfig_bk_remove, - '--username', - 'alpha', - '--hostname', - '51.179.89.243,52.195.142.19', - '--port', - '25', - '--identity', - '~alpha/.ssh/go', - '--addstrict', - target_sshconfig_copy]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk_remove, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res_remove, shallow=False)) - - args = parse_args(['--addhost', - 'kdevops,kdevops-dev', - '--backup_file', - target_sshconfig_bk_add, - '--username', - 'alpha', - '--hostname', - '51.179.89.243,52.195.142.19', - '--port', - '25', - '--identity', - '~alpha/.ssh/go', - '--addstrict', - target_sshconfig_copy]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk_add, - target_sshconfig_res_remove, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res_add, shallow=False)) - - def test_0008_add_remove_hosts_one_shot_top(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args(['--remove', - 'kdevops,kdevops-dev', - '--addhost', - 'kdevops,kdevops-dev', - '--backup_file', - target_sshconfig_bk, - '--username', - 'alpha', - '--hostname', - '51.179.89.243,52.195.142.19', - '--port', - '25', - '--identity', - '~alpha/.ssh/go', - '--addstrict', - target_sshconfig_copy]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0009_add_hosts_vagrant_emulate_top(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig = tests_names[0] - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - target_sshconfig_vagrant_input = target_sshconfig + '.emulate_vagrant' - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args([target_sshconfig_copy, - '--backup_file', - target_sshconfig_bk, - '--remove', - 'kdevops,kdevops-dev', - '--addvagranthosts', - '--emulatevagrantinput', - target_sshconfig_vagrant_input]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0010_add_hosts_kexalgorithms_vagrant_emulate_top(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig = tests_names[0] - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - target_sshconfig_vagrant_input = target_sshconfig + '.emulate_vagrant' - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args([target_sshconfig_copy, - '--backup_file', - target_sshconfig_bk, - '--remove', - 'kdevops,kdevops-dev', - '--addvagranthosts', - '--kexalgorithms', - 'diffie-hellman-group-exchange-sha1,' + - 'diffie-hellman-group14-sha1,' + - 'diffie-hellman-group1-sha1', - '--emulatevagrantinput', - target_sshconfig_vagrant_input]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def test_0011_add_remove_hosts_two_separate_ops_kexalgorithms_top(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig = tests_names[0] - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - - target_sshconfig_res_remove = target_sshconfig + '.remove.res' - target_sshconfig_res_add = target_sshconfig + '.add.res' - - target_sshconfig_bk_remove = target_sshconfig + '.remove.bk' - target_sshconfig_bk_add = target_sshconfig + '.add.bk' - - copyfile(target_sshconfig_orig, target_sshconfig_copy) - - args = parse_args(['--remove', - 'kdevops,kdevops-dev', - '--backup_file', - target_sshconfig_bk_remove, - '--username', - 'alpha', - '--hostname', - '51.179.89.243,52.195.142.19', - '--port', - '25', - '--identity', - '~alpha/.ssh/go', - '--kexalgorithms', - 'diffie-hellman-group-exchange-sha1,' + - 'diffie-hellman-group14-sha1,' + - 'diffie-hellman-group1-sha1', - '--addstrict', - target_sshconfig_copy]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk_remove, - target_sshconfig_orig, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res_remove, shallow=False)) - - args = parse_args(['--addhost', - 'kdevops,kdevops-dev', - '--backup_file', - target_sshconfig_bk_add, - '--username', - 'alpha', - '--hostname', - '51.179.89.243,52.195.142.19', - '--port', - '25', - '--identity', - '~alpha/.ssh/go', - '--kexalgorithms', - 'diffie-hellman-group-exchange-sha1,' + - 'diffie-hellman-group14-sha1,' + - 'diffie-hellman-group1-sha1', - '--addstrict', - target_sshconfig_copy]) - run_args(args) - self.assertTrue(cmp(target_sshconfig_bk_add, - target_sshconfig_res_remove, shallow=False)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res_add, shallow=False)) - - def test_0012_add_remove_hosts_empty_file(self): - this_function_name = inspect.stack()[0][3] - tests_names = get_test_files(this_function_name) - target_sshconfig_orig = tests_names[1] - target_sshconfig_copy = tests_names[2] - target_sshconfig_res = tests_names[3] - target_sshconfig_bk = tests_names[4] - - args = parse_args(['--remove', - 'kdevops,kdevops-dev', - '--addhost', - 'kdevops,kdevops-dev', - '--backup_file', - target_sshconfig_bk, - '--username', - 'alpha', - '--hostname', - '51.179.89.243,52.195.142.19', - '--port', - '25', - '--identity', - '~alpha/.ssh/go', - '--addstrict', - target_sshconfig_copy]) - self.assertTrue(not path.exists(target_sshconfig_orig)) - self.assertTrue(not path.exists(target_sshconfig_copy)) - run_args(args) - self.assertTrue(not path.exists(target_sshconfig_orig)) - self.assertTrue(not path.exists(target_sshconfig_bk)) - self.assertTrue(path.exists(target_sshconfig_copy)) - self.assertTrue(cmp(target_sshconfig_copy, - target_sshconfig_res, shallow=False)) - - def tearDown(self): - files = listdir("tests") - for testfile in files: - if testfile.endswith(".copy") or testfile.endswith(".bk"): - remove(path.join("tests", testfile)) - - -if __name__ == '__main__': - unittest.main(verbosity=2) diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.orig deleted file mode 100644 index d519e88c3..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.orig +++ /dev/null @@ -1,53 +0,0 @@ -Host kdevops - HostName 192.168.31.12 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 192.168.31.13 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.res deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0001_remove_hosts_top.res +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.orig deleted file mode 100644 index dc3dfd4f8..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.orig +++ /dev/null @@ -1,53 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host kdevops - HostName 192.168.31.12 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 192.168.31.13 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.res deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0002_remove_hosts_middle.res +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.orig deleted file mode 100644 index e115da8dd..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.orig +++ /dev/null @@ -1,53 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host kdevops - HostName 192.168.31.12 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 192.168.31.13 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.res deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0003_remove_hosts_bottom.res +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.orig deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.orig +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.res deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0004_remove_hosts_missing.res +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.orig deleted file mode 100644 index 17896ac48..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.orig +++ /dev/null @@ -1,53 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host kdevopss - HostName 192.168.31.12 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-devs - HostName 192.168.31.13 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.res deleted file mode 100644 index 17896ac48..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0005_remove_hosts_similar.res +++ /dev/null @@ -1,53 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host kdevopss - HostName 192.168.31.12 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-devs - HostName 192.168.31.13 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.orig deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.orig +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.res deleted file mode 100644 index e65abcc3b..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0006_add_hosts_manual.res +++ /dev/null @@ -1,53 +0,0 @@ -Host kdevops 51.179.89.243 - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev 52.195.142.19 - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.add.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.add.res deleted file mode 100644 index e65abcc3b..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.add.res +++ /dev/null @@ -1,53 +0,0 @@ -Host kdevops 51.179.89.243 - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev 52.195.142.19 - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.orig deleted file mode 100644 index c497d4056..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.orig +++ /dev/null @@ -1,53 +0,0 @@ -Host kdevops - HostName 192.168.3.9 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 192.168.3.10 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.remove.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.remove.res deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0007_add_remove_hosts_two_separate_ops_top.remove.res +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.orig deleted file mode 120000 index fec797de2..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.orig +++ /dev/null @@ -1 +0,0 @@ -0007_add_remove_hosts_two_separate_ops_top.orig \ No newline at end of file diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.res deleted file mode 120000 index 533331a88..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0008_add_remove_hosts_one_shot_top.res +++ /dev/null @@ -1 +0,0 @@ -0007_add_remove_hosts_two_separate_ops_top.add.res \ No newline at end of file diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.emulate_vagrant b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.emulate_vagrant deleted file mode 100644 index f9d831ebe..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.emulate_vagrant +++ /dev/null @@ -1,20 +0,0 @@ -Host kdevops - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.orig deleted file mode 120000 index fec797de2..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.orig +++ /dev/null @@ -1 +0,0 @@ -0007_add_remove_hosts_two_separate_ops_top.orig \ No newline at end of file diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.res deleted file mode 100644 index 26401701a..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0009_add_hosts_vagrant_emulate_top.res +++ /dev/null @@ -1,53 +0,0 @@ -Host kdevops-dev 52.195.142.19 - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops 51.179.89.243 - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.emulate_vagrant b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.emulate_vagrant deleted file mode 100644 index f9d831ebe..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.emulate_vagrant +++ /dev/null @@ -1,20 +0,0 @@ -Host kdevops - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.orig deleted file mode 100644 index c497d4056..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.orig +++ /dev/null @@ -1,53 +0,0 @@ -Host kdevops - HostName 192.168.3.9 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 192.168.3.10 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.res deleted file mode 100644 index 2c315e68c..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0010_add_hosts_kexalgorithms_vagrant_emulate_top.res +++ /dev/null @@ -1,55 +0,0 @@ -Host kdevops-dev 52.195.142.19 - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops 51.179.89.243 - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.add.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.add.res deleted file mode 100644 index 6699c65fe..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.add.res +++ /dev/null @@ -1,55 +0,0 @@ -Host kdevops 51.179.89.243 - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev 52.195.142.19 - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.orig b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.orig deleted file mode 100644 index c497d4056..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.orig +++ /dev/null @@ -1,53 +0,0 @@ -Host kdevops - HostName 192.168.3.9 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev - HostName 192.168.3.10 - User vagrant - Port 22 - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/kdevops-dev/libvirt/private_key - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.remove.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.remove.res deleted file mode 100644 index b13f939d1..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0011_add_remove_hosts_two_separate_ops_kexalgorithms_top.remove.res +++ /dev/null @@ -1,33 +0,0 @@ -Host * - ServerAliveInterval 60 - ServerAliveCountMax 2 -Host apples - User mcgrof - Port 22 - HostName 192.168.1.10 - IdentityFile ~/.ssh/apples -Host apples-pub - User mcgrof - Port 6913 - HostName 71.72.31.95 - IdentityFile ~/.ssh/apples -Host starwars - HostName 192.168.2.92 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL -Host starwars-dev - HostName 192.168.2.78 - User vagrant - Port 22 - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentityFile /home/mcgrof/devel/kdevops/vagrant/.vagrant/machines/starwars-dev/libvirt/private_key - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0012_add_remove_hosts_empty_file.res b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0012_add_remove_hosts_empty_file.res deleted file mode 100644 index 311eff20d..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/tests/0012_add_remove_hosts_empty_file.res +++ /dev/null @@ -1,20 +0,0 @@ -Host kdevops 51.179.89.243 - HostName 51.179.89.243 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL -Host kdevops-dev 52.195.142.19 - HostName 52.195.142.19 - User alpha - Port 25 - IdentityFile ~alpha/.ssh/go - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - PasswordAuthentication no - IdentitiesOnly yes - LogLevel FATAL diff --git a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/update_ssh_config.py b/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/update_ssh_config.py deleted file mode 100755 index feac31d22..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/update_ssh_config/update_ssh_config.py +++ /dev/null @@ -1,325 +0,0 @@ -#!/usr/bin/python3 -# SPDX-License-Identifier: copyleft-next-0.3.1 - -import argparse -import sys -import os -import re -import subprocess -from shutil import copyfile - - -class VagrantError(Exception): - pass - - -class ExecutionError(VagrantError): - def __init__(self, errcode): - self.error_code = errcode - - -def _check(process): - if process.returncode != 0: - raise ExecutionError(process.returncode) - - -def key_val(line): - no_comment = line.split("#")[0] - return [x.strip() for x in re.split(r"\s+", no_comment.strip(), 1)] - - -def remove_hosts(args): - hosts = args.remove.split(",") - - f = open(args.ssh_config, "r") - lines = f.read().splitlines() - f.close() - new_lines = list() - rm_this_host = False - for line in lines: - kv = key_val(line) - if len(kv) > 1: - key, value = kv - if key.lower() == "host": - if value in hosts: - rm_this_host = True - continue - else: - rm_this_host = False - new_lines.append(line) - else: - if not rm_this_host: - new_lines.append(line) - else: - new_lines.append(line) - - f = open(args.ssh_config, "w") - f.write("\n".join([x for x in new_lines]) + "\n") - f.close() - - -def add_vagrant_hosts(args): - lines = None - if args.emulatevagrantinput: - f = open(args.emulatevagrantinput, "r") - lines = f.read().splitlines() - f.close() - else: - process = subprocess.Popen(['vagrant', 'ssh-config'], - stdout=subprocess.PIPE, - close_fds=True, universal_newlines=True) - stdout = process.communicate()[0] - process.wait() - _check(process) - lines = stdout.splitlines() - - addhost = "" - hostname = "" - username = "" - port = "" - identity = "" - kexalgorithms = None - - # All vagrant hosts are strict, which allows us to skip checking all of - # the parameters which define this. - addstrict = True - - last_host_added = "" - newhost = None - - if args.kexalgorithms and args.kexalgorithms is not None: - kexalgorithms = args.kexalgorithms - - for line in lines: - if not line: - continue - kv = key_val(line) - if len(kv) > 1: - key, value = kv - if key.lower() == "host": - if addhost != "": - newhost = SshHost(args.ssh_config, addhost, hostname, - username, port, identity, addstrict, - kexalgorithms) - newhost.call_add_host() - last_host_added = addhost - addhost = value - hostname = "" - username = "" - port = "" - identity = "" - addstrict = True - if key.lower() == "hostname": - hostname = value - elif key.lower() == "user": - username = value - elif key.lower() == "port": - port = value - elif key.lower() == "identityfile": - identity = value - - if last_host_added != addhost: - newhost = SshHost(args.ssh_config, addhost, hostname, username, port, - identity, addstrict, kexalgorithms) - newhost.call_add_host() - - -# We extend the SshHost with the variables which we add to our ArgumentParser -# and which we use on this function so that we can pass to this function either -# an ArgumentParser object or one of our SshHost objects -def add_host(args): - hosts = args.addhost.split(",") - new_lines = list() - hostnames = list() - ports = list() - count = 0 - - if args.hostname: - hostnames = args.hostname.split(",") - - if len(hosts) > 1 and len(hostnames) > 1: - if len(hosts) != len(hostnames): - sys.stdout.write("Number of shorthosts must match number of " + - "hostnames\n") - sys.exit(1) - - if args.port: - ports = args.port.split(",") - - if len(hosts) > 1 and len(ports) > 1: - if len(hosts) != len(ports): - sys.stdout.write("Number of shorthosts must match number of " + - "ports\n") - sys.exit(1) - - for host in hosts: - host_port = host.split(":") - hostname = "" - port = "" - if len(host_port) > 1: - host, port = host_port - if port == "" and args.port: - if len(ports) > 1: - port = ports[count] - else: - port = args.port - if len(hostnames) > 1: - hostname = hostnames[count] - elif args.hostname: - hostname = args.hostname - if hostname: - new_lines.append("Host %s %s\n" % (host, hostname)) - new_lines.append("\tHostName %s\n" % (hostname)) - else: - new_lines.append("Host %s\n" % (host)) - if port == "" and args.port: - port = args.port - if args.username: - new_lines.append("\tUser %s\n" % (args.username)) - if port != "": - new_lines.append("\tPort %s\n" % (port)) - if args.identity: - new_lines.append("\tIdentityFile %s\n" % (args.identity)) - if args.kexalgorithms and args.kexalgorithms is not None: - new_lines.append("\tKexAlgorithms %s\n" % (args.kexalgorithms)) - if args.addstrict: - new_lines.append("\tUserKnownHostsFile /dev/null\n") - new_lines.append("\tStrictHostKeyChecking no\n") - new_lines.append("\tPasswordAuthentication no\n") - new_lines.append("\tIdentitiesOnly yes\n") - new_lines.append("\tLogLevel FATAL\n") - count = count + 1 - - data = "" - all_data = None - if os.path.exists(args.ssh_config): - f = open(args.ssh_config, "r") - data = f.read() - f.close() - - new_data = "".join([x for x in new_lines]) - all_data = new_data + data - - f = open(args.ssh_config, 'w') - f.write(all_data) - f.close() - - -class SshHost: - def __init__(self, ssh_config, name, hostname, username, port, identity, - strict, kexalgorithms): - self.ssh_config = ssh_config - self.addhost = name - self.hostname = hostname - self.username = username - self.port = port - self.identity = identity - self.addstrict = strict - self.kexalgorithms = kexalgorithms - - def call_add_host(self): - add_host(self) - - def call_remove_hosts(self): - remove_hosts(self) - - -def parse_args(args): - parser = argparse.ArgumentParser() - parser.add_argument('ssh_config', help='ssh configuration file to process') - parser.add_argument('--addhost', - help='The host shortcut name you are adding. This ' + - 'can be a comma separated set of hosts and each host' + - 'can have a port specified with a colon, if set ' + - 'it will override override the port set by --port. ' + - 'will let you set a default port if non specified ' + - 'but allow you to override ports per host. We refer ' + - 'this entry as the shorthost.') - parser.add_argument('--addvagranthosts', - const=True, default=False, action="store_const", - help='Use this if you are want to add or augment ' + - 'the entries found from the output of the command ' + - 'vagrant ssh-config. You would typically use this ' + - 'if you are working with vagrant, and are in the ' + - 'vagrant directory. Only a few parameters are ' + - 'supported when augmenting the information ' + - 'installed per host, those are entries which ' + - 'vagrant does not add which you may need, for ' + - 'instance on older hosts') - parser.add_argument('--emulatevagrantinput', - help='Used for testing purposes only,' + - 'where we do not want to run vagrant ssh-config.' + - 'The parameter passed is an input file which ' + - 'emulates the command') - parser.add_argument('--hostname', - help='Used only on addition, the hostname to use ' + - 'for this entry. If the shorhost specified was a ' + - 'comma separated list of hosts, then this can also ' + - 'be a comma separated list, in which case each ' + - 'shorthost index represents the hostname for that ' + - 'shorthost, and the number of both shorthosts and ' + - 'hostname must match.') - parser.add_argument('--port', - help='Used only on addition, the port to use, ' + - 'by default none is specified') - parser.add_argument('--username', - help='Used only on addition, the username to use, ' + - 'default is none, so ssh will assumes your ' + - 'localhost username') - parser.add_argument('--identity', - help='Used only on addition, the host key to ' + - 'use, the default is empty and so no file is provided') - parser.add_argument('--kexalgorithms', - help='Use this if you have a custom KexAlgorithms ' + - 'entry you want to add for the host entries. ' + - 'This is typically useful for older hosts.') - parser.add_argument('--addstrict', - const=True, default=False, action="store_const", - help='Used only on addition, if set some extra ' + - 'sensible strict defaults will be added to the host ' + - 'entry, disabled by default') - parser.add_argument('--remove', - help='Comma separated list of host entries to remove') - parser.add_argument('--backup_file', - help='Use this file as the backup') - parser.add_argument('--nobackup', - const=True, default=False, action="store_const", - help='Do not use a backup file') - return parser.parse_args(args) - - -def run_args(args): - skip_remove_and_backup = False - if not args.remove and not args.addhost: - print("Must specify addition or removal request") - sys.exit(0) - - if not os.path.isfile(args.ssh_config): - args.nobackup = True - skip_remove_and_backup = True - - backup_file = args.ssh_config + '.kdevops.bk' - if args.backup_file: - backup_file = args.backup_file - if args.nobackup: - backup_file = None - - if not skip_remove_and_backup and backup_file: - copyfile(args.ssh_config, backup_file) - - if not skip_remove_and_backup and args.remove: - remove_hosts(args) - - if args.addvagranthosts: - add_vagrant_hosts(args) - elif args.addhost: - add_host(args) - - -def main(): - args = parse_args(sys.argv[1:]) - run_args(args) - - -if __name__ == "__main__": - main() diff --git a/playbooks/roles/update_ssh_config_vagrant/vars/main.yml b/playbooks/roles/update_ssh_config_vagrant/vars/main.yml deleted file mode 100644 index 76b0f9208..000000000 --- a/playbooks/roles/update_ssh_config_vagrant/vars/main.yml +++ /dev/null @@ -1 +0,0 @@ -hosts_comma: "{{ ansible_play_hosts | join(',') }}" diff --git a/playbooks/update_ssh_config_vagrant.yml b/playbooks/update_ssh_config_vagrant.yml deleted file mode 100644 index c8d0e9962..000000000 --- a/playbooks/update_ssh_config_vagrant.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: localhost - roles: - - role: update_ssh_config_vagrant diff --git a/scripts/archive.Makefile b/scripts/archive.Makefile index 54928d328..96c73ba15 100644 --- a/scripts/archive.Makefile +++ b/scripts/archive.Makefile @@ -1,8 +1,10 @@ # SPDX-License-Identifier: copyleft-next-0.3.1 # Automatically archive of CI results - + ifeq (,$(wildcard $(CURDIR)/.config)) +ci-archive: + @echo "No .config found; skipping archive" else ARCHIVE_DYNAMIC_RUNTIME_VARS := diff --git a/scripts/bringup.Makefile b/scripts/bringup.Makefile index 5a04448e6..764988166 100644 --- a/scripts/bringup.Makefile +++ b/scripts/bringup.Makefile @@ -6,7 +6,6 @@ else stage-2-$(CONFIG_TERRAFORM) += kdevops_terraform_deps stage-2-$(CONFIG_LIBVIRT_INSTALL) += kdevops_install_libvirt stage-2-$(CONFIG_LIBVIRT_CONFIGURE) += kdevops_configure_libvirt -stage-2-$(CONFIG_VAGRANT_INSTALL_PRIVATE_BOXES) += kdevops_vagrant_boxes stage-2-$(CONFIG_LIBVIRT_VERIFY) += kdevops_verify_libvirt_user stage-2-$(CONFIG_LIBVIRT_STORAGE_POOL_CREATE) += kdevops_libvirt_storage_pool_create diff --git a/scripts/bringup_vagrant.sh b/scripts/bringup_vagrant.sh deleted file mode 100755 index 4e163871d..000000000 --- a/scripts/bringup_vagrant.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -set -e - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -# Convert the version string x.y.z to a canonical 5 or 6-digit form. -# Inspired by ld-version.sh on linux. This is the way. -get_canonical_version() -{ - IFS=. - set -- $1 - - # If the 2nd or 3rd field is missing, fill it with a zero. - # - # The 4th field, if present, is ignored. - # This occurs in development snapshots as in 2.35.1.20201116 - echo $((10000 * $1 + 100 * ${2:-0} + ${3:-0})) -} - -_vagrant_lacks_parallel() -{ - PARALLEL_MISSING="0.7.0" - VAGRANT_LIBVIRT_VERSION="$(vagrant plugin list | sed -e 's|(| |g' | sed -e 's|,| |g' | awk '{print $2}')" - - OLD=$(get_canonical_version $PARALLEL_MISSING) - CURRENT=$(get_canonical_version $VAGRANT_LIBVIRT_VERSION) - if [[ "$CURRENT" -le "$OLD" ]]; then - return 1 - fi - return 0 -} - -vagrant_check_dups() -{ - NEW_POSSIBLE_INSTANCES=$(vagrant status --machine-readable | grep ",state," | awk -F"," '{print $2}') - EXISTING_USER_INSTANCES=$(vagrant global-status | grep -A 200 -e "-----" | grep -v -e "----" | grep -B 200 " " | awk '{print $2}') - for instance in $NEW_POSSIBLE_INSTANCES ; do - INSTANCE_STATE=$(vagrant status --machine-readable | grep ",state," | awk -F",${instance}," '{print $2}' |awk -F"," '{print $2}') - # We're dealing with a new local instance which is not created - # yet. Now we check to see if globally this user doesn't have - # an existing instance already created. - if [[ "$INSTANCE_STATE" == "not_created" ]]; then - INSTANCE_NEW="true" - for old_instance in $EXISTING_USER_INSTANCES; do - # An older instance already exists, complain - if [[ "$instance" == "$old_instance" ]]; then - INSTANCE_NEW="false" - break - fi - done - # At this point we're only dealing with not_created - # instances *and* we know one does not exist in another - # directory for this user. - - kdevops_pool_path="$CONFIG_LIBVIRT_STORAGE_POOL_PATH" - # For libvirt we can do one more global sanity check - if [[ "$CONFIG_LIBVIRT" == "y" ]]; then - possible_image="${kdevops_pool_path}/vagrant_${instance}.img" - if [[ -f $possible_image ]]; then - echo "Image for instance $instance already exists ($possible_image), skippin bringup wipe of spare drives ..." - continue - fi - fi - - # If we don't do this, old spare drives might be - # left over and we'd be using them up again. - spare_drive_instance_dir="${kdevops_pool_path}/kdevops/$instance" - if [[ -d ${spare_drive_instance_dir} ]]; then - echo "Wiping old instance spare drive directory ... $spare_drive_instance_dir" - rm -rf ${kdevops_pool_path}/kdevops/$instance - fi - fi - done -} - -# This is just a workaround for fedora since we have an old vagrant-libvirt -# plugin that doesn't work with parallel -ARG= -if ! _vagrant_lacks_parallel; then - ARG='--no-parallel' -fi -cd vagrant -if [[ "$CONFIG_VAGRANT_BOX_UPDATE_ON_BRINGUP" == "y" ]]; then - if [[ ! -f $(basename "$KDEVOPS_VAGRANT_PROVISIONED") ]]; then - vagrant box update - fi -fi -if [[ "$CONFIG_VAGRANT_VALIDATE_BEFORE_BRINGUP" == "y" ]]; then - vagrant validate - if [[ $? -ne 0 ]]; then - echo "kdevops: Failed to validate Vagrantfile, stopping here" - exit 1 - fi -fi - -vagrant_check_dups - -vagrant up $ARG diff --git a/scripts/check_distro_kconfig.sh b/scripts/check_distro_kconfig.sh deleted file mode 100755 index 00265474e..000000000 --- a/scripts/check_distro_kconfig.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -if [ -s "${TOPDIR}/vagrant/Kconfig.$1" ]; then - echo y -else - echo n -fi diff --git a/scripts/check_pciepassthrough_kconfig.sh b/scripts/check_pciepassthrough_kconfig.sh deleted file mode 100755 index d24fc9f39..000000000 --- a/scripts/check_pciepassthrough_kconfig.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -if [[ -s "${TOPDIR}/vagrant/Kconfig.$1" ]]; then - echo y -else - echo n -fi diff --git a/scripts/destroy_vagrant.sh b/scripts/destroy_vagrant.sh deleted file mode 100755 index bd5e43d00..000000000 --- a/scripts/destroy_vagrant.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -set -e - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -cd vagrant -vagrant destroy -f -# Make sure the user can nuke this stuff -sudo chgrp $USER . .vagrant -sudo chmod g+rwx . .vagrant -rm -rf .vagrant - -# These are not initilized instances, our current directory possible -# instances. If you're running 'make destroy' you know what you are -# doing so we don't check for global dups or anything like that. -UNINIT_CURRENT_INSTANCES=$(vagrant status --machine-readable | grep ",state," | grep not_created | awk -F "," '{print $2}') -for i in $UNINIT_CURRENT_INSTANCES; do - UNINIT_INSTANCE_SPARE_DRIVE_DIR="${CONFIG_LIBVIRT_STORAGE_POOL_PATH}/kdevops/$i" - if [[ -d $UNINIT_INSTANCE_SPARE_DRIVE_DIR ]]; then - echo "Found unitialized (possibly old) instance spare drive directory, removing it ... $i" - rm -rf $UNINIT_INSTANCE_SPARE_DRIVE_DIR - fi -done - -if [[ -f $(basename "$KDEVOPS_VAGRANT_PROVISIONED") ]]; then - rm -f $(basename "$KDEVOPS_VAGRANT_PROVISIONED") ]]; -fi diff --git a/scripts/dynamic-pci-kconfig.Makefile b/scripts/dynamic-pci-kconfig.Makefile index 716cdc1e4..2d2f0d5c7 100644 --- a/scripts/dynamic-pci-kconfig.Makefile +++ b/scripts/dynamic-pci-kconfig.Makefile @@ -2,7 +2,7 @@ PCIE_RUNTIME_VARS := "topdir_path": $(TOPDIR_PATH) -KDEVOPS_MRPROPER += vagrant/Kconfig.passthrough_libvirt.generated +KDEVOPS_MRPROPER += kconfigs/Kconfig.passthrough_libvirt.generated ifneq (,$(KDEVOPS_ENABLE_PCIE_KCONFIG)) DYNAMIC_KCONFIG += dynamic_pcipassthrough_kconfig @@ -12,7 +12,7 @@ endif ifeq (,$(KDEVOPS_ENABLE_PCIE_KCONFIG)) DYNAMIC_KCONFIG += dynamic_pcipassthrough_kconfig_touch dynamic_pcipassthrough_kconfig_touch: - $(Q)touch vagrant/Kconfig.passthrough_libvirt.generated + $(Q)touch kconfigs/Kconfig.passthrough_libvirt.generated endif ifeq (y,$(CONFIG_KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH)) diff --git a/scripts/gen-nodes.Makefile b/scripts/gen-nodes.Makefile index 775ec5c49..2642f518d 100644 --- a/scripts/gen-nodes.Makefile +++ b/scripts/gen-nodes.Makefile @@ -4,8 +4,6 @@ GEN_NODES_EXTRA_ARGS += kdevops_nodes='$(KDEVOPS_NODES)' GEN_NODES_EXTRA_ARGS += kdevops_nodes_template='$(KDEVOPS_NODES_TEMPLATE)' GEN_NODES_EXTRA_ARGS += kdevops_nodes_template_full_path='$(TOPDIR_PATH)/$(KDEVOPS_NODES_TEMPLATE)' -GEN_NODES_EXTRA_ARGS += vagrant_box='$(subst ",,$(CONFIG_VAGRANT_BOX))' -GEN_NODES_EXTRA_ARGS += vagrant_box_version='$(subst ",,$(CONFIG_VAGRANT_BOX_VERSION))' GEN_NODES_EXTRA_ARGS += libvirt_vcpus_count='$(subst ",,$(CONFIG_LIBVIRT_VCPUS_COUNT))' GEN_NODES_EXTRA_ARGS += libvirt_mem_mb='$(subst ",,$(CONFIG_LIBVIRT_MEM_MB))' diff --git a/scripts/get-distro-default-bridge.sh b/scripts/get-distro-default-bridge.sh index d1321db5a..c3f68b45c 100755 --- a/scripts/get-distro-default-bridge.sh +++ b/scripts/get-distro-default-bridge.sh @@ -4,9 +4,8 @@ DISTRO=$1 VIRT_TYPE=$2 # We currently ignore the distro because as far as we're concerned -# they all use the default IP, the only thing that differiantes it -# is if you are using vagrant or guestfs. If your distribution needs -# a different deafult it should be easy for you to extend it here. +# they all use the default IP. If your distribution needs a different +# default it should be easy for you to extend it here. DISTRO_FEDORA=`scripts/os-release-check.sh fedora` if [[ "$DISTRO_FEDORA" == "y" ]]; then @@ -14,8 +13,4 @@ if [[ "$DISTRO_FEDORA" == "y" ]]; then exit 0 fi -if [[ "$VIRT_TYPE" == "vagrant" ]]; then - echo "192.168.124.1" -else - echo "192.168.122.1" -fi +echo "192.168.122.1" diff --git a/scripts/provision.Makefile b/scripts/provision.Makefile index 92a754108..f56b2a2de 100644 --- a/scripts/provision.Makefile +++ b/scripts/provision.Makefile @@ -44,7 +44,6 @@ KDEVOPS_DESTROY_DEPS := # We export this into Makefiles so that we can use them both on Makefiles and # on Kconfig files with environment variables such as $(FOO) export KDEVOPS_DEFAULT_DISTRO := $(shell $(TOPDIR)/scripts/get-distro-prefix.sh) -export KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT := $(shell $(TOPDIR)/scripts/get-distro-default-bridge.sh $(KDEVOPS_DEFAULT_DISTRO) vagrant) export KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS := $(shell $(TOPDIR)/scripts/get-distro-default-bridge.sh $(KDEVOPS_DEFAULT_DISTRO) guestfs) # These go last @@ -56,9 +55,6 @@ ifeq (y,$(CONFIG_TERRAFORM)) include scripts/terraform.Makefile endif # CONFIG_TERRAFORM -ifeq (y,$(CONFIG_VAGRANT)) -include scripts/vagrant.Makefile -endif ifeq (y,$(CONFIG_GUESTFS)) include scripts/guestfs.Makefile diff --git a/scripts/prune_stale_vagrant.sh b/scripts/prune_stale_vagrant.sh deleted file mode 100755 index 61ac0e86b..000000000 --- a/scripts/prune_stale_vagrant.sh +++ /dev/null @@ -1,164 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -set -e - -source .config -source scripts/lib.sh - -SUDO_REQ="sudo" -EVALUATE="false" -THIS_SCRIPT=$0 - -run_prune_path() -{ - EVAL_ARGS="" - if [[ "$1" == "true" ]]; then - EVAL_ARGS="--evaluate" - fi - POOLS=$($SUDO_REQ virsh pool-list | grep -A 2000 -e "---" | grep -v -e "---" | awk '{print $1}') - for p in $POOLS; do - POOL_PATH=$($SUDO_REQ virsh pool-dumpxml $p | grep path | sed -e 's|||' | sed -e 's|||' | awk '{print $1}') - echo "Evaluating pool $p with path $POOL_PATH ..." - $THIS_SCRIPT $EVAL_ARGS $POOL_PATH - if [[ $? -ne 0 ]]; then - echo "Inspect pool $p there is something odd with it or its empty and unused" - fi - done -} - -if [[ "$CONFIG_LIBVIRT_URI_SESSION" == "y" ]]; then - SUDO_REQ="" -fi - -if [[ "$CONFIG_LIBVIRT" != "y" ]]; then - echo "Only libvirt is supported at this time for this prune" - exit 1 -fi - -if [[ $# -eq 0 ]]; then - KDEVOPS_POOL_PATH="$CONFIG_LIBVIRT_STORAGE_POOL_PATH" -elif [[ $# -eq 1 ]]; then - if [[ "$1" == "--help" ]]; then - echo "Usage: $0" - echo " --evaluate -- evaluates how much savings you could on your configured pool" - echo " --evaluate -- evaluates how much savings you could on a specific pool path" - echo " --prune-eval-pools -- evaluates how much savings you could save if we tried to prune all kdevops pools" - echo " --prune-pools -- prunes all pools found for kdevops" - exit - elif [[ "$1" == "--prune-pools" ]]; then - echo unsupported - exit 1 - run_prune_path false - exit - elif [[ "$1" == "--prune-eval-pools" ]]; then - run_prune_path true - exit - else - KDEVOPS_POOL_PATH="$1" - fi -elif [[ $# -eq 2 ]]; then - if [[ "$1" == "--evaluate" ]]; then - EVALUATE="true" - KDEVOPS_POOL_PATH="$2" - else - echo "Usage: $0 --evaluate | $0 | $0 " - exit - fi -else - echo "Usage: $0 --evaluate | $0 | $0 " - exit -fi - -if [[ ! -d $KDEVOPS_POOL_PATH ]]; then - echo "$KDEVOPS_POOL_PATH does not exist, no need to prune, maybe destroy and undefine this pool" - echo "Consider running the following if this is a stale pool:" - echo "$SUDO_REQ virsh pool-destroy " - echo "$SUDO_REQ virsh pool-undefine " - exit 1 -fi - -HOMES=$(cat /etc/passwd| awk -F":" '{print $6}') -for i in $HOMES; do - if [[ "$KDEVOPS_POOL_PATH" == "$i" || "$KDEVOPS_POOL_PATH" == "$i/" ]]; then - echo "Skipping odd pool on a home directory $i" - exit 1 - fi -done - -EXISTING_USAGE=$(du -hs $KDEVOPS_POOL_PATH) -EXISTING_USAGE_BYTES=$(du -s --block-size=1 $KDEVOPS_POOL_PATH | awk '{print $1}') - -echo -e "Existing disk usage:\n$EXISTING_USAGE" - -ALL_LIBVIRT_INSTANCES=$($SUDO_REQ virsh list --all --title | grep -A 200 -e "----" | grep -v -e "---" | awk '{print $2}') - -BYTES_COULD_SAVE=0 - -# Scan the libvirt images with a vagrant prefix images not registered somehow -# to libvirt. This would be odd. We ignore libvirt images not related to -# vagrant. -for i in ${KDEVOPS_POOL_PATH}/vagrant_*.img; do - EXISTS="n" - IMAGE_INSTANCE=$(basename ${i%*.img}) - for INSTANCE in $ALL_LIBVIRT_INSTANCES; do - if [[ "$INSTANCE" == "$IMAGE_INSTANCE" ]]; then - EXISTS="y" - fi - done - if [[ "$EXISTS" == "n" ]]; then - echo "Instance $IMAGE_INSTANCE does not exist and is therefore stale" - if [[ "$EVALUATE" == "true" ]]; then - BYTES=$(du -s --block-size=1 $i | awk '{print $1}') - let BYTES_COULD_SAVE=$BYTES_COULD_SAVE+BYTES - else - rm -rf $i - fi - fi -done - -# Now scan only the spare kdevops drives. Since we're only looking -# at the kdevops directory we are ignoring non-kdevops instances -# data. -for i in ${KDEVOPS_POOL_PATH}/kdevops/*; do - EXISTS="n" - if [[ ! -d $i ]]; then - continue - fi - DIR=$(basename $i) - for INSTANCE in $ALL_LIBVIRT_INSTANCES; do - if [[ "vagrant_${DIR}" == "$INSTANCE" ]]; then - EXISTS="y" - fi - done - if [[ "$EXISTS" == "n" ]]; then - echo "Spare kdevops drive exists without any instance: $DIR" - if [[ "$EVALUATE" == "true" ]]; then - BYTES=$(du -s --block-size=1 $i | awk '{print $1}') - let BYTES_COULD_SAVE=$BYTES_COULD_SAVE+BYTES - else - rm -rf $i - fi - fi -done - - -if [[ "$EVALUATE" == "true" ]]; then - if [[ "$BYTES_COULD_SAVE" == "0" ]]; then - echo "Nothing to prune on $KDEVOPS_POOL_PATH" - else - echo "You could save $BYTES_COULD_SAVE bytes ( $((BYTES_COULD_SAVE/1024/1024)) MiB or $((BYTES_COULD_SAVE/1024/1024/1024)) GiB $((BYTES_COULD_SAVE/1024/1024/1024/1024)) TiB)" - fi -else - AFTER_USAGE_BYTES=$(du -s --block-size=1 $KDEVOPS_POOL_PATH | awk '{print $1}') - DELTA=0 - DELTA=$((EXISTING_USAGE_BYTES-AFTER_USAGE_BYTES)) - - AFTER_USAGE=$(du -hs $KDEVOPS_POOL_PATH) - echo -e "After prune disk usage:\n$AFTER_USAGE" - if [[ $DELTA == "0" ]]; then - echo "No disk savings after prune" - else - echo "Saved $DELTA bytes ( $((DELTA/1024/1024)) MiB or $((DELTA/1024/1024/1024)) GiB $((DELTA/1024/1024/1024/1024)) TiB)" - fi -fi diff --git a/scripts/tests.Makefile b/scripts/tests.Makefile index 1ac8859b1..bc3bd1a73 100644 --- a/scripts/tests.Makefile +++ b/scripts/tests.Makefile @@ -6,7 +6,6 @@ # target on each of these directories. These will run with a travis setup for # python 3.8. KDEVOPS_PYTHON_TESTS := -KDEVOPS_PYTHON_TESTS += playbooks/roles/update_ssh_config_vagrant/update_ssh_config/ KDEVOPS_TEST_TYPES := KDEVOPS_TEST_TYPES += python-tests diff --git a/scripts/vagrant.Makefile b/scripts/vagrant.Makefile deleted file mode 100644 index e43a21d3c..000000000 --- a/scripts/vagrant.Makefile +++ /dev/null @@ -1,109 +0,0 @@ -# SPDX-License-Identifier: copyleft-next-0.3.1 - -VAGRANT_ARGS := - -KDEVOPS_NODES_TEMPLATE := $(KDEVOPS_NODES_ROLE_TEMPLATE_DIR)/kdevops_nodes_split_start.j2.yaml -KDEVOPS_NODES := vagrant/kdevops_nodes.yaml - -KDEVOPS_VAGRANT_TEMPLATE := $(KDEVOPS_NODES_ROLE_TEMPLATE_DIR)/Vagrantfile.j2 -KDEVOPS_VAGRANT_GENERATED:= vagrant/.Vagrantfile.generated -KDEVOPS_VAGRANT := vagrant/Vagrantfile - -export KDEVOPS_PROVISIONED_SSH := $(KDEVOPS_PROVISIONED_SSH_DEFAULT_GUARD) - -KDEVOPS_MRPROPER += $(KDEVOPS_VAGRANT_GENERATED) -KDEVOPS_MRPROPER += $(KDEVOPS_VAGRANT) - -VAGRANT_ARGS += kdevops_vagrant_template_full_path='$(TOPDIR_PATH)/$(KDEVOPS_VAGRANT_TEMPLATE)' - -VAGRANT_ARGS += kdevops_enable_vagrant=True -VAGRANT_ARGS += kdevops_vagrant='$(KDEVOPS_VAGRANT)' -VAGRANT_ARGS += kdevops_vagrant_generated='$(KDEVOPS_VAGRANT_GENERATED)' -VAGRANT_ARGS += kdevops_vagrant_template='$(KDEVOPS_VAGRANT_TEMPLATE)' - -VAGRANT_ARGS += data_user='vagrant' -VAGRANT_ARGS += data_vagrant='vagrant' - -ifeq (y,$(CONFIG_HAVE_VAGRANT_BOX_URL)) -VAGRANT_PRIVATE_BOX_DEPS := vagrant_private_box_install -else -VAGRANT_PRIVATE_BOX_DEPS := -endif - -ifeq (y,$(CONFIG_LIBVIRT)) -VAGRANT_ARGS += libvirt_provider=True - -QEMU_GROUP:=$(subst ",,$(CONFIG_LIBVIRT_QEMU_GROUP)) -VAGRANT_ARGS += kdevops_storage_pool_group='$(QEMU_GROUP)' -VAGRANT_ARGS += storage_pool_group='$(QEMU_GROUP)' -endif - -ifeq (y,$(CONFIG_VAGRANT_VIRTUALBOX)) -VAGRANT_ARGS += virtualbox_provider=True -endif - -VAGRANT_9P_HOST_CLONE := -ifeq (y,$(CONFIG_BOOTLINUX_9P)) -VAGRANT_9P_HOST_CLONE := vagrant_9p_linux_clone -endif - -LIBVIRT_PCIE_PASSTHROUGH := -ifeq (y,$(CONFIG_KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH)) -LIBVIRT_PCIE_PASSTHROUGH := libvirt_pcie_passthrough_permissions -endif - -ifneq ($(strip $(CONFIG_RHEL_ORG_ID)),) -ifneq ($(strip $(CONFIG_RHEL_ACTIVATION_KEY)),) -RHEL_ORG_ID:=$(subst ",,$(CONFIG_RHEL_ORG_ID)) -RHEL_ACTIVATION_KEY:=$(subst ",,$(CONFIG_RHEL_ACTIVATION_KEY)) -VAGRANT_ARGS += rhel_org_id="$(RHEL_ORG_ID)" -VAGRANT_ARGS += rhel_activation_key="$(RHEL_ACTIVATION_KEY)" -endif -endif - -EXTRA_VAR_INPUTS += extend-extra-args-vagrant -ANSIBLE_EXTRA_ARGS += $(VAGRANT_ARGS) - -VAGRANT_BRINGUP_DEPS := -VAGRANT_BRINGUP_DEPS += $(VAGRANT_PRIVATE_BOX_DEPS) -VAGRANT_BRINGUP_DEPS += $(VAGRANT_9P_HOST_CLONE) -VAGRANT_BRINGUP_DEPS += $(LIBVIRT_PCIE_PASSTHROUGH) - -KDEVOPS_PROVISION_METHOD := bringup_vagrant -KDEVOPS_PROVISION_DESTROY_METHOD := destroy_vagrant - -extend-extra-args-vagrant: - @if [[ "$(CONFIG_HAVE_VAGRANT_BOX_URL)" == "y" ]]; then \ - echo "kdevops_install_vagrant_boxes: True" >> $(KDEVOPS_EXTRA_VARS) ;\ - echo "vagrant_boxes:" >> $(KDEVOPS_EXTRA_VARS) ;\ - echo " - { name: '$(CONFIG_VAGRANT_BOX)', box_url: '$(CONFIG_VAGRANT_BOX_URL)' }" >> $(KDEVOPS_EXTRA_VARS) ;\ - fi - -vagrant_private_box_install: - $(Q)ansible-playbook $(ANSIBLE_VERBOSE) -i \ - $(KDEVOPS_HOSTFILE) $(KDEVOPS_PLAYBOOKS_DIR)/install_vagrant_boxes.yml - -vagrant_9p_linux_clone: - $(Q)make linux-clone - -libvirt_pcie_passthrough_permissions: - $(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ - --inventory localhost, \ - playbooks/libvirt_pcie_passthrough.yml - -$(KDEVOPS_PROVISIONED_SSH): - $(Q)if [[ "$(CONFIG_KDEVOPS_SSH_CONFIG_UPDATE)" == "y" ]]; then \ - ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \ - --inventory localhost, \ - playbooks/update_ssh_config_vagrant.yml - fi - $(Q)touch $(KDEVOPS_PROVISIONED_SSH) - -bringup_vagrant: $(VAGRANT_BRINGUP_DEPS) - $(Q)$(TOPDIR)/scripts/bringup_vagrant.sh -PHONY += bringup_vagrant - -destroy_vagrant: - $(Q)$(TOPDIR)/scripts/destroy_vagrant.sh - $(Q)rm -f $(KDEVOPS_PROVISIONED_SSH) - $(Q)rm -f $(KDEVOPS_PROVISIONED_SSH) $(KDEVOPS_PROVISIONED_DEVCONFIG) diff --git a/scripts/workflows/generic/run_kernel_ci.sh b/scripts/workflows/generic/run_kernel_ci.sh index 2bf14278e..57c084252 100755 --- a/scripts/workflows/generic/run_kernel_ci.sh +++ b/scripts/workflows/generic/run_kernel_ci.sh @@ -237,19 +237,13 @@ kernel_ci_watchdog_loop() grep runtime $KERNEL_CI_WATCHDOG_RESULTS >> $KERNEL_CI_WATCHDOG_FAIL_LOG cat $KERNEL_CI_WATCHDOG_TIMEOUT >> $KERNEL_CI_WATCHDOG_FAIL_LOG fi - if [[ "$WATCHDOG_RESET_HUNG_SYSTEMS" == "y" ]]; then - for i in $(awk '{print $1}' $KERNEL_CI_WATCHDOG_RESULTS | grep -E -v "runtime|Hostname"); do - if [[ "$CONFIG_VAGRANT" == "y" ]]; then - sudo virsh reset vagrant_$i - elif [[ "$CONFIG_GUESTFS" == "y" ]]; then - sudo virsh reset $i - else - echo "$i : Unsupported crashy reset for this bringup configuration" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - fi - echo -e "\nReset all your associated systems:" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - echo -e "\t$i" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - done - fi + if [[ "$WATCHDOG_RESET_HUNG_SYSTEMS" == "y" ]]; then + for i in $(awk '{print $1}' $KERNEL_CI_WATCHDOG_RESULTS | grep -E -v "runtime|Hostname"); do + sudo virsh reset $i + echo -e "\nReset all your associated systems:" >> $KERNEL_CI_WATCHDOG_FAIL_LOG + echo -e "\t$i" >> $KERNEL_CI_WATCHDOG_FAIL_LOG + done + fi break fi fi diff --git a/terraform/azure/main.tf b/terraform/azure/main.tf index 7a91a8699..2da47d325 100644 --- a/terraform/azure/main.tf +++ b/terraform/azure/main.tf @@ -93,7 +93,7 @@ resource "azurerm_linux_virtual_machine" "kdevops_vm" { count = local.kdevops_num_boxes # As of terraform 0.11 there is no easy way to convert a list to a map - # for the structure we have defined for the vagrant_boxes. We can use + # for the structure we have defined for the guest list. We can use # split to construct a subjset list though, and then key in with the # target left hand value name we want to look for. On the last split we # call always uses the second element given its a value: figure, we want diff --git a/vagrant/.gitignore b/vagrant/.gitignore deleted file mode 100644 index 2a00270b0..000000000 --- a/vagrant/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.vagrant -*.img diff --git a/vagrant/Kconfig b/vagrant/Kconfig deleted file mode 100644 index ecf7bcafe..000000000 --- a/vagrant/Kconfig +++ /dev/null @@ -1,295 +0,0 @@ -if VAGRANT - -choice - prompt "Vagrant virtualization technology to use" - default VAGRANT_LIBVIRT_SELECT - -config VAGRANT_LIBVIRT_SELECT - bool "Libvirt" - help - Select this option if you want to use KVM / libvirt for - local virtualization. - -config VAGRANT_VIRTUALBOX - bool "Virtualbox" - select EXTRA_STORAGE_SUPPORTS_512 - select EXTRA_STORAGE_SUPPORTS_1K - select EXTRA_STORAGE_SUPPORTS_2K - select EXTRA_STORAGE_SUPPORTS_4K - help - Select this option if you want to use VirtualBox for - local virtualization. - -endchoice - -if VAGRANT_VIRTUALBOX - -choice - prompt "VirtualBox storage pool path" - default VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM_MANUAL if !DISTRO_SUSE - default VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM_CWD if DISTRO_SUSE - -config VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM_CWD - bool "Use the current vagrant working directory" - help - Select this option if you want to use the vagrant directory inside - where you git cloned kdevops as the Vagrant storage pool path where - additional NVMe drives will be created. As it is today it - would seem only fedora restricts the $HOME to g-rwx o-rwx and so - by default this option won't work on Fedora by default. This used - to be the old default on kdevops but because of this it should not - be used by default. Distributions still relying on this should - verify they can change this default. - -config VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM_MANUAL - bool "Custom manual path" - help - Select this option if you want to manually specify where to use as - the directory where we'll have kdevops create additional NVMe drives - for VirtualBox to use. This is today's default given otherwise - we may have to muck with the $HOME directory permissions. - -endchoice - -config VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM - string "VirtualBox storage pool path" - default $(shell, scripts/cwd-append.sh vagrant) if VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM_CWD - default "/opt/virtualbox/storage/" if VIRTUALBOX_STORAGE_POOL_PATH_CUSTOM_MANUAL - help - The path to use for creating additional NVMe drives used by - VirtualBox. kdevops adds a postfix "kdevops" to this directory as it - wants to allow Vagrant full control over that directory. For instance - if this is /opt/virtualbox/storage/ kdevops will have VirtualBox - create the NVMe files under the directory - /opt/virtualbox/storage/kdevops/.vagrant/nvme_disks/guest-hostname/. - -choice - prompt "VirtualBox extra drive format" - default VIRTUALBOX_EXTRA_DRIVE_VDI - -config VIRTUALBOX_EXTRA_DRIVE_VDI - bool "vdi" - help - Select this option if you want to use the vdi format. - -config VIRTUALBOX_EXTRA_DRIVE_VMDK - bool "vmdk" - help - Select this option if you want to use the vmdk format. - -config VIRTUALBOX_EXTRA_DRIVE_VHD - bool "vhd" - help - Select this option if you want to use the vhd format. - -endchoice - -config VIRTUALBOX_EXTRA_DRIVE_FORMAT - string - default "vdi" if VIRTUALBOX_EXTRA_DRIVE_VDI - default "vmdk" if VIRTUALBOX_EXTRA_DRIVE_VMDK - default "vhd" if VIRTUALBOX_EXTRA_DRIVE_VHD - -endif # VAGRANT_VIRTUALBOX - -config HAVE_SUSE_VAGRANT - bool - default $(shell, scripts/check_distro_kconfig.sh suse) - -choice - prompt "Vagrant guest Linux distribution to use" - default VAGRANT_DEBIAN if DISTRO_DEBIAN || DISTRO_UBUNTU - default VAGRANT_FEDORA if DISTRO_FEDORA - default VAGRANT_OPENSUSE if DISTRO_OPENSUSE - default VAGRANT_SUSE if HAVE_SUSE_VAGRANT - -config VAGRANT_DEBIAN - bool "Debian" - select HAVE_CUSTOM_DISTRO_HOST_PREFIX - 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 - select HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - help - This option will set the target guest to Debian. - -config VAGRANT_OPENSUSE - bool "OpenSUSE" - select HAVE_CUSTOM_DISTRO_HOST_PREFIX - 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 - select HAVE_DISTRO_BLKTESTS_PREFERS_MANUAL if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - help - This option will set the target guest to OpenSUSE. - -config VAGRANT_SUSE - bool "SUSE" - depends on HAVE_SUSE_VAGRANT - select HAVE_KDEVOPS_CUSTOM_DEFAULTS - select HAVE_CUSTOM_DISTRO_HOST_PREFIX - select HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX - select HAVE_DISTRO_XFS_PREFERS_MANUAL if FSTESTS_XFS - select HAVE_DISTRO_BTRFS_PREFERS_MANUAL if FSTESTS_BTRFS - select HAVE_DISTRO_BLKTESTS_PREFERS_MANUAL if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_SUSE - select HAVE_DISTRO_PREFERS_REGISTRATION - select HAVE_DISTRO_REG_METHOD_TWOLINE - select VAGRANT_INSTALL_PRIVATE_BOXES - select HAVE_CUSTOM_KDEVOPS_GIT - select HAVE_CUSTOM_KDEVOPS_GIT_DATA - select HAVE_CUSTOM_KDEVOPS_DIR - help - This option will set the target guest to SUSE. There is currently - no scriptable way to download Vagrant images, however the images - are available for download via: - - https://suse.com/download - -config VAGRANT_FEDORA - bool "Fedora (or derived distro)" - select HAVE_VAGRANT_BOX_VERSION - 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 - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - help - This option will set the target guest to be a distro in the Fedora family. - For example, Fedora, CentOS Stream, RHEL, etc. - -config VAGRANT_KDEVOPS - bool "kdevops kernel builds" - select HAVE_CUSTOM_DISTRO_HOST_PREFIX - 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 - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_FSTESTS - help - This option will let you select custom kernel builds by the - kdevops project. The distributions may vary and are are specified. -endchoice - -config HAVE_VAGRANT_BOX_VERSION - bool - default n - -source "vagrant/Kconfig.debian" -source "vagrant/Kconfig.opensuse" -source "vagrant/Kconfig.fedora" -source "vagrant/Kconfig.kdevops" - -if HAVE_SUSE_VAGRANT -source "vagrant/Kconfig.suse" -endif # HAVE_SUSE_VAGRANT - -config VAGRANT_BOX - string - default "debian/testing64" if VAGRANT_DEBIAN_TESTING64 || !VAGRANT - default "debian/bullseye64" if VAGRANT_DEBIAN_BULLSEYE64 - default "debian/buster64" if VAGRANT_DEBIAN_BUSTER64 - default "opensuse/Tumbleweed.x86_64" if VAGRANT_OPENSUSE_X86_64_TW - default VAGRANT_FEDORA_BOX_STRING if VAGRANT_FEDORA - default "generic/rhel8" if VAGRANT_REDHAT_GENERIC_RHEL8_X86_64 - default "generic/rhel9" if VAGRANT_REDHAT_GENERIC_RHEL9_X86_64 - default "opensuse/Leap-15.3.x86_64" if VAGRANT_OPENSUSE_X86_64_LEAP_15_3 - default "opensuse/Leap-15.4.x86_64" if VAGRANT_OPENSUSE_X86_64_LEAP_15_4 - default "Leap-15.4.x86_64" if VAGRANT_OPENSUSE_X86_64_LEAP_15_4 - default "linux-kdevops/debian-next-20220629" if VAGRANT_KDEVOPS_DEBIAN_TESTING64_NEXT_20220629 || !VAGRANT - default "linux-kdevops/debian-xfs-20230427" if VAGRANT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427 || !VAGRANT - default VAGRANT_SUSE_BOX if VAGRANT_SUSE - help - The Vagrant box to use. - -config VAGRANT_BOX_UPDATE_ON_BRINGUP - bool "Run Vagrant box update prior to bringup" - default y - help - When you use Vagrant on a system the target box for the distribution - will first be downloaded on its first use. It will not be updated - until you manually run "vagrant box update" on the respective vagrant - directory. This can mean that if your system first used kdevops in - January 2022 and you are using Debian testing, the old version of - Debian testing as of January 2022 will be used if you try to - instantiate a guest in January 2023. This can means your userspace - may be too old to deal with some new kernel features. An example - is zstd module support for initframfs does not work well with old - userspace on Debian testing. The boot will fail when trying to - run "make linux" and it would not be clear why, the reason would be - a failed ext4 module could not be loaded, in fact no modules could - be loaded by the initramfs. To fix the user experience we ensure we - always run "vagrant box update" as the first step to "make bringup". - - Folks testing stable kernels will use stable distributions, such as - Debian bullseye that don't move userspace as often but in fact welcome - their own stable updates to userspace, and this is why this is kept - as enabled by default. - - You may want to disable this if you don't want to deal with these - updates on bringup, and you want to do the updates on your own. - Note that if you already ran bringup with an old box, you won't - reap benefits of the new one until you "make destroy" and then - "make bringup" again. If you are already on an old box and don't - want to destroy your current box image you can just upgrade userspace - manually by the typical distro means to update itself. For example - on Debian testing that's "apt-get update && apt-get dist-upgrade". - -config VAGRANT_VALIDATE_BEFORE_BRINGUP - bool "Validate Vagrantfile prior to bringup" - default y - help - Folks hacking on the Vagrantfile may want to ensure they validate - the Vagrantfile first. This will allow developers to identify issues - prior to running some real virtualization commands. Enable this by - default as validation is fast and safe. - -config VAGRANT_PREFERRED_KERNEL_CI_SUBJECT_TOPIC - string - default VAGRANT_BOX if VAGRANT_DEBIAN_BUSTER64 - default VAGRANT_BOX if VAGRANT_DEBIAN_BULLSEYE64 - -config HAVE_VAGRANT_BOX_URL - bool - -if HAVE_VAGRANT_BOX_URL - -config VAGRANT_BOX_URL - string - depends on HAVE_VAGRANT_BOX_URL - default VAGRANT_SUSE_BOX_URL if HAVE_SUSE_VAGRANT - default "https://download.opensuse.org/repositories/Virtualization:/Appliances:/Images:/openSUSE-Leap-15.4/images/boxes/Leap-15.4.x86_64.json" if VAGRANT_OPENSUSE_X86_64_LEAP_15_4 - -endif # HAVE_VAGRANT_BOX_URL - -if HAVE_VAGRANT_BOX_VERSION - -config VAGRANT_BOX_VERSION - string - default "1.0.20230425" if VAGRANT_OPENSUSE_X86_64_TW_1020230425 - default "1.0.20220528" if VAGRANT_OPENSUSE_X86_64_TW_1020220528 - default "1.0.20210915" if VAGRANT_OPENSUSE_X86_64_TW_1020210915 - default "1.0.20210203" if VAGRANT_OPENSUSE_X86_64_TW_1020210203 - default "1.0.20200714" if VAGRANT_OPENSUSE_X86_64_TW_1020200714 - default "1.0.20210203" if VAGRANT_OPENSUSE_X86_64_TW_1020210203 - default "0.1.0" if VAGRANT_KDEVOPS_DEBIAN_TESTING64_NEXT_20220629 - help - The Vagrant box version to use. This is set for you depending on the - image you select. You can manually override the version we have last - tested here. - -endif # HAVE_VAGRANT_BOX_VERSION - -if !HAVE_VAGRANT_BOX_VERSION - -config VAGRANT_BOX_VERSION - string - default "" - -endif # !HAVE_VAGRANT_BOX_VERSION -endif # VAGRANT diff --git a/vagrant/Kconfig.debian b/vagrant/Kconfig.debian deleted file mode 100644 index c316e728e..000000000 --- a/vagrant/Kconfig.debian +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-License-Identifier: copyleft-next-0.3.1 -if VAGRANT_DEBIAN - -choice - prompt "Debian release to use" - default VAGRANT_DEBIAN_TESTING64 - -config VAGRANT_DEBIAN_BUSTER64 - bool "debian/buster64" - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - depends on TARGET_ARCH_X86_64 - help - This option will set the target guest to debian/buster64. - -config VAGRANT_DEBIAN_BULLSEYE64 - bool "debian/bullseye64" - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - depends on TARGET_ARCH_X86_64 - help - This option will set the target guest to debian/bullseye64. - -config VAGRANT_DEBIAN_TESTING64 - bool "debian/testing64" - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - depends on TARGET_ARCH_X86_64 - help - This option will set the target guest to debian/testing64. - -endchoice - -config VAGRANT_DEBIAN_BOX_SHORT - string - default "buster64" if VAGRANT_DEBIAN_BUSTER64 - default "bullseye64" if VAGRANT_DEBIAN_BULLSEYE64 - default "testing64" if VAGRANT_DEBIAN_TESTING64 - -endif # VAGRANT_DEBIAN diff --git a/vagrant/Kconfig.fedora b/vagrant/Kconfig.fedora deleted file mode 100644 index 420e6cc81..000000000 --- a/vagrant/Kconfig.fedora +++ /dev/null @@ -1,29 +0,0 @@ -# SPDX-License-Identifier: copyleft-next-0.3.1 -if VAGRANT_FEDORA - -config VAGRANT_FEDORA_BOX_STRING - string "Vagrant box string" - default "fedora/38-cloud-base" - help - This is the box string that vagrant should use. This is typically - something like fedora/??-cloud-base or generic/rhel?. We default - to the latest Fedora cloud-base release. - -config VAGRANT_FEDORA_OLD_RELEASE - bool "Is this an old release (pre-Fedora 32)?" - default n - help - XFS on older Fedora releases lacked support for certain - features. Enabling this will disable testing certain - configurations by default in the fstests workflow. - -config VAGRANT_FEDORA_NEW_RELEASE - bool - default y - depends on !VAGRANT_FEDORA_OLD_RELEASE - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - -endif # VAGRANT_FEDORA diff --git a/vagrant/Kconfig.kdevops b/vagrant/Kconfig.kdevops deleted file mode 100644 index 25398034b..000000000 --- a/vagrant/Kconfig.kdevops +++ /dev/null @@ -1,42 +0,0 @@ -# SPDX-License-Identifier: copyleft-next-0.3.1 -if VAGRANT_KDEVOPS - -choice - prompt "Kdevops release to use" - default VAGRANT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427 - -config VAGRANT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427 - bool "linux-kdevops/debian-xfs-20230427" - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - select HAVE_SUPPORTS_PURE_IOMAP - depends on TARGET_ARCH_X86_64 - help - This option will set the target guest to - linux-kdevops/debian-xfs-20230423 which is based on - debian-testing and only uses XFS for the root fs. - -config VAGRANT_KDEVOPS_DEBIAN_TESTING64_NEXT_20220629 - bool "linux-kdevops/debian-next-20220629" - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - depends on TARGET_ARCH_X86_64 - help - This option will set the target guest to - linux-kdevops/debian-next-20220629 which is based on - debian-testing. It just has linux-next next-20220629. - -endchoice - -config VAGRANT_DEBIAN_BOX_SHORT - string - default "debian-next-20220629" if VAGRANT_KDEVOPS_DEBIAN_TESTING64_NEXT_20220629 - default "debian-xfs-20230427" if VAGRANT_KDEVOPS_DEBIAN_TESTING64_XFS_20230427 - -endif # VAGRANT_KDEVOPS diff --git a/vagrant/Kconfig.opensuse b/vagrant/Kconfig.opensuse deleted file mode 100644 index 6da402755..000000000 --- a/vagrant/Kconfig.opensuse +++ /dev/null @@ -1,144 +0,0 @@ -# SPDX-License-Identifier: copyleft-next-0.3.1 -if VAGRANT_OPENSUSE - -choice - prompt "OpenSUSE release to use" - default VAGRANT_OPENSUSE_X86_64_LEAP_15_3 - -config VAGRANT_OPENSUSE_X86_64_TW - bool "opensuse/Tumbleweed.x86_64" - depends on TARGET_ARCH_X86_64 - help - Enable this to be able to select between the supported OpenSUSE - Tumbleweed releases. - -config VAGRANT_OPENSUSE_X86_64_LEAP_15_4 - bool "opensuse/Leap-15.4.x86_64" - depends on TARGET_ARCH_X86_64 - select HAVE_DISTRO_BTRFS_DISABLES_RAID56 if FSTESTS_BTRFS - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL - select HAVE_DISTRO_BLKTESTS_TEST_BLOCK if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_BLKTESTS_TEST_LOOP if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_BLKTESTS_TEST_NBD if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_PREFERS_BLKTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_PREFERS_BLKTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_PREFERS_REFRESH - select HAVE_DISTRO_PREFERS_UPDATE - select HAVE_DISTRO_PREFERS_INSTALL_KDEVTOOLS - select HAVE_DISTRO_PREFERS_ANSIBLE_PYTHON2 if !HAVE_DISTRO_PREFERS_DISABLE_ANSIBLE && KDEVOPS_ANSIBLE_PROVISION_ENABLE - help - This enables the OpenSUSE Leap 15.4 release. - -config VAGRANT_OPENSUSE_X86_64_LEAP_15_3 - bool "opensuse/Leap-15.3.x86_64" - depends on TARGET_ARCH_X86_64 - select HAVE_DISTRO_BTRFS_DISABLES_RAID56 if FSTESTS_BTRFS - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG - select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL - select HAVE_DISTRO_BLKTESTS_TEST_BLOCK if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_BLKTESTS_TEST_LOOP if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_BLKTESTS_TEST_NBD if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_PREFERS_BLKTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_PREFERS_BLKTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_BLKTESTS - select HAVE_DISTRO_PREFERS_REFRESH - select HAVE_DISTRO_PREFERS_UPDATE - select HAVE_DISTRO_PREFERS_INSTALL_KDEVTOOLS - select HAVE_DISTRO_PREFERS_ANSIBLE_PYTHON2 if !HAVE_DISTRO_PREFERS_DISABLE_ANSIBLE && KDEVOPS_ANSIBLE_PROVISION_ENABLE - help - This enables the OpenSUSE Leap 15.3 release. - -endchoice - -if VAGRANT_OPENSUSE_X86_64_TW - -choice - prompt "opensuse/Tumbleweed.x86_64 version to use" - default VAGRANT_OPENSUSE_X86_64_TW_1020230529 - -config VAGRANT_OPENSUSE_X86_64_TW_1020230529 - bool "opensuse/Tumbleweed.x86_64 1.0.20230529" - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - help - This option will set the target guest to opensuse/Tumbleweed.x86_64 - release 1.0.20230529. - - -config VAGRANT_OPENSUSE_X86_64_TW_1020230425 - bool "opensuse/Tumbleweed.x86_64 1.0.20230425" - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - help - This option will set the target guest to opensuse/Tumbleweed.x86_64 - release 1.0.20230425. - -config VAGRANT_OPENSUSE_X86_64_TW_1020220528 - bool "opensuse/Tumbleweed.x86_64 1.0.20220528" - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - help - This option will set the target guest to opensuse/Tumbleweed.x86_64 - release 1.0.20220528. - -config VAGRANT_OPENSUSE_X86_64_TW_1020210915 - bool "opensuse/Tumbleweed.x86_64 1.0.20210915 " - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - help - This option will set the target guest to opensuse/Tumbleweed.x86_64 - release 1.0.20210915. - -config VAGRANT_OPENSUSE_X86_64_TW_1020210203 - bool "opensuse/Tumbleweed.x86_64 1.0.20210203 " - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - help - This option will set the target guest to opensuse/Tumbleweed.x86_64 - release 1.0.20210203. - -config VAGRANT_OPENSUSE_X86_64_TW_1020200714 - bool "opensuse/Tumbleweed.x86_64 1.0.20200714" - select HAVE_VAGRANT_BOX_VERSION - select HAVE_DISTRO_XFS_SUPPORTS_CRC if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_EXTERNAL_LOG if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_REFLINKS if FSTESTS_XFS - select HAVE_DISTRO_XFS_SUPPORTS_BIGBLOCKS if FSTESTS_XFS - help - This option will set the target guest to opensuse/Tumbleweed.x86_64 - release 1.0.20200714. - -endchoice - -endif # VAGRANT_OPENSUSE_X86_64_TW - -config VAGRANT_OPENSUSE_BOX_SHORT - string - default "tw" if VAGRANT_OPENSUSE_X86_64_TW - default "leap15sp3" if VAGRANT_OPENSUSE_X86_64_LEAP_15_3 - default "leap15sp4" if VAGRANT_OPENSUSE_X86_64_LEAP_15_4 - -endif # VAGRANT_OPENSUSE diff --git a/vagrant/Kconfig.pcie_passthrough_libvirt b/vagrant/Kconfig.pcie_passthrough_libvirt deleted file mode 100644 index 62d3a86d4..000000000 --- a/vagrant/Kconfig.pcie_passthrough_libvirt +++ /dev/null @@ -1,53 +0,0 @@ -# SPDX-License-Identifier: copyleft-next-0.3.1 - -config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH - bool "Enable libvirt PCIE passthrough support" - default n - help - Enable this if you want to enable PCI-E passthrough onto target - guests. - -if KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH - -choice - prompt "What guest target type to passthrough to" - default KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_FIRST - -config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_FIRST - bool "Onto the first guest" - help - Select this option if you want to passthrough PCI-E devices selected - onto the first guest that kdevops generates on the nodes list. - -config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_SPECIFIC - bool "Onto a specific host name you'll specify" - help - Select this option if you want to passthrough PCI-E devices onto - a guest hostname. This means you have foresight into the future - generated kdevops nodes that will be available and you will manually - specify a target hostname you want to use to pass on the selected - PCI-E devices to. - -config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_EACH - bool "Per device specific host" - help - Select this option if you want to have the option passthrough PCI-E - devices to different target guests. This will allow you to have the - ability to specify for each found PCI-E device which, to which target - guest you want to enable the device to passthrough onto. - -endchoice - -config KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TARGET_HOSTNAME - string "Guest target hostname to passthrough PCI-E devices to" - default "enter-valid-hostname" - depends on KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH_TYPE_SPECIFIC - help - Set this to the hostname of the target guest you want to passthrough - the enabled PCI-E devices to. - -menu "Select which PCI-E devices to passthrough" -source "vagrant/Kconfig.passthrough_libvirt.generated" -endmenu - -endif # KDEVOPS_LIBVIRT_PCIE_PASSTHROUGH diff --git a/vagrant/Kconfig.suse b/vagrant/Kconfig.suse deleted file mode 100644 index e69de29bb..000000000 diff --git a/workflows/blktests/Kconfig b/workflows/blktests/Kconfig index 6fea67718..f19ced9ee 100644 --- a/workflows/blktests/Kconfig +++ b/workflows/blktests/Kconfig @@ -20,7 +20,6 @@ config HAVE_MIRROR_DBENCH config BLKTESTS_DBENCH_GIT_URL string default DEFAULT_DBENCH_URL if !HAVE_MIRROR_DBENCH - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/dbench.git) if HAVE_MIRROR_XFSDUMP && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/dbench.git) if HAVE_MIRROR_XFSDUMP && GUESTFS config BLKTESTS_WATCHDOG @@ -131,10 +130,8 @@ config BLKTESTS_WATCHDOG_RESET_HUNG_SYSTEMS have to also implement a way to try to capture kernel logs before a reset. - We currently only enable this for Vagrant provisioning, given we have - to figure out a unified way to express a reset for cloud solution and - also figure out a way to enable this for bare metal. For vagrant we - currently use 'virsh reset' and so this works only if on libvirt. + We currently rely on 'virsh reset' for libvirt based setups. Support + for cloud solutions or bare metal can be extended later as needed. endif # BLKTESTS_WATCHDOG @@ -146,7 +143,6 @@ config HAVE_MIRROR_BLKTESTS config BLKTESTS_GIT string "The blktests git tree to clone" default DEFAULT_BLKTESTS_URL if !HAVE_MIRROR_BLKTESTS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/blktests.git) if HAVE_MIRROR_BLKTESTS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/blktests.git) if HAVE_MIRROR_BLKTESTS && GUESTFS help The blktests git tree to clone. @@ -167,7 +163,6 @@ config HAVE_MIRROR_BLKTRACE config BLKTRACE_GIT string "The blktrace git tree to clone" default DEFAULT_BLKTRACE_URL if !HAVE_MIRROR_BLKTRACE - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/blktrace.git) if HAVE_MIRROR_BLKTRACE && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/blktrace.git) if HAVE_MIRROR_BLKTRACE && GUESTFS help The blktrace git tree to clone. diff --git a/workflows/demos/reboot-limit/Makefile b/workflows/demos/reboot-limit/Makefile index a6b4aaf78..3aebb0462 100644 --- a/workflows/demos/reboot-limit/Makefile +++ b/workflows/demos/reboot-limit/Makefile @@ -7,7 +7,7 @@ # This simple workflow relies on the default setting of the variable # KDEVOPS_NODES_TEMPLATE which to generate your target nodes. This can -# either be used by vagrant or terraform when building the nodes it will +# either be used by guestfs or terraform when building the nodes it will # create for bringup. The template file relies on jinja2 templating for # its parsing and generation and we rely on the ansible template module # to process this template file. diff --git a/workflows/fstests/Kconfig b/workflows/fstests/Kconfig index 78fafbcce..4eb133e99 100644 --- a/workflows/fstests/Kconfig +++ b/workflows/fstests/Kconfig @@ -324,11 +324,9 @@ config FSTESTS_GIT string "The fstests git tree to clone" output yaml default DEFAULT_FSTESTS_HTTPS_URL if !GIT_ALTERNATIVES && !HAVE_MIRROR_FSTESTS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/fstests.git) if !GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/fstests.git) if !GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && GUESTFS default DEFAULT_FSTESTS_KDEVOPS_GITHUB_HTTPS_URL if GIT_LINUX_KDEVOPS_GITHUB && !HAVE_MIRROR_KDEVOPS_FSTESTS default DEFAULT_FSTESTS_KDEVOPS_GITLAB_HTTPS_URL if GIT_LINUX_KDEVOPS_GITLAB && !HAVE_MIRROR_KDEVOPS_FSTESTS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/kdevops/fstests.git) if GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/kdevops/fstests.git) if GIT_ALTERNATIVES && HAVE_MIRROR_FSTESTS && GUESTFS default "https://github.com/btrfs/fstests.git" if FSTESTS_BTRFS help diff --git a/workflows/fstests/xfs/Kconfig b/workflows/fstests/xfs/Kconfig index 318850455..7c1303450 100644 --- a/workflows/fstests/xfs/Kconfig +++ b/workflows/fstests/xfs/Kconfig @@ -43,7 +43,6 @@ config HAVE_MIRROR_XFSPROGS config FSTESTS_XFS_XFSPROGS_GIT string "The Xfsprogs git tree to clone" default DEFAULT_XFSPROGS_URL if !HAVE_MIRROR_XFSPROGS - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/xfsprogs-dev.git) if HAVE_MIRROR_XFSPROGS && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/xfsprogs-dev.git) if HAVE_MIRROR_XFSPROGS && GUESTFS depends on FSTESTS_XFS_BUILD_CUSTOM_XFSPROGS help @@ -83,7 +82,6 @@ config FSTESTS_XFSDUMP_GIT_URL string "The xfsdump git tree to clone" depends on FSTESTS_XFS_BUILD_XFSDUMP default DEFAULT_XFSDUMP_URL if !HAVE_MIRROR_XFSDUMP - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/xfsdump-dev.git) if HAVE_MIRROR_XFSDUMP && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/xfsdump-dev.git) if HAVE_MIRROR_XFSDUMP && GUESTFS help The xfsdump git tree to clone diff --git a/workflows/linux/Kconfig.linus b/workflows/linux/Kconfig.linus index b673a50cc..b16696a46 100644 --- a/workflows/linux/Kconfig.linus +++ b/workflows/linux/Kconfig.linus @@ -48,7 +48,6 @@ config BOOTLINUX_TREE_LINUS_NAME config BOOTLINUX_TREE_LINUS_URL string default DEFAULT_TORVALDS_HTTPS_URL if !USE_LOCAL_LINUX_MIRROR - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/linux.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS default "/mirror/linux.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P diff --git a/workflows/linux/Kconfig.mcgrof b/workflows/linux/Kconfig.mcgrof index 811d8392d..ec7ebff07 100644 --- a/workflows/linux/Kconfig.mcgrof +++ b/workflows/linux/Kconfig.mcgrof @@ -29,7 +29,6 @@ config BOOTLINUX_TREE_MCGROF_URL default "/mirror/mcgrof-next.git" if BOOTLINUX_TREE_MCGROF_NEXT && USE_LIBVIRT_MIRROR && BOOTLINUX_9P default DEFAULT_MCGROF_LINUS_GIT_URL if BOOTLINUX_TREE_MCGROF_LINUS && !USE_LOCAL_LINUX_MIRROR default "/mirror/mcgrof-linus.git" if BOOTLINUX_TREE_MCGROF_LINUS && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/mcgrof-linus.git) if BOOTLINUX_TREE_MCGROF_LINUS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/mcgrof-next.git) if BOOTLINUX_TREE_MCGROF_NEXT && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_MCGROF_LINUS || BOOTLINUX_TREE_MCGROF_NEXT diff --git a/workflows/linux/Kconfig.modules b/workflows/linux/Kconfig.modules index 720c8db13..4dd827d26 100644 --- a/workflows/linux/Kconfig.modules +++ b/workflows/linux/Kconfig.modules @@ -14,7 +14,6 @@ config BOOTLINUX_TREE_MODULES_URL string default DEFAULT_MODULES_GIT_URL if BOOTLINUX_TREE_VFS && !USE_LOCAL_LINUX_MIRROR default "/mirror/linux-modules.git" if BOOTLINUX_TREE_MODULES && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/modules.git) if BOOTLINUX_TREE_MODULES && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/modules.git) if BOOTLINUX_TREE_MODULES && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_MODULES diff --git a/workflows/linux/Kconfig.next b/workflows/linux/Kconfig.next index abc49266a..0a7ceeaf2 100644 --- a/workflows/linux/Kconfig.next +++ b/workflows/linux/Kconfig.next @@ -10,7 +10,6 @@ config BOOTLINUX_TREE_NEXT_NAME config BOOTLINUX_TREE_NEXT_URL string default DEFAULT_LINUX_NEXT_GIT_URL if !USE_LOCAL_LINUX_MIRROR - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/linux-next.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux-next.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS default "/mirror/linux-next.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P diff --git a/workflows/linux/Kconfig.stable b/workflows/linux/Kconfig.stable index cf317b848..0ee82e966 100644 --- a/workflows/linux/Kconfig.stable +++ b/workflows/linux/Kconfig.stable @@ -25,7 +25,6 @@ config BOOTLINUX_TREE_STABLE_NAME config BOOTLINUX_TREE_STABLE_URL string default DEFAULT_STABLE_HTTPS_URL if !USE_LOCAL_LINUX_MIRROR - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/linux-stable.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/linux-stable.git) if USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS default "/mirror/linux-stable.git" if USE_LIBVIRT_MIRROR && BOOTLINUX_9P diff --git a/workflows/linux/Kconfig.vfs b/workflows/linux/Kconfig.vfs index 78a41f922..5ff012b5f 100644 --- a/workflows/linux/Kconfig.vfs +++ b/workflows/linux/Kconfig.vfs @@ -14,7 +14,6 @@ config BOOTLINUX_TREE_VFS_URL string default DEFAULT_VFS_GIT_URL if BOOTLINUX_TREE_VFS && !USE_LOCAL_LINUX_MIRROR default "/mirror/vfs.git" if BOOTLINUX_TREE_VFS && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/vfs.git) if BOOTLINUX_TREE_VFS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/vfs.git) if BOOTLINUX_TREE_MCGROF_NEXT && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_VFS diff --git a/workflows/linux/Kconfig.xfs b/workflows/linux/Kconfig.xfs index 91817cf2f..129d178cf 100644 --- a/workflows/linux/Kconfig.xfs +++ b/workflows/linux/Kconfig.xfs @@ -14,7 +14,6 @@ config BOOTLINUX_TREE_XFS_URL string default DEFAULT_XFS_GIT_URL if BOOTLINUX_TREE_XFS && !USE_LOCAL_LINUX_MIRROR default "/mirror/xfs-linux.git" if BOOTLINUX_TREE_XFS && USE_LIBVIRT_MIRROR && BOOTLINUX_9P - default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_VAGRANT) /mirror/xfs-linux.git) if BOOTLINUX_TREE_XFS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && VAGRANT default $(shell, scripts/append-makefile-vars.sh git:// $(KDEVOPS_DEFAULT_BRIDGE_IP_GUESTFS) /mirror/xfs-linux.git) if BOOTLINUX_TREE_XFS && USE_LIBVIRT_MIRROR && !BOOTLINUX_9P && GUESTFS endif # BOOTLINUX_TREE_XFS