Documentation
¶
Overview ¶
Package netinstall wraps the mikrotik routeros netinstall utility to permit guided configuration without the need to drive the configuration tools directly. This makes things both more approachable and more repeatable.
Index ¶
Constants ¶
const ( // RouterOSVersion contains the most recent qualified version // of the suite to be installed. RouterOSVersion = "7.15.3" // RouterPkgMIPSBE is the most recent qualified firmware package for // a root router to be installed to. In general its safe to // use the most recent version, but this is what we tested. RouterPkgMIPSBE = "routeros-" + RouterOSVersion + "-mipsbe.npk" // RouterPkgARM is same as above, but for arm64. RouterPkgARM = "routeros-" + RouterOSVersion + "-arm.npk" // WifiPkgMIPSBE contains the wireless drivers qualified with the // matched version to the RouterPkg above. These must // generally be updated in sync unless a specific assurance // has been obtained from Mikrotik that it is safe to split // the versions. WifiPkgMIPSBE = "wireless-" + RouterOSVersion + "-mipsbe.npk" // WifiPkgARM is same as above, but for arm64. WifiPkgARM = "wireless-" + RouterOSVersion + "-arm.npk" // ImagePath is a location to store routerOS images into. ImagePath = "/usr/share/routeros" // BootstrapNetScoring is what the scoring box uses to bring // up the initial net which involves a special bootstrap VLAN. // This is necessary to bring up the network in a // non-conflicting way. BootstrapNetScoring = `` /* 151-byte string literal not displayed */ // BootstrapNetField contains the bootstrap of the network for // devices that are not the scoring box. BootstrapNetField = "/ip/dhcp-client/add interface=ether1 disabled=no add-default-route=no use-peer-dns=no use-peer-ntp=no" )
Variables ¶
This section is empty.
Functions ¶
func FetchPackages ¶
func FetchPackages(l hclog.Logger) error
FetchPackages retrieves routeros packages that have been qualified and unpacks them into ImagePath.
func FetchTools ¶
func FetchTools(l hclog.Logger) error
FetchTools retrieves the qualified version of netinstall-cli and unpacks it into netinstallPath
Types ¶
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
Installer wraps functionality associated with installation.
func New ¶
func New(opts ...InstallerOpt) *Installer
New returns a new installer configured for use.
func (*Installer) TemplateConfig ¶ added in v0.1.1
TemplateConfig writes the configuration file to the specified location and does nothing else.
type InstallerOpt ¶
type InstallerOpt func(i *Installer)
An InstallerOpt configures an installer
func WithBootstrapNet ¶ added in v0.1.6
func WithBootstrapNet(s string) InstallerOpt
WithBootstrapNet configures the bootstrap configuration for the network device.
func WithFMS ¶
func WithFMS(c *fms.Config) InstallerOpt
WithFMS pulls in the relevant settings from the config that needs to be baked at netinstall time.
func WithLogger ¶
func WithLogger(l hclog.Logger) InstallerOpt
WithLogger configures the logging instance for this installer.
func WithPackages ¶
func WithPackages(p []string) InstallerOpt
WithPackages configures what package should be installed