providers

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedProviders []string = []string{
	"k8s",
	"google",
	"lxd",
	"microk8s",
}

SupportedProviders is a list of stringified names of supported providers.

Functions

This section is empty.

Types

type Google added in v0.6.0

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

Google represents a Google cloud to bootstrap.

func NewGoogle added in v0.6.0

func NewGoogle(system system.Worker, config *config.Config) *Google

NewGoogle constructs a new Google provider instance.

func (*Google) Bootstrap added in v0.6.0

func (l *Google) Bootstrap() bool

Bootstrap reports whether a Juju controller should be bootstrapped on Google.

func (*Google) BootstrapConstraints added in v0.9.0

func (l *Google) BootstrapConstraints() map[string]string

BootstrapConstraints reports the Juju bootstrap-constraints specific to the provider.

func (*Google) CloudName added in v0.6.0

func (l *Google) CloudName() string

CloudName reports the name of the provider as Juju sees it.

func (*Google) Credentials added in v0.6.0

func (l *Google) Credentials() map[string]interface{}

Credentials reports the section of Juju's credentials.yaml for the provider.

func (*Google) GroupName added in v0.6.0

func (l *Google) GroupName() string

GroupName reports the name of the POSIX group with permissions over the Google socket.

func (*Google) ModelDefaults added in v0.9.0

func (l *Google) ModelDefaults() map[string]string

ModelDefaults reports the Juju model-defaults specific to the provider.

func (*Google) Name added in v0.6.0

func (l *Google) Name() string

Name reports the name of the provider for Concierge's purposes.

func (*Google) Prepare added in v0.6.0

func (l *Google) Prepare() error

Prepare installs and configures Google such that it can work in testing environments. This includes installing the snap, enabling the user who ran concierge to interact with Google without sudo, and deconflicting the firewall rules with docker.

func (*Google) Restore added in v0.6.0

func (l *Google) Restore() error

Remove Google provider.

type K8s added in v0.8.0

type K8s struct {
	Channel  string
	Features map[string]map[string]string
	// contains filtered or unexported fields
}

K8s represents a K8s install on a given machine.

func NewK8s added in v0.8.0

func NewK8s(r system.Worker, config *config.Config) *K8s

NewK8s constructs a new K8s provider instance.

func (*K8s) Bootstrap added in v0.8.0

func (k *K8s) Bootstrap() bool

Bootstrap reports whether a Juju controller should be bootstrapped onto the provider.

func (*K8s) BootstrapConstraints added in v0.9.0

func (m *K8s) BootstrapConstraints() map[string]string

BootstrapConstraints reports the Juju bootstrap-constraints specific to the provider.

func (*K8s) CloudName added in v0.8.0

func (k *K8s) CloudName() string

CloudName reports the name of the provider as Juju sees it.

func (K8s) Credentials added in v0.8.0

func (m K8s) Credentials() map[string]interface{}

Credentials reports the section of Juju's credentials.yaml for the provider

func (*K8s) GroupName added in v0.8.0

func (k *K8s) GroupName() string

GroupName reports the name of the POSIX group with permission to use K8s.

func (*K8s) ModelDefaults added in v0.9.0

func (m *K8s) ModelDefaults() map[string]string

ModelDefaults reports the Juju model-defaults specific to the provider.

func (*K8s) Name added in v0.8.0

func (k *K8s) Name() string

Name reports the name of the provider for Concierge's purposes.

func (*K8s) Prepare added in v0.8.0

func (k *K8s) Prepare() error

Prepare installs and configures K8s such that it can work in testing environments. This includes installing the snap, enabling the user who ran concierge to interact with K8s without sudo, and sets up the user's kubeconfig file.

func (*K8s) Restore added in v0.8.0

func (k *K8s) Restore() error

Remove uninstalls K8s and kubectl.

type LXD

type LXD struct {
	Channel string
	// contains filtered or unexported fields
}

LXD represents a LXD install on a given machine.

func NewLXD

func NewLXD(r system.Worker, config *config.Config) *LXD

NewLXD constructs a new LXD provider instance.

func (*LXD) Bootstrap added in v0.4.0

func (l *LXD) Bootstrap() bool

Bootstrap reports whether a Juju controller should be bootstrapped on LXD.

func (*LXD) BootstrapConstraints added in v0.9.0

func (l *LXD) BootstrapConstraints() map[string]string

