|
|
@ -2,20 +2,16 @@ def defaultOSConfigure(vm)
|
|
|
|
box = vm.box.to_s
|
|
|
|
box = vm.box.to_s
|
|
|
|
if box.include?("generic/ubuntu")
|
|
|
|
if box.include?("generic/ubuntu")
|
|
|
|
vm.provision "Set DNS", type: "shell", inline: "netplan set ethernets.eth0.nameservers.addresses=[8.8.8.8,1.1.1.1]; netplan apply", run: 'once'
|
|
|
|
vm.provision "Set DNS", type: "shell", inline: "netplan set ethernets.eth0.nameservers.addresses=[8.8.8.8,1.1.1.1]; netplan apply", run: 'once'
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "apt install -y jq"
|
|
|
|
|
|
|
|
elsif box.include?("Leap") || box.include?("Tumbleweed")
|
|
|
|
elsif box.include?("Leap") || box.include?("Tumbleweed")
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "zypper install -y jq"
|
|
|
|
|
|
|
|
vm.provision "Install apparmor-parser", type: "shell", inline: "zypper install -y apparmor-parser"
|
|
|
|
vm.provision "Install apparmor-parser", type: "shell", inline: "zypper install -y apparmor-parser"
|
|
|
|
elsif box.include?("rocky8") || box.include?("rocky9")
|
|
|
|
elsif box.include?("rocky8") || box.include?("rocky9")
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "dnf install -y jq"
|
|
|
|
|
|
|
|
vm.provision "Disable firewall", type: "shell", inline: "systemctl stop firewalld"
|
|
|
|
vm.provision "Disable firewall", type: "shell", inline: "systemctl stop firewalld"
|
|
|
|
elsif box.include?("centos7")
|
|
|
|
elsif box.include?("centos7")
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "yum install -y jq"
|
|
|
|
|
|
|
|
vm.provision "Disable firewall", type: "shell", inline: "systemctl stop firewalld"
|
|
|
|
vm.provision "Disable firewall", type: "shell", inline: "systemctl stop firewalld"
|
|
|
|
elsif box.include?("alpine")
|
|
|
|
elsif box.include?("alpine")
|
|
|
|
vm.provision "Install tools", type: "shell", inline: "apk add jq coreutils"
|
|
|
|
vm.provision "Install tools", type: "shell", inline: "apk add coreutils"
|
|
|
|
elsif box.include?("microos")
|
|
|
|
elsif box.include?("microos")
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "transactional-update pkg install -y jq"
|
|
|
|
# Add stuff here, but we always need to reload at the end
|
|
|
|
vm.provision 'reload', run: 'once'
|
|
|
|
vm.provision 'reload', run: 'once'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -26,6 +22,7 @@ def getInstallType(vm, release_version, branch)
|
|
|
|
elsif !release_version.empty?
|
|
|
|
elsif !release_version.empty?
|
|
|
|
return "INSTALL_K3S_VERSION=#{release_version}"
|
|
|
|
return "INSTALL_K3S_VERSION=#{release_version}"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
jqInstall(vm)
|
|
|
|
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
|
|
|
scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts"
|
|
|
|
# Grabs the last 5 commit SHA's from the given branch, then purges any commits that do not have a passing CI build
|
|
|
|
# Grabs the last 5 commit SHA's from the given branch, then purges any commits that do not have a passing CI build
|
|
|
|
# MicroOS requires it not be in a /tmp/ or other root system folder
|
|
|
|
# MicroOS requires it not be in a /tmp/ or other root system folder
|
|
|
@ -82,6 +79,24 @@ def getHardenedArg(vm, hardened, scripts_location)
|
|
|
|
return hardened_arg
|
|
|
|
return hardened_arg
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def jqInstall(vm)
|
|
|
|
|
|
|
|
box = vm.box.to_s
|
|
|
|
|
|
|
|
if box.include?("generic/ubuntu")
|
|
|
|
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "apt install -y jq"
|
|
|
|
|
|
|
|
elsif box.include?("Leap") || box.include?("Tumbleweed")
|
|
|
|
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "zypper install -y jq"
|
|
|
|
|
|
|
|
elsif box.include?("rocky8") || box.include?("rocky9")
|
|
|
|
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "dnf install -y jq"
|
|
|
|
|
|
|
|
elsif box.include?("centos7")
|
|
|
|
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "yum install -y jq"
|
|
|
|
|
|
|
|
elsif box.include?("alpine")
|
|
|
|
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "apk add coreutils"
|
|
|
|
|
|
|
|
elsif box.include?("microos")
|
|
|
|
|
|
|
|
vm.provision "Install jq", type: "shell", inline: "transactional-update pkg install -y jq"
|
|
|
|
|
|
|
|
vm.provision 'reload', run: 'once'
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def dockerInstall(vm)
|
|
|
|
def dockerInstall(vm)
|
|
|
|
vm.provider "libvirt" do |v|
|
|
|
|
vm.provider "libvirt" do |v|
|
|
|
|
v.memory = NODE_MEMORY + 1024
|
|
|
|
v.memory = NODE_MEMORY + 1024
|
|
|
|