initialize

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2014 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultIpv4Address = "127.0.0.1"
View Source
const DefaultSSHKeyName = "coreos-cloudinit"

Variables

This section is empty.

Functions

func Apply

func Apply(cfg CloudConfig, env *Environment) error

func ParseUserData

func ParseUserData(contents string) (interface{}, error)

func PersistScriptInWorkspace

func PersistScriptInWorkspace(script system.Script, workspace string) (string, error)

func PersistUnitNameInWorkspace

func PersistUnitNameInWorkspace(name string, workspace string) error

func PrepWorkspace

func PrepWorkspace(workspace string) error

func SSHImportGithubUser

func SSHImportGithubUser(system_user string, github_user string) error

func SSHImportKeysFromURL

func SSHImportKeysFromURL(system_user string, url string) error

func WriteEtcHosts

func WriteEtcHosts(option string, root string) error

Write an /etc/hosts file

func WriteEtcdEnvironment

func WriteEtcdEnvironment(env EtcdEnvironment, root string) error

Write an EtcdEnvironment to the appropriate path on disk for etcd.service

func WriteLocksmithConfig added in v0.6.0

func WriteLocksmithConfig(strategy string, root string) error

WriteLocksmithConfig updates the `update.conf` file with a REBOOT_STRATEGY for locksmith.

func WriteOEMRelease

func WriteOEMRelease(oem *OEMRelease, root string) error

Types

type CloudConfig

type CloudConfig struct {
	SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"`
	Coreos            struct {
		Etcd   EtcdEnvironment
		Update map[string]string
		Units  []system.Unit
		OEM    OEMRelease
	}
	WriteFiles     []system.File `yaml:"write_files"`
	Hostname       string
	Users          []system.User
	ManageEtcHosts string `yaml:"manage_etc_hosts"`
}

func NewCloudConfig

func NewCloudConfig(contents string) (*CloudConfig, error)

func (CloudConfig) String

func (cc CloudConfig) String() string

type Environment

type Environment struct {
	// contains filtered or unexported fields
}

func NewEnvironment

func NewEnvironment(root, workspace string) *Environment

func (*Environment) Apply

func (self *Environment) Apply(data string) string

func (*Environment) Root

func (self *Environment) Root() string

func (*Environment) SSHKeyName

func (self *Environment) SSHKeyName() string

func (*Environment) SetSSHKeyName

func (self *Environment) SetSSHKeyName(name string)

func (*Environment) Workspace

func (self *Environment) Workspace() string

type EtcdEnvironment

type EtcdEnvironment map[string]string

func (EtcdEnvironment) String

func (ec EtcdEnvironment) String() (out string)

type OEMRelease

type OEMRelease struct {
	ID           string `yaml:"id"`
	Name         string `yaml:"name"`
	VersionID    string `yaml:"version-id"`
	HomeURL      string `yaml:"home-url"`
	BugReportURL string `yaml:"bug-report-url"`
}

func (*OEMRelease) String

func (oem *OEMRelease) String() string

type UserKey

type UserKey struct {
	ID  int    `json:"id,omitempty"`
	Key string `json:"key"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL