forked from futuretea/harvester-auto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.yml.j2
105 lines (92 loc) · 3.99 KB
/
settings.yml.j2
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
---
##########################################################################
# NOTE: this is a YAML file so please pay close attention to the leading #
# spaces as they are significant. #
##########################################################################
#
# harvester_iso_url
# harvester_kernel_url
# harvester_initrd_url
#
# Harvester media to install. The URL scheme can be either 'http', 'https', or
# 'file'. If the URL scheme is 'file', the given media will be copied from the
# local file system instead of downloading from a remote location.
harvester_iso_url: {{ harvester_url }}/{{ harvester_version }}/harvester-{{ harvester_version }}-amd64.iso
harvester_kernel_url: {{ harvester_url }}/{{ harvester_version }}/harvester-{{ harvester_version }}-vmlinuz-amd64
harvester_ramdisk_url: {{ harvester_url }}/{{ harvester_version }}/harvester-{{ harvester_version }}-initrd-amd64
harvester_rootfs_url: {{ harvester_url }}/{{ harvester_version }}/harvester-{{ harvester_version }}-rootfs-amd64.squashfs
#
# harvester_cluster_nodes
#
# NOTE: keep in mind that you need at least 2 nodes to make a cluster
#
harvester_cluster_nodes: {{ node_number }}
harvester_cluster_create_nodes: {{ create_node_number }}
# network_config
#
# Harvester network configurations. Make sure the cluster IPs are on the same
# subnet as the DHCP server. Pre-assign the IPs and MACs for the Harvester
# nodes.
harvester_network_config:
# Run as an airgapped environment that only has internet connectivity through an HTTP proxy.
# The HTTP proxy runs on DHCP server using port 3128
offline: false
dhcp_server:
ip: 10.{{ namespace_id }}.{{ cluster_id }}.254
subnet: 10.{{ namespace_id }}.{{ cluster_id }}.0
netmask: 255.255.255.0
range: 10.{{ namespace_id }}.{{ cluster_id }}.50 10.{{ namespace_id }}.{{ cluster_id }}.130
https: false
# Reserve these IPs for the Harvester cluster. Make sure these are outside
# the range of DHCP so they don't get served out by the DHCP server
vip:
ip: 10.{{ namespace_id }}.{{ cluster_id }}.10
mode: static
mac: 50:50:0a:{{ '%02x' % namespace_id|int }}:{{ '%02x' % cluster_id|int }}:0a
cluster:{% for i in range(node_number|int) %}
- ip: 10.{{ namespace_id }}.{{ cluster_id }}.{{ i + 11 }}
subnet_mask: 255.255.255.0
gateway: 10.{{ namespace_id }}.{{ cluster_id }}.1
mac: 50:50:0a:{{ '%02x' % namespace_id|int }}:{{ '%02x' % cluster_id|int }}:{{ '%02x' % (i + 11) }}
mac_second: 50:50:0b:{{ '%02x' % namespace_id|int }}:{{ '%02x' % cluster_id|int }}:{{ '%02x' % (i + 11) }}
vagrant_interface: ens6
mgmt_interface: ens7
{%- endfor %}
#
# harvester_config
#
# Harvester system configurations.
#
harvester_config:
# static token for cluster authentication
token: token
# Public keys to add to authorized_keys of each node.
ssh_authorized_keys:
# Vagrant default unsecured SSH public key
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
# password to for the `rancher` user to login to the Harvester nodes
password: p@ssword
# NTP servers
ntp_servers:
- 0.suse.pool.ntp.org
- 1.suse.pool.ntp.org
dns_nameservers:
- {{ dns_nameserver }}
- 8.8.8.8
additional_content_url: {{ harvester_config_url }}
#
# harvester_node_config
#
# Harvester node-specific configurations.
#
harvester_node_config:
# number of CPUs assigned to each node
cpu: {{ cpu_count }}
# memory size for each node, in MBytes
memory: {{ memory_size }}
# disk size for each node
disk_size: {{ disk_size }}
harvester_cluster:
name_suffix: {{ namespace_id }}-{{ cluster_id }}
namespace_id: {{ namespace_id }}
cluster_id: {{ cluster_id }}