Documentation ¶
Index ¶
- type Content
- func (ud Content) AddInTag(phase Phase, tagname string, content string)
- func (ud *Content) Generate(phase Phase) ([]byte, fail.Error)
- func (ud Content) OK() bool
- func (ud *Content) Prepare(options stacks.ConfigurationOptions, request abstract.HostRequest, cidr string, ...) fail.Error
- func (ud Content) ToMap() (map[string]interface{}, fail.Error)
- type Phase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct { // BashLibrary contains the bash library system.BashLibraryDefinition Header string // is the bash header for scripts Revision string // is the git revision used to build SafeScale Username string // is the name of the default user (api.DefaultUser) ExitOnError string // helper to quit script on error Password string // for the user safescale (for troubleshoot use, usable only in console) FirstPublicKey string // is the public key used for first connection after Host creation FirstPrivateKey string // is the private key used for first connection after Host creation FinalPublicKey string // is the public key used to connect to Host starting phase3 (disabling FirstPublicKey) FinalPrivateKey string // is the private key used to connect tp Host starting phase3 (disabling FirstPrivateKey) ConfIF bool // if set to true, configure all interfaces to DHCP IsGateway bool // if set to true, activate IP forwarding SSHPort string // Define Gateway SSHport PublicIP string // contains a public IP bound to the host AddGateway bool // if set to true, configure default gateway DNSServers []string // contains the list of DNS servers to use; used only if IsGateway is true CIDR string // contains the cidr of the network DefaultRouteIP string // is the IP of the gateway or the VIP if gateway HA is enabled EndpointIP string // is the IP of the gateway or the VIP if gateway HA is enabled PrimaryGatewayPrivateIP string // is the private IP of the primary gateway PrimaryGatewayPublicIP string // is the public IP of the primary gateway SecondaryGatewayPrivateIP string // is the private IP of the secondary gateway SecondaryGatewayPublicIP string // is the public IP of the secondary gateway EmulatedPublicNet string // is a private network which is used to emulate a public one HostName string // contains the name wanted as host name (default == name of the Cloud resource) Tags map[Phase]map[string][]string // contains tags and their content(s); a tag is named #<tag> in the template IsPrimaryGateway bool // tells if the host is a primary gateway GatewayHAKeepalivedPassword string // contains the password to use in keepalived configurations ProviderName string BuildSubnetworks bool Debug bool }
Content is the structure to apply to userdata.sh template
func (Content) AddInTag ¶
AddInTag adds some useful code on the end of userdata.netsec.sh just before the end (on the label #insert_tag)
Click to show internal directories.
Click to hide internal directories.