-
Notifications
You must be signed in to change notification settings - Fork 2
/
data.tf
123 lines (101 loc) · 3.2 KB
/
data.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
locals {
# Globals definition
globals = {
# Configuration for SSH connection parameters
ssh_connection = {
host = var.SSH_HOST
username = var.SSH_USERNAME
password = var.SSH_PASSWORD
key_path = var.SSH_KEY_PATH
mode = "password"
}
# Parameters related to those files used/thrown at some point on VM creation
io_files = {
# Path to the folder containing SSH keys authorized in all the VMs
external_ssh_keys_path = "./files/input/external-ssh-keys"
# Path to the folder where instances' autogenerated SSH keys will be stored
instances_ssh_keys_path = "./files/output"
}
# Parameters related to the installable OS on VMs creation
os = {
# Distro version to use
# ATM, only ubuntu is supported, so the version is something like: 23.04
version = "23.04"
}
}
# Networks definition
# Possible types: nat, macvtap
networks = {
# Configuration for a macvtap
external0 = {
# Type of network
# Possible values: nat, macvtap
mode = "macvtap"
# Host physical interface to attach
# the autogenerated virtual interface
interface = "eth0"
# Assignable IP address blocks in CIDR notation
# Example: [IPv4/CIDR] -> /28 prefix make assignable 16 IPs
dhcp_address_blocks = ["192.168.2.40/28"]
# Address to the gateway
gateway_address = "192.168.2.1"
}
# Configuration for a NAT
virnat0 = {
# Type of network
# Possible values: nat, macvtap
mode = "nat"
# Assignable IP address blocks in CIDR notation
dhcp_address_blocks = ["10.10.10.0/24"]
# Address to the gateway
gateway_address = "10.10.10.1"
}
}
# Instance basic definition.
# WARNING: Choose IP a address inside the right subnet
instances = {
# Define the masters
kube-master-0 = {
# Using 'OrangePi 5' as hypervisor. This SBC is quite new, so there is no specific machine type for it
# Use generic 'virt' to apply all needed patches for this kind of environments
# Ref: https://www.qemu.org/docs/master/system/target-arm.html
arch = "aarch64"
machine = "virt"
vcpu = 2
memory = 6144
disk = 20000000000
networks = [
{
name = "external0"
address = "192.168.2.41/24"
mac = "DA:C8:20:7A:37:BF"
# If we have more than one network, ones must be marked as default
default = true
},
{
name = "virnat0"
address = "10.10.10.10/24"
mac = "F9:1C:A6:02:77:83"
},
]
}
# Define the masters
kube-worker-0 = {
# Using 'OrangePi 5' as hypervisor. This SBC is quite new, so there is no specific machine type for it
# Use generic 'virt' to apply all needed patches for this kind of environments
# Ref: https://www.qemu.org/docs/master/system/target-arm.html
arch = "aarch64"
machine = "virt"
vcpu = 2
memory = 6144
disk = 20000000000
networks = [
{
name = "virnat0"
address = "10.10.10.20/24"
mac = "BE:FE:37:D8:6B:AB"
}
]
}
}
}