From bafb49b7379fd51f05f5fa9cd3af3f9a25cc4a75 Mon Sep 17 00:00:00 2001 From: Tam Mach Date: Thu, 22 Aug 2024 20:17:42 +1000 Subject: [PATCH] cleanup: Remove vagrant related file The Vagrant VM is no longer maintained in favour of kind cluster (local dev) and little vm helpers (CI), hence it's better to remove all vagrant related files. Signed-off-by: Tam Mach --- CODEOWNERS | 4 - .../contributing/development/dev_setup.rst | 372 ---------- .../contributing/testing/e2e_legacy.rst | 8 - Vagrantfile | 369 ---------- contrib/scripts/add_vagrant_box.sh | 184 ----- contrib/vagrant/.gitignore | 3 - contrib/vagrant/build.sh | 16 - contrib/vagrant/deployments/.gitignore | 3 - .../vagrant/deployments/coredns-cm.yaml.sed | 33 - .../deployments/coredns-controller.yaml | 107 --- contrib/vagrant/deployments/coredns-sa.yaml | 56 -- .../vagrant/deployments/coredns-svc.yaml.sed | 37 - contrib/vagrant/nftables.rules | 1 - contrib/vagrant/restart-vars | 12 - contrib/vagrant/scripts/.gitignore | 1 - contrib/vagrant/scripts/00-create-certs.sh | 84 --- contrib/vagrant/scripts/01-install-etcd.sh | 83 --- .../scripts/02-install-kubernetes-master.sh | 200 ------ .../scripts/03-install-kubernetes-worker.sh | 375 ---------- contrib/vagrant/scripts/04-install-kubectl.sh | 85 --- contrib/vagrant/scripts/05-install-cilium.sh | 17 - contrib/vagrant/scripts/06-install-coredns.sh | 38 - contrib/vagrant/scripts/08-guestbook.sh | 31 - contrib/vagrant/scripts/cert-gen-helpers.bash | 293 -------- contrib/vagrant/scripts/helpers.bash | 124 ---- contrib/vagrant/start.sh | 664 ------------------ test/Makefile | 1 - test/Vagrantfile | 276 -------- test/get-gh-comment-info.py | 17 - test/get-vagrant-kubeconfig.sh | 7 - test/packet/.gitignore | 4 - test/packet/README.md | 31 - test/packet/main.tf | 69 -- test/packet/scripts/install.sh | 72 -- test/post_build_agent.sh | 17 - test/vagrant-ci-start.sh | 52 -- test/vagrant-local-create-box.sh | 22 - test/vagrant-local-start-runtime.sh | 25 - test/vagrant-local-start.sh | 41 -- test/vagrant_cleanup.sh | 13 - tools/dev-doctor/rootcmd.go | 20 - vagrant_box_defaults.rb | 12 - 42 files changed, 3879 deletions(-) delete mode 100644 Vagrantfile delete mode 100755 contrib/scripts/add_vagrant_box.sh delete mode 100644 contrib/vagrant/.gitignore delete mode 100755 contrib/vagrant/build.sh delete mode 100644 contrib/vagrant/deployments/.gitignore delete mode 100644 contrib/vagrant/deployments/coredns-cm.yaml.sed delete mode 100644 contrib/vagrant/deployments/coredns-controller.yaml delete mode 100644 contrib/vagrant/deployments/coredns-sa.yaml delete mode 100644 contrib/vagrant/deployments/coredns-svc.yaml.sed delete mode 100644 contrib/vagrant/nftables.rules delete mode 100644 contrib/vagrant/restart-vars delete mode 100644 contrib/vagrant/scripts/.gitignore delete mode 100755 contrib/vagrant/scripts/00-create-certs.sh delete mode 100755 contrib/vagrant/scripts/01-install-etcd.sh delete mode 100755 contrib/vagrant/scripts/02-install-kubernetes-master.sh delete mode 100755 contrib/vagrant/scripts/03-install-kubernetes-worker.sh delete mode 100755 contrib/vagrant/scripts/04-install-kubectl.sh delete mode 100755 contrib/vagrant/scripts/05-install-cilium.sh delete mode 100755 contrib/vagrant/scripts/06-install-coredns.sh delete mode 100755 contrib/vagrant/scripts/08-guestbook.sh delete mode 100644 contrib/vagrant/scripts/cert-gen-helpers.bash delete mode 100644 contrib/vagrant/scripts/helpers.bash delete mode 100755 contrib/vagrant/start.sh delete mode 100644 test/Vagrantfile delete mode 100644 test/get-gh-comment-info.py delete mode 100755 test/get-vagrant-kubeconfig.sh delete mode 100644 test/packet/.gitignore delete mode 100644 test/packet/README.md delete mode 100644 test/packet/main.tf delete mode 100644 test/packet/scripts/install.sh delete mode 100755 test/post_build_agent.sh delete mode 100755 test/vagrant-ci-start.sh delete mode 100755 test/vagrant-local-create-box.sh delete mode 100755 test/vagrant-local-start-runtime.sh delete mode 100755 test/vagrant-local-start.sh delete mode 100755 test/vagrant_cleanup.sh delete mode 100644 vagrant_box_defaults.rb diff --git a/CODEOWNERS b/CODEOWNERS index 15dfacbfe3d6f..ea55a141315c4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -332,7 +332,6 @@ Makefile* @cilium/build /clustermesh-apiserver @cilium/sig-clustermesh /contrib/ @cilium/contributing /contrib/containerlab/ @cilium/sig-bgp -/contrib/vagrant/ @cilium/contributing /contrib/coccinelle/ @cilium/sig-datapath /daemon/ @cilium/sig-agent /daemon/cmd/datapath.go @cilium/sig-datapath @@ -643,11 +642,8 @@ Makefile* @cilium/build /test/runtime/chaos_agent.go @cilium/sig-agent @cilium/ci-structure /tools/ @cilium/contributing /USERS.md @cilium/community -Vagrantfile @cilium/ci-structure -/Vagrantfile @cilium/contributing /go.sum @cilium/vendor /go.mod @cilium/vendor -/vagrant_box_defaults.rb @cilium/ci-structure /vendor/ @cilium/vendor /VERSION @cilium/release-managers /.clang-format @cilium/contributing diff --git a/Documentation/contributing/development/dev_setup.rst b/Documentation/contributing/development/dev_setup.rst index e3fba64ed81fd..965b746f29d3c 100644 --- a/Documentation/contributing/development/dev_setup.rst +++ b/Documentation/contributing/development/dev_setup.rst @@ -91,16 +91,6 @@ For `integration_testing`, you will need to run ``docker`` without privileges. You can usually achieve this by adding your current user to the ``docker`` group. -Finally, in order to run Cilium locally on VMs, you need: - -+------------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ -| Dependency | Version / Commit ID | Download Command | -+============================================================+=======================+================================================================================+ -| `Vagrant `_ | >= 2.0 | `Vagrant Install Instructions `_ | -+------------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ -| `VirtualBox `_ | >= 5.2 | N/A (OS-specific) | -+------------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ - Kind-based Setup (preferred) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -183,363 +173,6 @@ the clusters it creates. The following parameters are the most commonly used: For more environment variables, see ``contrib/scripts/kind.sh``. -Vagrant Setup -~~~~~~~~~~~~~ - -The setup for the Vagrantfile in the root of the Cilium tree depends on a -number of environment variables and network setup that are managed via -``contrib/vagrant/start.sh``. - -Option 1 - Using the Provided Vagrantfiles -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -To bring up a Vagrant VM with Cilium plus dependencies installed, run: - -.. code-block:: shell-session - - $ contrib/vagrant/start.sh [vm_name] - -This will create and run a vagrant VM based on the base box ``cilium/ubuntu``. -The ``vm_name`` argument is optional and allows you to add new nodes to an -existing cluster. For example, to add a net-next VM to a one-node cluster: - -.. code-block:: shell-session - - $ K8S=1 NWORKERS=1 NETNEXT=1 ./contrib/vagrant/start.sh k8s2+ - -Cilium Vagrantfiles look for a file ``.devvmrc`` in the root of your -Cilium repository. This file is ignored for Git, so it does not exist -by default. If this file exists and is executable, it will be executed -in the beginning of the VM bootstrap. This allows you to automatically -customize the new VM, e.g., with your personal Git configuration. You -may also want to add any local entries you need in ``/etc/hosts``, -etc. - -For example, you could have something like this in your ``.devvmrc``: - -.. code-block:: bash - - #!/usr/bin/env bash - - git config --global user.name "Firstname Lastname" - git config --global user.email developer@company.com - - sudo tee -a /etc/hosts <= 2.0.0" - -if ARGV.first == "up" && ENV['CILIUM_SCRIPT'] != 'true' - raise Vagrant::Errors::VagrantError.new, </dev/null - -res=0 -while [ "$res" == "0" ]; do - VBoxManage natnetwork remove --netname natnet$i - res=$? - i=$((i+1)) -done 2>/dev/null -SCRIPT - -$bootstrap = <