feat(install): Add multiple installation processes
This commit is contained in:
parent
0bbd442111
commit
5ca5ee1214
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.vagrant
|
18
Makefile
Normal file
18
Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
install:
|
||||||
|
vagrant up
|
||||||
|
cd ansible && $(MAKE) install
|
||||||
|
make get_k3s_credentials
|
||||||
|
|
||||||
|
k3s_reset:
|
||||||
|
cd ansible && $(MAKE) uninstall
|
||||||
|
cd ansible && $(MAKE) k3s
|
||||||
|
get_k3s_credentials
|
||||||
|
|
||||||
|
destroy:
|
||||||
|
vagrant destroy -f
|
||||||
|
|
||||||
|
get_k3s_credentials:
|
||||||
|
vagrant ssh -c "sudo cat /home/creator/.kube/config" hb-wide-1 > ~/.kube/config-halia
|
||||||
|
sed -i 's/10.20.*:/10.10.0.101:/g' ~/.kube/config-halia
|
||||||
|
kube-merge
|
||||||
|
kubectl get nodes --context halia
|
30
Vagrantfile
vendored
30
Vagrantfile
vendored
@ -1,25 +1,33 @@
|
|||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "debian/bullseye64"
|
config.vm.box = "debian/bullseye64"
|
||||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
config.vm.synced_folder '.', '/vagrant', disabled: true # Allows WSL call to work within WSL filesystem
|
||||||
config.vm.provision :shell, path: "https://git.halis.io/athens-school/ISO-repository/raw/branch/master/quick-installer.sh", run: "always"
|
config.vm.provision :shell, path: "https://git.halis.io/athens-school/ISO-repository/raw/branch/master/quick-installer.sh", run: "always"
|
||||||
|
|
||||||
config.vm.network "public_network", bridge: "Intel(R) I211 Gigabit Network Connection"
|
|
||||||
config.vm.provider "virtualbox" do |v|
|
config.vm.provider "virtualbox" do |v|
|
||||||
v.memory = 1024
|
v.memory = 1024
|
||||||
v.cpus = 1
|
v.cpus = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
(1..3).each do |i|
|
boxes = [
|
||||||
config.vm.define "hb-slim-#{i}"
|
{ :name => "hb-slim-1", :mac => "080027117BED"},
|
||||||
end
|
{ :name => "hb-slim-2", :mac => "0800276FAEEC"},
|
||||||
|
{ :name => "hb-slim-3", :mac => "080027202C0B"},
|
||||||
|
{ :name => "hb-wide-1", :mac => "080027F3F85F", :cpus => 2, :memory => 4096},
|
||||||
|
{ :name => "hb-wide-2", :mac => "080027A74FDB", :cpus => 2, :memory => 4096},
|
||||||
|
]
|
||||||
|
|
||||||
(1..2).each do |i|
|
boxes.each do |opts|
|
||||||
config.vm.define "hb-wide-#{i}" do |wide|
|
config.vm.define opts[:name] do |box|
|
||||||
wide.vm.provider "virtualbox" do |v|
|
box.vm.hostname = opts[:name]
|
||||||
v.memory = 4096
|
box.vm.network "public_network", bridge: "Intel(R) I211 Gigabit Network Connection", :mac => opts[:mac]
|
||||||
v.cpus = 2
|
box.vm.provider "virtualbox" do |v|
|
||||||
|
if !opts[:memory].nil?
|
||||||
|
v.memory = opts[:memory]
|
||||||
|
end
|
||||||
|
if !opts[:cpus].nil?
|
||||||
|
v.cpus = opts[:cpus]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user