Documentation ¶
Index ¶
- Variables
- func ConfigureAuth(p Provisioner) error
- func Register(name string, p *RegisteredProvisioner)
- type Boot2DockerProvisioner
- func (provisioner *Boot2DockerProvisioner) CompatibleWithHost() bool
- func (provisioner *Boot2DockerProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
- func (provisioner *Boot2DockerProvisioner) Generatek8sOptions() (*k8sOptions, error)
- func (provisioner *Boot2DockerProvisioner) GetAuthOptions() auth.AuthOptions
- func (provisioner *Boot2DockerProvisioner) GetDockerOptionsDir() string
- func (provisioner *Boot2DockerProvisioner) GetDriver() drivers.Driver
- func (provisioner *Boot2DockerProvisioner) Hostname() (string, error)
- func (provisioner *Boot2DockerProvisioner) Package(name string, action pkgaction.PackageAction) error
- func (provisioner *Boot2DockerProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, ...) error
- func (provisioner *Boot2DockerProvisioner) SSHCommand(args string) (string, error)
- func (provisioner *Boot2DockerProvisioner) Service(name string, action pkgaction.ServiceAction) error
- func (provisioner *Boot2DockerProvisioner) SetHostname(hostname string) error
- func (provisioner *Boot2DockerProvisioner) SetOsReleaseInfo(info *OsRelease)
- type CentosProvisioner
- type DebianProvisioner
- func (provisioner *DebianProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
- func (provisioner *DebianProvisioner) Package(name string, action pkgaction.PackageAction) error
- func (provisioner *DebianProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, ...) error
- func (provisioner *DebianProvisioner) Service(name string, action pkgaction.ServiceAction) error
- type DockerOptions
- type EngineConfigContext
- type FedoraProvisioner
- type GenericProvisioner
- func (provisioner *GenericProvisioner) CompatibleWithHost() bool
- func (provisioner *GenericProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
- func (provisioner *GenericProvisioner) Generatek8sOptions() (*k8sOptions, error)
- func (provisioner *GenericProvisioner) GetAuthOptions() auth.AuthOptions
- func (provisioner *GenericProvisioner) GetDockerOptionsDir() string
- func (provisioner *GenericProvisioner) GetDriver() drivers.Driver
- func (provisioner *GenericProvisioner) Hostname() (string, error)
- func (provisioner *GenericProvisioner) SSHCommand(args string) (string, error)
- func (provisioner *GenericProvisioner) SetHostname(hostname string) error
- func (provisioner *GenericProvisioner) SetOsReleaseInfo(info *OsRelease)
- type OsRelease
- type Provisioner
- func DetectProvisioner(d drivers.Driver) (Provisioner, error)
- func NewBoot2DockerProvisioner(d drivers.Driver) Provisioner
- func NewCentosProvisioner(d drivers.Driver) Provisioner
- func NewDebianProvisioner(d drivers.Driver) Provisioner
- func NewFedoraProvisioner(d drivers.Driver) Provisioner
- func NewRancherProvisioner(d drivers.Driver) Provisioner
- func NewRedHatProvisioner(d drivers.Driver) Provisioner
- func NewUbuntuProvisioner(d drivers.Driver) Provisioner
- type RancherProvisioner
- func (provisioner *RancherProvisioner) Package(name string, action pkgaction.PackageAction) error
- func (provisioner *RancherProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, ...) error
- func (provisioner *RancherProvisioner) Service(name string, action pkgaction.ServiceAction) error
- func (provisioner *RancherProvisioner) SetHostname(hostname string) error
- type RedHatProvisioner
- func (provisioner *RedHatProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
- func (provisioner *RedHatProvisioner) Package(name string, action pkgaction.PackageAction) error
- func (provisioner *RedHatProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, ...) error
- func (provisioner *RedHatProvisioner) SSHCommand(args string) (string, error)
- func (provisioner *RedHatProvisioner) Service(name string, action pkgaction.ServiceAction) error
- func (provisioner *RedHatProvisioner) SetHostname(hostname string) error
- type RegisteredProvisioner
- type SwarmCommandContext
- type UbuntuProvisioner
- func (provisioner *UbuntuProvisioner) Package(name string, action pkgaction.PackageAction) error
- func (provisioner *UbuntuProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, ...) error
- func (provisioner *UbuntuProvisioner) Service(name string, action pkgaction.ServiceAction) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ConfigureAuth ¶
func ConfigureAuth(p Provisioner) error
func Register ¶
func Register(name string, p *RegisteredProvisioner)
Types ¶
type Boot2DockerProvisioner ¶
type Boot2DockerProvisioner struct { OsReleaseInfo *OsRelease Driver drivers.Driver AuthOptions auth.AuthOptions EngineOptions engine.EngineOptions SwarmOptions swarm.SwarmOptions }
func (*Boot2DockerProvisioner) CompatibleWithHost ¶
func (provisioner *Boot2DockerProvisioner) CompatibleWithHost() bool
func (*Boot2DockerProvisioner) GenerateDockerOptions ¶
func (provisioner *Boot2DockerProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
func (*Boot2DockerProvisioner) Generatek8sOptions ¶
func (provisioner *Boot2DockerProvisioner) Generatek8sOptions() (*k8sOptions, error)
func (*Boot2DockerProvisioner) GetAuthOptions ¶
func (provisioner *Boot2DockerProvisioner) GetAuthOptions() auth.AuthOptions
func (*Boot2DockerProvisioner) GetDockerOptionsDir ¶
func (provisioner *Boot2DockerProvisioner) GetDockerOptionsDir() string
func (*Boot2DockerProvisioner) GetDriver ¶
func (provisioner *Boot2DockerProvisioner) GetDriver() drivers.Driver
func (*Boot2DockerProvisioner) Hostname ¶
func (provisioner *Boot2DockerProvisioner) Hostname() (string, error)
func (*Boot2DockerProvisioner) Package ¶
func (provisioner *Boot2DockerProvisioner) Package(name string, action pkgaction.PackageAction) error
func (*Boot2DockerProvisioner) Provision ¶
func (provisioner *Boot2DockerProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, engineOptions engine.EngineOptions) error
func (*Boot2DockerProvisioner) SSHCommand ¶
func (provisioner *Boot2DockerProvisioner) SSHCommand(args string) (string, error)
func (*Boot2DockerProvisioner) Service ¶
func (provisioner *Boot2DockerProvisioner) Service(name string, action pkgaction.ServiceAction) error
func (*Boot2DockerProvisioner) SetHostname ¶
func (provisioner *Boot2DockerProvisioner) SetHostname(hostname string) error
func (*Boot2DockerProvisioner) SetOsReleaseInfo ¶
func (provisioner *Boot2DockerProvisioner) SetOsReleaseInfo(info *OsRelease)
type CentosProvisioner ¶
type CentosProvisioner struct {
RedHatProvisioner
}
type DebianProvisioner ¶
type DebianProvisioner struct {
GenericProvisioner
}
func (*DebianProvisioner) GenerateDockerOptions ¶
func (provisioner *DebianProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
func (*DebianProvisioner) Package ¶
func (provisioner *DebianProvisioner) Package(name string, action pkgaction.PackageAction) error
func (*DebianProvisioner) Provision ¶
func (provisioner *DebianProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, engineOptions engine.EngineOptions) error
func (*DebianProvisioner) Service ¶
func (provisioner *DebianProvisioner) Service(name string, action pkgaction.ServiceAction) error
type DockerOptions ¶
type EngineConfigContext ¶
type EngineConfigContext struct { DockerPort int AuthOptions auth.AuthOptions EngineOptions engine.EngineOptions DockerOptionsDir string }
type FedoraProvisioner ¶
type FedoraProvisioner struct {
RedHatProvisioner
}
type GenericProvisioner ¶
type GenericProvisioner struct { OsReleaseId string DockerOptionsDir string DaemonOptionsFile string KubernetesManifestFile string Packages []string OsReleaseInfo *OsRelease Driver drivers.Driver AuthOptions auth.AuthOptions EngineOptions engine.EngineOptions SwarmOptions swarm.SwarmOptions }
func (*GenericProvisioner) CompatibleWithHost ¶
func (provisioner *GenericProvisioner) CompatibleWithHost() bool
func (*GenericProvisioner) GenerateDockerOptions ¶
func (provisioner *GenericProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
func (*GenericProvisioner) Generatek8sOptions ¶
func (provisioner *GenericProvisioner) Generatek8sOptions() (*k8sOptions, error)
func (*GenericProvisioner) GetAuthOptions ¶
func (provisioner *GenericProvisioner) GetAuthOptions() auth.AuthOptions
func (*GenericProvisioner) GetDockerOptionsDir ¶
func (provisioner *GenericProvisioner) GetDockerOptionsDir() string
func (*GenericProvisioner) GetDriver ¶
func (provisioner *GenericProvisioner) GetDriver() drivers.Driver
func (*GenericProvisioner) Hostname ¶
func (provisioner *GenericProvisioner) Hostname() (string, error)
func (*GenericProvisioner) SSHCommand ¶
func (provisioner *GenericProvisioner) SSHCommand(args string) (string, error)
func (*GenericProvisioner) SetHostname ¶
func (provisioner *GenericProvisioner) SetHostname(hostname string) error
func (*GenericProvisioner) SetOsReleaseInfo ¶
func (provisioner *GenericProvisioner) SetOsReleaseInfo(info *OsRelease)
type OsRelease ¶
type OsRelease struct { AnsiColor string `osr:"ANSI_COLOR"` Name string `osr:"NAME"` Version string `osr:"VERSION"` Id string `osr:"ID"` IdLike string `osr:"ID_LIKE"` PrettyName string `osr:"PRETTY_NAME"` VersionId string `osr:"VERSION_ID"` HomeUrl string `osr:"HOME_URL"` SupportUrl string `osr:"SUPPORT_URL"` BugReportUrl string `osr:"BUG_REPORT_URL"` }
Values in this struct must always be string or the reflection will not work properly.
func NewOsRelease ¶
func (*OsRelease) ParseOsRelease ¶
type Provisioner ¶
type Provisioner interface { // Create the files for the daemon to consume configuration settings (return struct of content and path) GenerateDockerOptions(dockerPort int) (*DockerOptions, error) // Create Kubernetes Manifest file (return struct of content and path) Generatek8sOptions() (*k8sOptions, error) // Get the directory where the settings files for docker are to be found GetDockerOptionsDir() string // Return the auth options used to configure remote connection for the daemon. GetAuthOptions() auth.AuthOptions // Run a package action e.g. install Package(name string, action pkgaction.PackageAction) error // Get Hostname Hostname() (string, error) // Set hostname SetHostname(hostname string) error // Figure out if this is the right provisioner to use based on /etc/os-release info CompatibleWithHost() bool // Do the actual provisioning piece: // 1. Set the hostname on the instance. // 2. Install Docker if it is not present. // 3. Configure the daemon to accept connections over TLS. // 4. Copy the needed certificates to the server and local config dir. // 5. Configure / activate swarm if applicable. Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, engineOptions engine.EngineOptions) error // Perform action on a named service e.g. stop Service(name string, action pkgaction.ServiceAction) error // Get the driver which is contained in the provisioner. GetDriver() drivers.Driver // Short-hand for accessing an SSH command from the driver. SSHCommand(args string) (string, error) // Set the OS Release info depending on how it's represented // internally SetOsReleaseInfo(info *OsRelease) }
Distribution specific actions
func DetectProvisioner ¶
func DetectProvisioner(d drivers.Driver) (Provisioner, error)
func NewBoot2DockerProvisioner ¶
func NewBoot2DockerProvisioner(d drivers.Driver) Provisioner
func NewCentosProvisioner ¶
func NewCentosProvisioner(d drivers.Driver) Provisioner
func NewDebianProvisioner ¶
func NewDebianProvisioner(d drivers.Driver) Provisioner
func NewFedoraProvisioner ¶
func NewFedoraProvisioner(d drivers.Driver) Provisioner
func NewRancherProvisioner ¶
func NewRancherProvisioner(d drivers.Driver) Provisioner
func NewRedHatProvisioner ¶
func NewRedHatProvisioner(d drivers.Driver) Provisioner
func NewUbuntuProvisioner ¶
func NewUbuntuProvisioner(d drivers.Driver) Provisioner
type RancherProvisioner ¶
type RancherProvisioner struct {
GenericProvisioner
}
func (*RancherProvisioner) Package ¶
func (provisioner *RancherProvisioner) Package(name string, action pkgaction.PackageAction) error
func (*RancherProvisioner) Provision ¶
func (provisioner *RancherProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, engineOptions engine.EngineOptions) error
func (*RancherProvisioner) Service ¶
func (provisioner *RancherProvisioner) Service(name string, action pkgaction.ServiceAction) error
func (*RancherProvisioner) SetHostname ¶
func (provisioner *RancherProvisioner) SetHostname(hostname string) error
type RedHatProvisioner ¶
type RedHatProvisioner struct { GenericProvisioner DockerRPMPath string }
func (*RedHatProvisioner) GenerateDockerOptions ¶
func (provisioner *RedHatProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error)
func (*RedHatProvisioner) Package ¶
func (provisioner *RedHatProvisioner) Package(name string, action pkgaction.PackageAction) error
func (*RedHatProvisioner) Provision ¶
func (provisioner *RedHatProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, engineOptions engine.EngineOptions) error
func (*RedHatProvisioner) SSHCommand ¶
func (provisioner *RedHatProvisioner) SSHCommand(args string) (string, error)
func (*RedHatProvisioner) Service ¶
func (provisioner *RedHatProvisioner) Service(name string, action pkgaction.ServiceAction) error
func (*RedHatProvisioner) SetHostname ¶
func (provisioner *RedHatProvisioner) SetHostname(hostname string) error
type RegisteredProvisioner ¶
type RegisteredProvisioner struct {
New func(d drivers.Driver) Provisioner
}
Detection
type SwarmCommandContext ¶
type SwarmCommandContext struct { ContainerName string DockerDir string DockerPort int Ip string Port string AuthOptions auth.AuthOptions SwarmOptions swarm.SwarmOptions SwarmImage string }
type UbuntuProvisioner ¶
type UbuntuProvisioner struct {
GenericProvisioner
}
func (*UbuntuProvisioner) Package ¶
func (provisioner *UbuntuProvisioner) Package(name string, action pkgaction.PackageAction) error
func (*UbuntuProvisioner) Provision ¶
func (provisioner *UbuntuProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions, engineOptions engine.EngineOptions) error
func (*UbuntuProvisioner) Service ¶
func (provisioner *UbuntuProvisioner) Service(name string, action pkgaction.ServiceAction) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.