From 0f83f5b9a2cf3aff792044deb5c06d5311496d8a Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sun, 18 Apr 2021 23:53:19 +0700 Subject: [PATCH] Remove test environent Hard to keep it up to date, may add it back later --- .gitignore | 1 - README.md | 1 - test/Makefile | 28 ---------------------------- test/README.md | 13 ------------- test/Vagrantfile | 22 ---------------------- test/ansible.cfg | 1 - test/hosts.ini | 13 ------------- test/main.yml | 1 - test/requirements.txt | 1 - test/roles | 1 - 10 files changed, 82 deletions(-) delete mode 100644 test/Makefile delete mode 100644 test/README.md delete mode 100644 test/Vagrantfile delete mode 120000 test/ansible.cfg delete mode 100644 test/hosts.ini delete mode 120000 test/main.yml delete mode 120000 test/requirements.txt delete mode 120000 test/roles diff --git a/.gitignore b/.gitignore index 30b1347e..3b825223 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.vagrant/ .venv/ build/ metal/secrets/ diff --git a/README.md b/README.md index d8b52265..1b72c191 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ For the controller (to run Ansible, stateless PXE server, Terraform...): - SSH keys in `~/.ssh/{id_rsa,id_rsa.pub}` - Docker with `host` networking driver (which means [only Docker on Linux hosts](https://docs.docker.com/network/host/)) -- `vagrant` (optional, to create a local [test environment](./test)) For bare metal nodes: diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index 9f3c6f7f..00000000 --- a/test/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -.POSIX: - -default: init snapshot metal infra - -init: - vagrant up - -snapshot: - vagrant snapshot save init - -metal: - python3 -m venv .venv \ - && . .venv/bin/activate \ - && pip3 install --upgrade pip \ - && pip3 install -r requirements.txt \ - && ansible-playbook --inventory hosts.ini main.yml - -infra: - echo infra - -stop: - vagrant halt - -restore: - vagrant snapshot restore init - -clean: - vagrant destroy -f diff --git a/test/README.md b/test/README.md deleted file mode 100644 index 030e1527..00000000 --- a/test/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Test - -Create a quick and dirty local test environment (requires `vagrant`) - -```sh -make -``` - -When you're done, clean it up - -```sh -make clean -``` diff --git a/test/Vagrantfile b/test/Vagrantfile deleted file mode 100644 index 302cecab..00000000 --- a/test/Vagrantfile +++ /dev/null @@ -1,22 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.box = "ubuntu/focal64" - - (0..1).each do |i| - config.vm.define "metal#{i}" do |metal| - metal.vm.network "private_network", ip: "192.168.50.#{i+2}" - end - end - - config.vm.provider "virtualbox" do |vb| - vb.cpus = 2 - vb.memory = "4096" - end - - config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "/tmp/id_rsa.pub" - - config.vm.provision "shell", inline: <<-SHELL - apt-get update - mkdir /root/.ssh - cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys - SHELL -end diff --git a/test/ansible.cfg b/test/ansible.cfg deleted file mode 120000 index 97873238..00000000 --- a/test/ansible.cfg +++ /dev/null @@ -1 +0,0 @@ -../metal/ansible.cfg \ No newline at end of file diff --git a/test/hosts.ini b/test/hosts.ini deleted file mode 100644 index be41300b..00000000 --- a/test/hosts.ini +++ /dev/null @@ -1,13 +0,0 @@ -[controller] -localhost ansible_connection=local - -[metal] -metal0 ansible_host=192.168.50.2 -metal1 ansible_host=192.168.50.3 - -[metal:vars] -ansible_user=root -subnet=192.168.50.0/24 - -[lxd] -tfstate ansible_connection=lxd diff --git a/test/main.yml b/test/main.yml deleted file mode 120000 index d4767227..00000000 --- a/test/main.yml +++ /dev/null @@ -1 +0,0 @@ -../metal/main.yml \ No newline at end of file diff --git a/test/requirements.txt b/test/requirements.txt deleted file mode 120000 index c0199a7c..00000000 --- a/test/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -../metal/requirements.txt \ No newline at end of file diff --git a/test/roles b/test/roles deleted file mode 120000 index 987abe2e..00000000 --- a/test/roles +++ /dev/null @@ -1 +0,0 @@ -../metal/roles/ \ No newline at end of file