Documentation ¶
Overview ¶
Package config reads, parses, and represents the warewulf.conf config file.
warewulf.conf is a yaml-formatted configuration file that includes configuration for the Warewulf daemon and commands, as well as the DHCP, TFTP and NFS services that Warewulf manages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DHCPConf ¶
type DHCPConf struct { Enabled bool `yaml:"enabled" default:"true"` Template string `yaml:"template" default:"default"` RangeStart string `yaml:"range start,omitempty"` RangeEnd string `yaml:"range end,omitempty"` SystemdName string `yaml:"systemd name" default:"dhcpd"` }
DHCPConf represents the configuration for the DHCP service that Warewulf will configure.
type MountEntry ¶
type MountEntry struct { Source string `yaml:"source"` Dest string `yaml:"dest,omitempty"` ReadOnly bool `yaml:"readonly,omitempty"` Options string `yaml:"options,omitempty"` // ignored at the moment }
A MountEntry represents a bind mount that is applied to a container during exec and shell.
type NFSConf ¶
type NFSConf struct { Enabled bool `yaml:"enabled" default:"true"` ExportsExtended []*NFSExportConf `yaml:"export paths" default:"[]"` SystemdName string `yaml:"systemd name" default:"nfsd"` }
NFSConf represents the NFS configuration that will be used by Warewulf to generate exports on the server and mounts on compute nodes.
type NFSExportConf ¶
type NFSExportConf struct { Path string `yaml:"path" default:"/dev/null"` ExportOptions string `default:"rw,sync,no_subtree_check" yaml:"export options"` MountOptions string `default:"defaults" yaml:"mount options"` Mount bool `default:"true" yaml:"mount"` }
An NFSExportConf reprents a single NFS export / mount.
type RootConf ¶
type RootConf struct { WWInternal int `yaml:"WW_INTERNAL"` Comment string `yaml:"comment,omitempty"` Ipaddr string `yaml:"ipaddr"` Ipaddr6 string `yaml:"ipaddr6,omitempty"` Netmask string `yaml:"netmask"` Network string `yaml:"network,omitempty"` Ipv6net string `yaml:"ipv6net,omitempty"` Fqdn string `yaml:"fqdn,omitempty"` Warewulf *WarewulfConf `yaml:"warewulf"` DHCP *DHCPConf `yaml:"dhcp"` TFTP *TFTPConf `yaml:"tftp"` NFS *NFSConf `yaml:"nfs"` SSH *SSHConf `yaml:"ssh,omitempty"` MountsContainer []*MountEntry `yaml:"container mounts" default:"[{\"source\": \"/etc/resolv.conf\", \"dest\": \"/etc/resolv.conf\"}]"` Paths *BuildConfig `yaml:"paths"` // contains filtered or unexported fields }
RootConf is the main Warewulf configuration structure. It stores some information about the Warewulf server locally, and has [WarewulfConf], DHCPConf, [TFTPConf], and NFSConf sub-sections.
func Get ¶
func Get() *RootConf
Get returns a previously cached RootConf if it exists, or returns a new RootConf.
func New ¶
func New() *RootConf
New caches and returns a new RootConf initialized with empty values, clearing replacing any previously cached value.
func (*RootConf) InitializedFromFile ¶
InitializedFromFile returns true if RootConf memory was read from a file, or false otherwise.
func (*RootConf) SetDynamicDefaults ¶
SetDynamicDefaults populates RootConf with plausible defaults for the runtime environment.