Remove test environent

Hard to keep it up to date, may add it back later
This commit is contained in:
Khue Doan 2021-04-18 23:53:19 +07:00
parent 6a7bfa4414
commit 0f83f5b9a2
10 changed files with 0 additions and 82 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
.vagrant/
.venv/
build/
metal/secrets/

View File

@ -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:

View File

@ -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

View File

@ -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
```

22
test/Vagrantfile vendored
View File

@ -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

View File

@ -1 +0,0 @@
../metal/ansible.cfg

View File

@ -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

View File

@ -1 +0,0 @@
../metal/main.yml

View File

@ -1 +0,0 @@
../metal/requirements.txt

View File

@ -1 +0,0 @@
../metal/roles/