Skip to content

Commit

Permalink
🔧 upd: files
Browse files Browse the repository at this point in the history
  • Loading branch information
marcossilvestrini committed Apr 3, 2024
1 parent 7c81eac commit 8036b34
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 56 deletions.
2 changes: 1 addition & 1 deletion configs/linux/rke2/token-first-node
Original file line number Diff line number Diff line change
@@ -1 +1 @@
K10c5389abb011ad31017b1c4ddf4beb59f7aadbc3f6d24fce412d680f50f2c034a::server:ed17c39e7db4a13575e029845cbac4fc
K106954b54df7281f2a665427c69fe0c8b2d9da364a9f76aa3c7b72010970eecccd::server:1e6355b3bb845cc26ccb6c5d435179ac
Empty file.
58 changes: 10 additions & 48 deletions scripts/windows/commons/vagrant_up_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,56 +73,19 @@ setx VAGRANT_HOME "$vagrantHome" >$null
Copy-Item -Force "$baseProject\index.html" -Destination "$baseProject\apps\app-silvestrini"
Copy-Item -Force -Recurse "$baseProject\images" -Destination "$baseProject\apps\app-silvestrini"

# Fix linux scripts


# Up kubernetes stack
$kubernetes = "$baseVagrantfile"
Set-Location $kubernetes
# vagrant up infra-server01
# vagrant up load-balance
# vagrant up control-plane01
# vagrant up control-plane02
# vagrant up control-plane03
# vagrant up worker01
# vagrant up worker02
# vagrant up worker03
# vagrant up managment
# Copy-Item .\.vagrant\machines\infra-server01\virtualbox\private_key $vagrantPK\infra-server01
# Copy-Item .\.vagrant\machines\load-balance\virtualbox\private_key $vagrantPK\load-balance
# Copy-Item .\.vagrant\machines\managment\virtualbox\private_key $vagrantPK\managment
# Copy-Item .\.vagrant\machines\control-plane01\virtualbox\private_key $vagrantPK\control-plane01
# Copy-Item .\.vagrant\machines\control-plane02\virtualbox\private_key $vagrantPK\control-plane02
# Copy-Item .\.vagrant\machines\control-plane03\virtualbox\private_key $vagrantPK\control-plane03
# Copy-Item .\.vagrant\machines\worker01\virtualbox\private_key $vagrantPK\worker01
# Copy-Item .\.vagrant\machines\worker02\virtualbox\private_key $vagrantPK\worker02
# Copy-Item .\.vagrant\machines\worker03\virtualbox\private_key $vagrantPK\worker03

# Infra server
Start-Process -FilePath "vagrant" -ArgumentList "up infra-server01" -NoNewWindow -Wait
Copy-Item -Path ".\.vagrant\machines\infra-server01\virtualbox\private_key" -Destination "$vagrantPK\infra-server01"

# Loadbalanc\proxy
Start-Process -FilePath "vagrant" -ArgumentList "up load-balance" -NoNewWindow -Wait
Copy-Item -Path ".\.vagrant\machines\load-balance\virtualbox\private_key" -Destination "$vagrantPK\load-balance"

# Control Planes
$control_planes = @("control-plane01", "control-plane02", "control-plane03")
foreach ($control_plane in $control_planes) {
Start-Process -FilePath "vagrant" -ArgumentList "up $control_plane" -NoNewWindow -Wait
Copy-Item -Path ".\.vagrant\machines\$control_plane\virtualbox\private_key" -Destination "$vagrantPK\$control_plane"
}

# Workers
$workers = @("worker01", "worker02", "worker03")
foreach ($worker in $workers) {
Start-Process -FilePath "vagrant" -ArgumentList "up $worker" -NoNewWindow -Wait
Copy-Item -Path ".\.vagrant\machines\$worker\virtualbox\private_key" -Destination "$vagrantPK\$worker"
}

# Managment(salt)
Start-Process -FilePath "vagrant" -ArgumentList "up managment" -NoNewWindow -Wait
Copy-Item -Path ".\.vagrant\machines\managment\virtualbox\private_key" -Destination "$vagrantPK\managment"
vagrant up
Copy-Item .\.vagrant\machines\infra-server01\virtualbox\private_key $vagrantPK\infra-server01
Copy-Item .\.vagrant\machines\load-balance\virtualbox\private_key $vagrantPK\load-balance
Copy-Item .\.vagrant\machines\managment\virtualbox\private_key $vagrantPK\managment
Copy-Item .\.vagrant\machines\control-plane01\virtualbox\private_key $vagrantPK\control-plane01
Copy-Item .\.vagrant\machines\control-plane02\virtualbox\private_key $vagrantPK\control-plane02
Copy-Item .\.vagrant\machines\control-plane03\virtualbox\private_key $vagrantPK\control-plane03
Copy-Item .\.vagrant\machines\worker01\virtualbox\private_key $vagrantPK\worker01
Copy-Item .\.vagrant\machines\worker02\virtualbox\private_key $vagrantPK\worker02
Copy-Item .\.vagrant\machines\worker03\virtualbox\private_key $vagrantPK\worker03


# Deployment kubernetes applications
Expand All @@ -140,4 +103,3 @@ $Env:VAGRANT_PREFER_SYSTEM_BIN += 0

#Remove Semafore
Remove-Item -Force $semafore

8 changes: 1 addition & 7 deletions vagrant/linux/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder "../../apps", "/home/vagrant/apps"
config.vm.synced_folder "../../charts", "/home/vagrant/charts"

## PROVIDER
config.vm.provider "virtualbox" do |vb|
vb.linked_clone = true
vb.customize ["modifyvm", :id, "--nested-hw-virt", "on"]
end

# VM infra-server01 - DNS Bind, Postfix,Samba, NFS, Pure-FTP
config.vm.define "infra-server01" do |infra_server01|
infra_server01.vm.box = BOX_DNS
Expand Down Expand Up @@ -261,7 +255,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.name = PLANES[i]
vb.memory = 8192
vb.cpus = 2
vb.customize ["modifyvm", :id, "--nested-hw-virt", "on"]
end

# SSH,FIREWALLD,SELINUX, UPDATES AND PROFILE
Expand Down Expand Up @@ -343,6 +336,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

#PROVIDER
node.vm.provider "virtualbox" do |vb|
vb.linked_clone = true
vb.name = WORKERS[j]
vb.memory = 16000
vb.cpus = 4
Expand Down

0 comments on commit 8036b34

Please sign in to comment.