103 lines
2.2 KiB
HCL
103 lines
2.2 KiB
HCL
locals {
|
|
// Definition of the Kubernetes service (templater compatible)
|
|
ServiceMatchBox = {
|
|
ConfigFiles = [
|
|
{
|
|
destination = "/etc/dnsmasq.d/pxe.conf"
|
|
source = "dnsmasq.d/ipxe.conf.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "root"
|
|
group = "root"
|
|
},
|
|
{
|
|
destination = "/etc/conf.d/matchbox"
|
|
source = "conf.d/matchbox.conf.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "root"
|
|
group = "root"
|
|
},
|
|
{
|
|
destination = "/etc/init.d/matchbox"
|
|
source = "init.d/matchbox.pktpl.hcl"
|
|
mode = "700"
|
|
owner = "root"
|
|
group = "root"
|
|
}
|
|
]
|
|
Repositories = {
|
|
AlpineEdgeTesting = {
|
|
type = "apk"
|
|
name = "testing"
|
|
url = "http://mirror.serverion.com/alpine/edge/testing"
|
|
enabled = true
|
|
}
|
|
}
|
|
Packages = {
|
|
dnsmasq = {
|
|
name = "dnsmasq"
|
|
action = "install"
|
|
}
|
|
terraform = {
|
|
name = "terraform"
|
|
action = "install"
|
|
}
|
|
git = {
|
|
name = "git"
|
|
action = "install"
|
|
}
|
|
kubectl = {
|
|
name = "kubectl"
|
|
action = "install"
|
|
}
|
|
gpg = {
|
|
name = "gpg"
|
|
action = "install"
|
|
}
|
|
}
|
|
Vars = {
|
|
PXE = {
|
|
DHCPMode = "proxy"
|
|
DNSDomain = "cadoles.com"
|
|
ListenInterface = "eth0"
|
|
GreetingMessage = "Cadoles PXE Boot Server"
|
|
DelayTime = "5"
|
|
BootingMessage = "Booting from network the Cadoles way"
|
|
DHCPRange = ""
|
|
DHCPLeaseDuration = "12h"
|
|
}
|
|
MatchBox = {
|
|
URL = ""
|
|
HTTPPort = "8080"
|
|
gRPCPort = "8081"
|
|
LogLevel = "info"
|
|
}
|
|
ETH0 = {
|
|
IP = ""
|
|
DNS = ""
|
|
GATEWAY = ""
|
|
}
|
|
}
|
|
Users = {}
|
|
Daemons = {
|
|
matchbox = {
|
|
name = "matchbox"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
dnsmasq = {
|
|
name = "dnsmasq"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
}
|
|
}
|
|
|
|
// Definition of the Kubernetes full configuration (with all the services)
|
|
MatchBox = {
|
|
Name = "matchbox"
|
|
Globals = local.Globals
|
|
Services = {
|
|
K3S = local.ServiceMatchBox
|
|
}
|
|
}
|
|
} |