Documentation
¶
Index ¶
- Variables
- type DockerInstaller
- func (i *DockerInstaller) HasRunner(ctx context.Context, opts *InstallOpts) (bool, error)
- func (i *DockerInstaller) Install(ctx context.Context, opts *InstallOpts) (*InstallResults, string, error)
- func (i *DockerInstaller) InstallFlags(set *flag.Set)
- func (i *DockerInstaller) InstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *DockerInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
- func (i *DockerInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error
- func (i *DockerInstaller) UninstallFlags(set *flag.Set)
- func (i *DockerInstaller) UninstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *DockerInstaller) Upgrade(ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (*InstallResults, error)
- func (i *DockerInstaller) UpgradeFlags(set *flag.Set)
- type ECSInstaller
- func (i *ECSInstaller) HasRunner(ctx context.Context, opts *InstallOpts) (bool, error)
- func (i *ECSInstaller) Install(ctx context.Context, opts *InstallOpts) (*InstallResults, string, error)
- func (i *ECSInstaller) InstallFlags(set *flag.Set)
- func (i *ECSInstaller) InstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *ECSInstaller) Launch(ctx context.Context, log hclog.Logger, ui terminal.UI, sess *session.Session, ...) (*ecsServer, error)
- func (i *ECSInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
- func (i *ECSInstaller) SetupCluster(ctx context.Context, ui terminal.UI, sess *session.Session) (string, error)
- func (i *ECSInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error
- func (i *ECSInstaller) UninstallFlags(set *flag.Set)
- func (i *ECSInstaller) UninstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *ECSInstaller) Upgrade(ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (*InstallResults, error)
- func (i *ECSInstaller) UpgradeFlags(set *flag.Set)
- type InstallOpts
- type InstallResults
- type InstallRunnerOpts
- type Installer
- type K8sInstaller
- func (i *K8sInstaller) HasRunner(ctx context.Context, opts *InstallOpts) (bool, error)
- func (i *K8sInstaller) Install(ctx context.Context, opts *InstallOpts) (*InstallResults, string, error)
- func (i *K8sInstaller) InstallFlags(set *flag.Set)
- func (i *K8sInstaller) InstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *K8sInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
- func (i *K8sInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error
- func (i *K8sInstaller) UninstallFlags(set *flag.Set)
- func (i *K8sInstaller) UninstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *K8sInstaller) Upgrade(ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (*InstallResults, error)
- func (i *K8sInstaller) UpgradeFlags(set *flag.Set)
- type Lifecycle
- type Logging
- type NomadInstaller
- func (i *NomadInstaller) HasRunner(ctx context.Context, opts *InstallOpts) (bool, error)
- func (i *NomadInstaller) Install(ctx context.Context, opts *InstallOpts) (*InstallResults, string, error)
- func (i *NomadInstaller) InstallFlags(set *flag.Set)
- func (i *NomadInstaller) InstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *NomadInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
- func (i *NomadInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error
- func (i *NomadInstaller) UninstallFlags(set *flag.Set)
- func (i *NomadInstaller) UninstallRunner(ctx context.Context, opts *runnerinstall.InstallOpts) error
- func (i *NomadInstaller) Upgrade(ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (*InstallResults, error)
- func (i *NomadInstaller) UpgradeFlags(set *flag.Set)
Constants ¶
This section is empty.
Variables ¶
var Platforms = map[string]Installer{
"ecs": &ECSInstaller{},
"kubernetes": &K8sInstaller{},
"nomad": &NomadInstaller{},
"docker": &DockerInstaller{},
}
Functions ¶
This section is empty.
Types ¶
type DockerInstaller ¶ added in v0.2.0
type DockerInstaller struct {
// contains filtered or unexported fields
}
func (*DockerInstaller) HasRunner ¶ added in v0.3.0
func (i *DockerInstaller) HasRunner(
ctx context.Context,
opts *InstallOpts,
) (bool, error)
HasRunner implements Installer.
func (*DockerInstaller) Install ¶ added in v0.2.0
func (i *DockerInstaller) Install(
ctx context.Context,
opts *InstallOpts,
) (*InstallResults, string, error)
Install is a method of DockerInstaller and implements the Installer interface to create a waypoint-server as a Docker container
func (*DockerInstaller) InstallFlags ¶ added in v0.2.0
func (i *DockerInstaller) InstallFlags(set *flag.Set)
func (*DockerInstaller) InstallRunner ¶ added in v0.3.0
func (i *DockerInstaller) InstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
InstallRunner implements Installer by starting a single runner container.
func (*DockerInstaller) OnDemandRunnerConfig ¶ added in v0.6.0
func (i *DockerInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
func (*DockerInstaller) Uninstall ¶ added in v0.2.1
func (i *DockerInstaller) Uninstall(
ctx context.Context,
opts *InstallOpts,
) error
Install is a method of DockerInstaller and implements the Installer interface to remove the waypoint-server Docker container and associated image and volume
func (*DockerInstaller) UninstallFlags ¶ added in v0.2.1
func (i *DockerInstaller) UninstallFlags(set *flag.Set)
func (*DockerInstaller) UninstallRunner ¶ added in v0.3.0
func (i *DockerInstaller) UninstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
UninstallRunner implements Installer.
func (*DockerInstaller) Upgrade ¶ added in v0.2.1
func (i *DockerInstaller) Upgrade(
ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (
*InstallResults, error,
)
Upgrade is a method of DockerInstaller and implements the Installer interface to upgrade a waypoint-server as a Docker container
func (*DockerInstaller) UpgradeFlags ¶ added in v0.2.1
func (i *DockerInstaller) UpgradeFlags(set *flag.Set)
type ECSInstaller ¶ added in v0.4.0
type ECSInstaller struct {
// contains filtered or unexported fields
}
func (*ECSInstaller) HasRunner ¶ added in v0.4.0
func (i *ECSInstaller) HasRunner(
ctx context.Context,
opts *InstallOpts,
) (bool, error)
HasRunner implements Installer.
func (*ECSInstaller) Install ¶ added in v0.4.0
func (i *ECSInstaller) Install(
ctx context.Context,
opts *InstallOpts,
) (*InstallResults, string, error)
Install is a method of ECSInstaller and implements the Installer interface to register a waypoint-server in a ecs cluster
func (*ECSInstaller) InstallFlags ¶ added in v0.4.0
func (i *ECSInstaller) InstallFlags(set *flag.Set)
func (*ECSInstaller) InstallRunner ¶ added in v0.4.0
func (i *ECSInstaller) InstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
InstallRunner implements Installer.
func (*ECSInstaller) Launch ¶ added in v0.4.0
func (i *ECSInstaller) Launch(
ctx context.Context,
log hclog.Logger,
ui terminal.UI,
sess *session.Session,
efsInfo *awsinstallutil.EfsInformation,
netInfo *awsinstallutil.NetworkInformation,
executionRoleArn, clusterName, logGroup string, rawRunFlags []string,
) (*ecsServer, error)
Launch takes the previously created resource and launches the Waypoint server service
func (*ECSInstaller) OnDemandRunnerConfig ¶ added in v0.6.0
func (i *ECSInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
OnDemandRunnerConfig implements OnDemandRunnerConfigProvider
func (*ECSInstaller) SetupCluster ¶ added in v0.4.0
func (i *ECSInstaller) SetupCluster(
ctx context.Context,
ui terminal.UI,
sess *session.Session,
) (string, error)
func (*ECSInstaller) Uninstall ¶ added in v0.4.0
func (i *ECSInstaller) Uninstall(
ctx context.Context,
opts *InstallOpts,
) error
Uninstall is a method of ECSInstaller and implements the Installer interface to remove a waypoint-server statefulset and the associated PVC and service from a ecs cluster
func (*ECSInstaller) UninstallFlags ¶ added in v0.4.0
func (i *ECSInstaller) UninstallFlags(set *flag.Set)
func (*ECSInstaller) UninstallRunner ¶ added in v0.4.0
func (i *ECSInstaller) UninstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
func (*ECSInstaller) Upgrade ¶ added in v0.4.0
func (i *ECSInstaller) Upgrade(
ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (
*InstallResults, error,
)
Upgrade is a method of ECSInstaller and implements the Installer interface to upgrade a waypoint-server in a ecs cluster
func (*ECSInstaller) UpgradeFlags ¶ added in v0.4.0
func (i *ECSInstaller) UpgradeFlags(set *flag.Set)
type InstallOpts ¶ added in v0.2.1
type InstallOpts struct {
Log hclog.Logger
UI terminal.UI
ServerRunFlags []string
}
InstallOpts are the options sent to Installer.Install.
type InstallResults ¶ added in v0.2.1
type InstallResults struct {
// Context is the connection context that can be used to connect from
// the CLI to the server. This will be used to establish an API client.
Context *clicontext.Config
// AdvertiseAddr is the configuration for the advertised address
// that entrypoints (deployed workloads) will use to communicate back
// to the server. This may be different from the context info because this
// may be a private address.
AdvertiseAddr *pb.ServerConfig_AdvertiseAddr
// HTTPAddr is the address to the HTTP listener on the server. This generally
// is reachable from the CLI immediately and not a private address.
HTTPAddr string
}
InstallResults are the results expected for a successful Installer.Install.
type InstallRunnerOpts ¶ added in v0.3.0
type InstallRunnerOpts struct {
Log hclog.Logger
UI terminal.UI
// AuthToken is an auth token that can be used for this runner.
AuthToken string
// AdvertiseAddr is the advertised address configuration currently set
// for the server. This is likely the same information you want to use
// for the runner to connect to the server, but doesn't have to be.
AdvertiseAddr *pb.ServerConfig_AdvertiseAddr
// AdvertiseClient is the serverconfig.Client information for connecting
// to the server via the AdvertiseAddr information. This also has the auth
// token already set. This is provided as a convenience since it is common
// to build this immediately.
AdvertiseClient *serverconfig.Client
Cookie string
Id string
}
InstallRunnerOpts are the options sent to Installer.InstallRunner.
type Installer ¶ added in v0.2.0
type Installer interface {
// HasRunner returns true if a runner is installed.
HasRunner(context.Context, *InstallOpts) (bool, error)
// Install expects the Waypoint server to be installed.
// Returns InstallResults, a bootstrap token (if platform sets one up), or an error
Install(context.Context, *InstallOpts) (*InstallResults, string, error)
// InstallRunner expects a Waypoint runner to be installed.
InstallRunner(context.Context, *runnerinstall.InstallOpts) error
// InstallFlags is called prior to Install and allows the installer to
// specify flags for the install CLI. The flags should be prefixed with
// the platform name to avoid conflicts with other flags.
InstallFlags(*flag.Set)
// Upgrade expects the Waypoint server to be upgraded from a previous install.
// After upgrading the server, this should also upgrade the primary
// runner that was installed with InstallRunner, if it exists.
Upgrade(ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (*InstallResults, error)
// UpgradeFlags is called prior to Upgrade and allows the upgrader to
// specify flags for the upgrade CLI. The flags should be prefixed with
// the platform name to avoid conflicts with other flags.
UpgradeFlags(*flag.Set)
// Uninstall expects the Waypoint server to be uninstalled. This should
// also look up to see if any runners exist (installed via InstallRunner)
// and remove those as well. Runners manually installed outside of this
// interface should not be touched.
Uninstall(context.Context, *InstallOpts) error
// UninstallRunner should remove the runner(s) installed via InstallRunner.
//
// No runners may exist. Runners installed manually by the user should be
// ignored (i.e. InstallRunner should set some identifiers that can be used
// to distinguish between automatically installed vs. manually installed).
UninstallRunner(context.Context, *runnerinstall.InstallOpts) error
// UninstallFlags is called prior to Uninstall and allows the Uninstaller to
// specify flags for the uninstall CLI. The flags should be prefixed with the
// platform name to avoid conflicts with other flags.
UninstallFlags(*flag.Set)
}
Installer is implemented by the server platforms and is responsible for managing the installation of the Waypoint server.
type K8sInstaller ¶ added in v0.2.0
type K8sInstaller struct {
Config k8sinstallutil.K8sConfig
}
func (*K8sInstaller) HasRunner ¶ added in v0.3.0
func (i *K8sInstaller) HasRunner(
ctx context.Context,
opts *InstallOpts,
) (bool, error)
HasRunner implements Installer.
func (*K8sInstaller) Install ¶ added in v0.2.0
func (i *K8sInstaller) Install(
ctx context.Context,
opts *InstallOpts,
) (*InstallResults, string, error)
Install is a method of K8sInstaller and implements the Installer interface to register a waypoint-server in a Kubernetes cluster
func (*K8sInstaller) InstallFlags ¶ added in v0.2.0
func (i *K8sInstaller) InstallFlags(set *flag.Set)
func (*K8sInstaller) InstallRunner ¶ added in v0.3.0
func (i *K8sInstaller) InstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
InstallRunner implements Installer.
func (*K8sInstaller) OnDemandRunnerConfig ¶ added in v0.6.0
func (i *K8sInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
OnDemandRunnerConfig implements OnDemandRunnerConfigProvider
func (*K8sInstaller) Uninstall ¶ added in v0.2.1
func (i *K8sInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error
Uninstall is a method of K8sInstaller and implements the Installer interface to remove a waypoint-server statefulset and the associated PVC and service from a Kubernetes cluster
func (*K8sInstaller) UninstallFlags ¶ added in v0.2.1
func (i *K8sInstaller) UninstallFlags(set *flag.Set)
func (*K8sInstaller) UninstallRunner ¶ added in v0.3.0
func (i *K8sInstaller) UninstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
UninstallRunner implements Installer.
func (*K8sInstaller) Upgrade ¶ added in v0.2.1
func (i *K8sInstaller) Upgrade(
ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (
*InstallResults, error,
)
Upgrade is a method of K8sInstaller and implements the Installer interface to upgrade a waypoint-server in a Kubernetes cluster
func (*K8sInstaller) UpgradeFlags ¶ added in v0.2.1
func (i *K8sInstaller) UpgradeFlags(set *flag.Set)
type Lifecycle ¶ added in v0.4.0
type Lifecycle struct {
Init func(terminal.UI) error
Run func(terminal.UI) error
Cleanup func(terminal.UI) error
}
type Logging ¶ added in v0.4.0
type Logging struct {
CreateGroup bool `hcl:"create_group,optional"`
StreamPrefix string `hcl:"stream_prefix,optional"`
DateTimeFormat string `hcl:"datetime_format,optional"`
MultilinePattern string `hcl:"multiline_pattern,optional"`
Mode string `hcl:"mode,optional"`
MaxBufferSize string `hcl:"max_buffer_size,optional"`
}
type NomadInstaller ¶ added in v0.2.0
type NomadInstaller struct {
// contains filtered or unexported fields
}
func (*NomadInstaller) HasRunner ¶ added in v0.3.0
func (i *NomadInstaller) HasRunner(
ctx context.Context,
opts *InstallOpts,
) (bool, error)
HasRunner implements Installer.
func (*NomadInstaller) Install ¶ added in v0.2.0
func (i *NomadInstaller) Install(
ctx context.Context,
opts *InstallOpts,
) (*InstallResults, string, error)
Install is a method of NomadInstaller and implements the Installer interface to register a waypoint-server job with a Nomad cluster
func (*NomadInstaller) InstallFlags ¶ added in v0.2.0
func (i *NomadInstaller) InstallFlags(set *flag.Set)
func (*NomadInstaller) InstallRunner ¶ added in v0.3.0
func (i *NomadInstaller) InstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
InstallRunner implements Installer.
func (*NomadInstaller) OnDemandRunnerConfig ¶ added in v0.6.2
func (i *NomadInstaller) OnDemandRunnerConfig() *pb.OnDemandRunnerConfig
func (*NomadInstaller) Uninstall ¶ added in v0.2.1
func (i *NomadInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error
Unnstall is a method of NomadInstaller and implements the Installer interface to stop and purge the waypoint-server job on a Nomad cluster
func (*NomadInstaller) UninstallFlags ¶ added in v0.2.1
func (i *NomadInstaller) UninstallFlags(set *flag.Set)
func (*NomadInstaller) UninstallRunner ¶ added in v0.3.0
func (i *NomadInstaller) UninstallRunner(
ctx context.Context,
opts *runnerinstall.InstallOpts,
) error
UninstallRunner implements Installer.
func (*NomadInstaller) Upgrade ¶ added in v0.2.1
func (i *NomadInstaller) Upgrade(
ctx context.Context, opts *InstallOpts, serverCfg serverconfig.Client) (
*InstallResults, error,
)
Upgrade is a method of NomadInstaller and implements the Installer interface to upgrade a waypoint-server in a Nomad cluster
func (*NomadInstaller) UpgradeFlags ¶ added in v0.2.1
func (i *NomadInstaller) UpgradeFlags(set *flag.Set)