Documentation ¶
Index ¶
Constants ¶
const HammerBanner = `` /* 212-byte string literal not displayed */
HammerBanner our mighty logo.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(log *zap.SugaredLogger, spec *Specification, hal hal.InBand) (*event.EventEmitter, error)
Run orchestrates the whole register/wipe/format/burn and reboot process
Types ¶
type Hammer ¶
type Hammer struct { Spec *Specification Hal hal.InBand MetalAPIClient *MetalAPIClient EventEmitter *event.EventEmitter LLDPClient *network.LLDPClient FilesystemLayout *models.V1FilesystemLayoutResponse // IPAddress is the ip of the eth0 interface during installation IPAddress string Started time.Time ChrootPrefix string OsImageDestination string // contains filtered or unexported fields }
Hammer is the machine which forms a bare metal to a working server
func (*Hammer) ConfigureBIOS ¶ added in v0.5.3
ConfigureBIOS ensures that UEFI boot is enabled and CSM-support is disabled. It then reboots the machine.
func (*Hammer) EnsureBootOrder ¶
EnsureBootOrder ensures that the BIOS boot order is properly set, i.e. first boot from OS image and then PXE boot
type InstallerConfig ¶
type InstallerConfig struct { // Hostname of the machine Hostname string `yaml:"hostname"` // Networks all networks connected to this machine Networks []*models.V1MachineNetwork `yaml:"networks"` // MachineUUID is the unique UUID for this machine, usually the board serial. MachineUUID string `yaml:"machineuuid"` // SSHPublicKey of the user SSHPublicKey string `yaml:"sshpublickey"` // Password is the password for the metal user. Password string `yaml:"password"` // Console specifies where the kernel should connect its console to. Console string `yaml:"console"` // Timestamp is the the timestamp of installer config creation. Timestamp string `yaml:"timestamp"` // Nics are the network interfaces of this machine including their neighbors. Nics []*models.V1MachineNic `yaml:"nics"` // VPN is the config for connecting machine to VPN VPN *models.V1MachineVPN `yaml:"vpn"` }
InstallerConfig contains configuration items which are consumed by the install.sh of the individual target OS.
type MetalAPIClient ¶ added in v0.10.0
func NewMetalAPIClient ¶ added in v0.10.0
func NewMetalAPIClient(log *zap.SugaredLogger, pixieURL string) (*MetalAPIClient, error)
NewMetalAPIClient fetches the address,hmac and certificates from pixie needed to communicate with metal-api, and returns a new client that can be used to invoke all provided grpc and rest endpoints.
func (*MetalAPIClient) BootService ¶ added in v0.10.0
func (c *MetalAPIClient) BootService() v1.BootServiceClient
func (*MetalAPIClient) Event ¶ added in v0.10.0
func (c *MetalAPIClient) Event() v1.EventServiceClient
func (*MetalAPIClient) WaitForAllocation ¶ added in v0.10.0
func (c *MetalAPIClient) WaitForAllocation(e *event.EventEmitter, machineID string) error
type Specification ¶
type Specification struct { // Debug turn on debug log Debug bool // PixieAPIUrl is the endpoint URL where the pixie reside PixieAPIUrl string // BGPEnabled if set to true real bgp configuration is configured, otherwise dhcp will be used BGPEnabled bool // Cidr of BGP interface in DEV Mode Cidr string // ConsolePassword of the metal user valid for one day. ConsolePassword string // MachineUUID is the unique identifier of this machine MachineUUID string // IP of this instance IP string // contains filtered or unexported fields }
Specification defines configuration items of the application
func NewSpec ¶
func NewSpec(log *zap.SugaredLogger) *Specification
NewSpec fills Specification with configuration made by kernel commandline