forked from OpenCHAMI/coresmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.example.yaml
98 lines (89 loc) · 4.43 KB
/
config.example.yaml
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
---
server4:
plugins:
############################################################################
#
# NORMAL COREDHCP PLUGIN CONFIGURATION
#
############################################################################
# REQUIRED: server_id configures the identity/IP of the DHCP server. This
# is necessary to distinguish it from possible other DHCP servers on the
# network.
- server_id: 172.16.0.253
# OPTIONAL: dns provides a list of DNS servers to use for names.
- dns: 1.1.1.1 8.8.8.8
# REQUIRED: router specifies the IP of the gateway of the network. This can
# be the same as server_id if the router is at the same IP.
- router: 172.16.0.254
# REQUIRED: netmask specifies the network mask to be used with IP addresses
# served by DHCP.
- netmask: 255.255.255.0
############################################################################
#
# CORESMD CONFIGURATION
#
############################################################################
# REQUIRED: coresmd communicates with SMD and tries to match any MAC it
# receives to EthernetInterfaces in SMD. If one if found, the corresponding
# IP is leased to the requesting machine and packet processing terminates
# here. Otherwise, the packet processing continues to any plugins after
# this.
#
# ARGUMENTS:
# 1. Base URL used to communicate with SMD.
# 2. Base URL used to retrieve boot scripts. This is usually an HTTP URL
# that BSS is listening on, since the iPXE bootloader doesn't have the
# OpenCHAMI CA certificate to do proper TLS. It may also be an IP
# address if name servers are not configured.
# 3. (OPTIONAL) Path to CA cert used for TLS with the SMD base URL. If
# there is already a trusted certificate, this can be blank ("").
# 4. Cache validity duration. Coresmd uses a pull-through cache to store
# network information and this is the duration to refresh that cache.
# 5. Lease duration.
# 6. Whether to use single port mode. In this mode, the TFTP server will
# send responses to the client's source port. This mode allows the
# server to operate in a NATed environment.
- coresmd: https://foobar.openchami.cluster http://172.16.0.253:8081 /root_ca/root_ca.crt 30s 1h false
# Any requests reaching this point are unknown to SMD and it is up to the
# administrator to decide how to handle unknown packets.
# OPTIONAL: If the administrator cares about which IP addresses are
# assigned to which MAC addresses (e.g. the hosts file matches names to BMC
# IPs), CoreDHCP provides the file plugin for this purpose.
#
# The administrator will want to set lease_time to how long caught-all IP
# addresses should last. This could be long or short depending on the need.
- lease_time: 10m
#
# The file reads a file on the filesystem that maps MAC addresses to IP
# addresses. Its format is similar to a hosts file, e.g:
#
# <mac_addr1> <ip_addr1>
# <mac_addr2> <ip_addr2>
# ...
#
- file: /etc/coredhcp/hostsfile
# OPTIONAL: If the administrator does not care about which IP addresses are
# assigned to which MAC addresses (or wants a catch-all after mapping
# relevant IPs to MACs using the file plugin above), coresmd provides the
# bootloop plugin.
#
# This plugin serves temporary IP addresses defined by a range with the
# given leas time, which should be short. Once the IP expires and the
# machine tries to renew its lease, a DHCPNAK is sent to make the device
# send a DHCPDISCOVER to re-perform the entire DHCP handshake. An iPXE boot
# script that reboots is served to all devices requesting an IP so that
# devices that can reboot will do so (to force it to redo the entire DHCP
# handshake).
#
# ARGUMENTS:
# 1. Path to database file that keeps track of leased IPs. This will be
# created if it does not already exist.
# 2. Path of iPXE to use. If using the built-in coresmd TFTP server, if
# this argument is 'default', the default reboot.ipxe script is used.
# This should really only be used if it is desired to do something
# custom instead of rebooting.
# 3. Lease duration.
# 4. IP address beginning range.
# 5. IP address ending range.
#
- bootloop: /tmp/coredhcp.db default 5m 172.16.0.156 172.16.0.200