172 lines
3.9 KiB
HCL
172 lines
3.9 KiB
HCL
locals {
|
|
// Definition of the Kubernetes service (templater compatible)
|
|
ServiceNuoMatchBox = {
|
|
ConfigFiles = [
|
|
{
|
|
destination = "/etc/dnsmasq.d/pxe.conf"
|
|
source = "dnsmasq.d/ipxe.conf.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "root"
|
|
group = "root"
|
|
},
|
|
{
|
|
destination = "/etc/dnsmasq-hosts.conf"
|
|
source = "dnsmasq.d/dnsmasq-hosts.conf.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "dnsmasq"
|
|
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"
|
|
},
|
|
{
|
|
destination = "/etc/network/interfaces"
|
|
source = "network/interfaces.pktpl.hcl"
|
|
mode = "700"
|
|
owner = "root"
|
|
group = "root"
|
|
},
|
|
{
|
|
destination = "/etc/resolv.conf"
|
|
source = "resolv.conf.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "root"
|
|
group = "root"
|
|
},
|
|
{
|
|
destination = "/etc/hostname"
|
|
source = "hostname.pktpl.hcl"
|
|
mode = "600"
|
|
owner = "root"
|
|
group = "root"
|
|
}
|
|
]
|
|
Repositories = {
|
|
AlpineEdgeTesting = {
|
|
type = "apk"
|
|
name = "testing"
|
|
url = "http://mirrors.ircam.fr/pub/alpine/edge/testing"
|
|
enabled = true
|
|
}
|
|
AlpineEdgeCommunity = {
|
|
type = "apk"
|
|
name = "testing"
|
|
url = "http://mirrors.ircam.fr/pub/alpine/edge/community"
|
|
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"
|
|
}
|
|
vmtools = {
|
|
name = "open-vm-tools"
|
|
action = "install"
|
|
}
|
|
bash = {
|
|
name = "bash"
|
|
action = "install"
|
|
}
|
|
}
|
|
Vars = {
|
|
PXE = {
|
|
DHCPMode = "standalone"
|
|
DNSDomain = "k8s.in.nuonet.fr"
|
|
ListenInterface = "eth0"
|
|
GreetingMessage = "Nuo PXE Boot Server"
|
|
DelayTime = "5"
|
|
BootingMessage = "Booting from network the Nuo way"
|
|
DHCPRangeStart = "192.168.160.20"
|
|
DHCPRangeEnd = "192.168.160.60"
|
|
DHCPLeaseDuration = "48h"
|
|
TFTPRoot = "/var/lib/tftpboot"
|
|
}
|
|
DNSMasq = {
|
|
Hosts = [
|
|
{
|
|
Name = "reg.k8s.in.nuonet.fr"
|
|
IP = "192.168.160.11"
|
|
}
|
|
]
|
|
}
|
|
MatchBox = {
|
|
Hostname = "mb.k8s.in.nuonet.fr"
|
|
HTTPPort = "8080"
|
|
gRPCPort = "8081"
|
|
LogLevel = "info"
|
|
}
|
|
NIC = [
|
|
{
|
|
Name = "eth0"
|
|
IP = "192.168.160.10"
|
|
Mask = "255.255.254.0"
|
|
Gateway = "192.168.160.1"
|
|
}
|
|
]
|
|
DNS = [ "10.253.50.105" ]
|
|
Hosts = [
|
|
{
|
|
Name = "harbor.k8s.in.nuonet.fr"
|
|
IP = "192.168.160.11"
|
|
}
|
|
]
|
|
Set = { Hostname = "mb.k8s.in.nuonet.fr" }
|
|
}
|
|
Users = {}
|
|
Daemons = {
|
|
matchbox = {
|
|
name = "matchbox"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
dnsmasq = {
|
|
name = "dnsmasq"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
local = {
|
|
name = "local"
|
|
type = "auto"
|
|
enabled = true
|
|
}
|
|
}
|
|
}
|
|
|
|
// Definition of the Kubernetes full configuration (with all the services)
|
|
NuoMatchBox = {
|
|
Name = "nuo-matchbox"
|
|
Globals = local.Globals
|
|
Services = {
|
|
NuoMatchBox = local.ServiceNuoMatchBox
|
|
}
|
|
}
|
|
}
|