BootstrapConstraints reports the Juju bootstrap-constraints specific to the provider.

func (*LXD) CloudName

func (l *LXD) CloudName() string

CloudName reports the name of the provider as Juju sees it.

func (*LXD) Credentials added in v0.6.0

func (l *LXD) Credentials() map[string]interface{}

Credentials reports the section of Juju's credentials.yaml for the provider

func (*LXD) GroupName

func (l *LXD) GroupName() string

GroupName reports the name of the POSIX group with permissions over the LXD socket.

func (*LXD) ModelDefaults added in v0.9.0

func (l *LXD) ModelDefaults() map[string]string

ModelDefaults reports the Juju model-defaults specific to the provider.

func (*LXD) Name

func (l *LXD) Name() string

Name reports the name of the provider for Concierge's purposes.

func (*LXD) Prepare added in v0.3.0

func (l *LXD) Prepare() error

Prepare installs and configures LXD such that it can work in testing environments. This includes installing the snap, enabling the user who ran concierge to interact with LXD without sudo, and deconflicting the firewall rules with docker.

func (*LXD) Restore added in v0.3.0

func (l *LXD) Restore() error

Remove uninstalls LXD.

type MicroK8s

type MicroK8s struct {
	Channel string
	Addons  []string
	// contains filtered or unexported fields
}

MicroK8s represents a MicroK8s install on a given machine.

func NewMicroK8s

func NewMicroK8s(r system.Worker, config *config.Config) *MicroK8s

NewMicroK8s constructs a new MicroK8s provider instance.

func (*MicroK8s) Bootstrap added in v0.4.0

func (m *MicroK8s) Bootstrap() bool

Bootstrap reports whether a Juju controller should be bootstrapped onto the provider.

func (*MicroK8s) BootstrapConstraints added in v0.9.0

func (m *MicroK8s) BootstrapConstraints() map[string]string

BootstrapConstraints reports the Juju bootstrap-constraints specific to the provider.

func (*MicroK8s) CloudName

func (m *MicroK8s) CloudName() string

CloudName reports the name of the provider as Juju sees it.

func (MicroK8s) Credentials added in v0.6.0

func (m MicroK8s) Credentials() map[string]interface{}

Credentials reports the section of Juju's credentials.yaml for the provider

func (*MicroK8s) GroupName

func (m *MicroK8s) GroupName() string

GroupName reports the name of the POSIX group with permission to use MicroK8s.

func (*MicroK8s) ModelDefaults added in v0.9.0

func (m *MicroK8s) ModelDefaults() map[string]string

ModelDefaults reports the Juju model-defaults specific to the provider.

func (*MicroK8s) Name

func (m *MicroK8s) Name() string

Name reports the name of the provider for Concierge's purposes.

func (*MicroK8s) Prepare added in v0.3.0

func (m *MicroK8s) Prepare() error

Prepare installs and configures MicroK8s such that it can work in testing environments. This includes installing the snap, enabling the user who ran concierge to interact with MicroK8s without sudo, and sets up the user's kubeconfig file.

func (*MicroK8s) Restore added in v0.3.0

func (m *MicroK8s) Restore() error

Remove uninstalls MicroK8s and kubectl.

type Provider

type Provider interface {
	// Prepare is used for installing/configuring the provider.
	Prepare() error
	// Restore is used for uninstalling the provider.
	Restore() error
	// Name reports the name of the provider used internally by concierge.
	Name() string
	// Bootstrap reports whether or not a Juju controller should be bootstrapped on the provider.
	Bootstrap() bool
	// CloudName reports name of the provider as Juju sees it.
	CloudName() string
	// GroupName reports the name of a POSIX user group that can be used
	// to allow non-root users to interact with the provider (where applicable).
	GroupName() string
	// Credentials reports the section of Juju's credentials.yaml for the provider.
	Credentials() map[string]interface{}
	// ModelDefaults reports the Juju model-defaults specific to the provider.
	ModelDefaults() map[string]string
	// BootstrapConstraints reports the Juju bootstrap-constraints specific to the provider.
	BootstrapConstraints() map[string]string
}

Provider describes the set of methods expected to be available on a provider that concierge can try to bootstrap Juju onto.

func NewProvider added in v0.6.0

func NewProvider(providerName string, system system.Worker, config *config.Config) Provider

NewProvider returns a newly constructed provider based on a stringified name of the provider.

Jump to

Keyboard shortcuts

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