mirror of
https://github.com/khuedoan/homelab.git
synced 2025-03-10 04:47:09 +07:00
Remove test environent
Hard to keep it up to date, may add it back later
This commit is contained in:
parent
6a7bfa4414
commit
0f83f5b9a2
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
.vagrant/
|
||||
.venv/
|
||||
build/
|
||||
metal/secrets/
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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
|
@ -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
22
test/Vagrantfile
vendored
@ -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
|
@ -1 +0,0 @@
|
||||
../metal/ansible.cfg
|
@ -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
|
@ -1 +0,0 @@
|
||||
../metal/main.yml
|
@ -1 +0,0 @@
|
||||
../metal/requirements.txt
|
@ -1 +0,0 @@
|
||||
../metal/roles/
|
Loading…
Reference in New Issue
Block a user