setup

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup() error

Setup sets up the cluster

func SetupOrDie

func SetupOrDie()

SetupOrDie sets up the cluster and panics if setup fails

Types

type AppSetup

type AppSetup interface {
	// SetReplicas sets the number of application nodes
	SetReplicas(replicas int) AppSetup

	// SetImage sets the image to deploy
	SetImage(image string) AppSetup

	// SetPullPolicy sets the image pull policy
	SetPullPolicy(pullPolicy corev1.PullPolicy) AppSetup

	// AddPort adds a port to expose
	AddPort(name string, port int) AppSetup

	// SetPorts sets the ports to expose
	SetPorts(ports map[string]int) AppSetup

	// SetDebug sets whether to enable debug mode
	SetDebug(debug bool) AppSetup

	// SetUser sets the user with which to run the application
	SetUser(user int) AppSetup

	// SetPrivileged sets the application to run in privileged mode
	SetPrivileged(privileged bool) AppSetup

	// SetSecrets sets the app secrets
	SetSecrets(secrets map[string]string) AppSetup

	// AddSecret adds a secret to the app
	AddSecret(path, value string) AppSetup

	// SetEnv sets the environment variables
	SetEnv(env map[string]string) AppSetup

	// AddEnv adds an environment variable
	AddEnv(name, value string) AppSetup

	// SetArgs sets the application arguments
	SetArgs(args ...string) AppSetup
}

AppSetup is an interface for setting up an application

func App

func App(name string) AppSetup

App returns the setup configuration for an application

type AtomixSetup

type AtomixSetup interface {
	// SetImage sets the Atomix controller image to deploy
	SetImage(image string) AtomixSetup

	// SetPullPolicy sets the image pull policy
	SetPullPolicy(pullPolicy corev1.PullPolicy) AtomixSetup
}

AtomixSetup is an interface for setting up the Atomix controller

func Atomix

func Atomix() AtomixSetup

Atomix returns the setup configuration for the Atomix controller

type CLISetup

type CLISetup interface {
	// SetEnabled enables the CLI
	SetEnabled() CLISetup

	// SetImage sets the onos-cli image to deploy
	SetImage(image string) CLISetup

	// SetPullPolicy sets the image pull policy
	SetPullPolicy(pullPolicy corev1.PullPolicy) CLISetup
}

CLISetup is an interface for setting up CLI nodes

func CLI

func CLI() CLISetup

CLI returns the setup configuration for the CLI service

type ClusterSetup

type ClusterSetup interface {
	// Atomix returns the setup configuration for the Atomix controller
	Atomix() AtomixSetup

	// Database returns the setup configuration for a database
	Database(name ...string) DatabaseSetup

	// CLI returns the setup configuration for the ONSO CLI service
	CLI() CLISetup

	// Topo returns the setup configuration for the ONOS topo service
	Topo() TopoSetup

	// Config returns the setup configuration for the ONOS config service
	Config() ConfigSetup

	// RIC returns the setup configuration for the ONOS RIC service
	RIC() RICSetup

	// App returns the setup configuration for an application
	App(name string) AppSetup

	// Setup sets up the cluster
	Setup() error

	// SetupOrDie sets up the cluster and panics if the setup fails
	SetupOrDie()
}

ClusterSetup is an interface for setting up ONOS clusters

func New

func New(kube kube.API) ClusterSetup

New returns a new onit ClusterSetup

type ConfigSetup

type ConfigSetup interface {
	// SetReplicas sets the number of replicas to deploy
	SetReplicas(replicas int) ConfigSetup

	// SetImage sets the onos-config image to deploy
	SetImage(image string) ConfigSetup

	// SetPullPolicy sets the image pull policy
	SetPullPolicy(pullPolicy corev1.PullPolicy) ConfigSetup

	// SetCpuRequest sets the cpu request
	SetCPURequest(cpuRequest string) ConfigSetup

	// SetMemoryRequest sets memory request
	SetMemoryRequest(memoryRequest string) ConfigSetup

	// SetMemoryLimit sets memory limit
	SetMemoryLimit(memoryLimit string) ConfigSetup

	// SetCPULimit sets cpu limit
	SetCPULimit(cpuLimit string) ConfigSetup
}

ConfigSetup is an interface for setting up config nodes

func Config

func Config() ConfigSetup

Config returns the setup configuration for the config service

type DatabaseSetup

type DatabaseSetup interface {
	// Raft configures the partitions to use the Raft consensus protocol
	Raft() RaftDatabaseSetup

	// NOPaxos configures the partitions to use the NOPaxos consensus protocol
	NOPaxos() NOPaxosDatabaseSetup
}

DatabaseSetup is an interface for setting up a database

func Database

func Database(name ...string) DatabaseSetup

Database returns the setup configuration for a database

type NOPaxosDatabaseSetup

type NOPaxosDatabaseSetup interface {
	// SetPartitions sets the number of partitions to deploy
	SetPartitions(partitions int) NOPaxosDatabaseSetup

	// SetReplicasPerPartition sets the number of replicas per partition
	SetReplicasPerPartition(replicas int) NOPaxosDatabaseSetup

	// SetSequencerImage sets the sequencer image to deploy
	SetSequencerImage(image string) NOPaxosDatabaseSetup

	// SetSequencerPullPolicy sets the sequencer image pull policy
	SetSequencerPullPolicy(pullPolicy corev1.PullPolicy) NOPaxosDatabaseSetup

	// SetReplicaImage sets the replica image to deploy
	SetReplicaImage(image string) NOPaxosDatabaseSetup

	// SetReplicaPullPolicy sets the replica image pull policy
	SetReplicaPullPolicy(pullPolicy corev1.PullPolicy) NOPaxosDatabaseSetup
}

NOPaxosDatabaseSetup is an interface for setting up NOPaxos partitions

type RICSetup

type RICSetup interface {

	// SetEnabled enables the Ran subsystem
	SetEnabled() RICSetup

	// SetReplicas sets the number of ran replicas to deploy
	SetReplicas(replicas int) RICSetup

	// SetImage sets the onos-ric image to deploy
	SetImage(image string) RICSetup

	// SetPullPolicy sets the image pull policy
	SetPullPolicy(pullPolicy corev1.PullPolicy) RICSetup

	// SetCpuRequest sets the cpu request
	SetCPURequest(cpuRequest string) RICSetup

	// SetMemoryRequest sets memory request
	SetMemoryRequest(memoryRequest string) RICSetup

	// SetMemoryLimit sets memory limit
	SetMemoryLimit(memoryLimit string) RICSetup

	// SetCPULimit sets cpu limit
	SetCPULimit(cpuLimit string) RICSetup
}

RICSetup is an interface for setting up ran nodes

func RIC

func RIC() RICSetup

RIC returns the setup configuration for the ran service

type RaftDatabaseSetup

type RaftDatabaseSetup interface {
	// SetPartitions sets the number of partitions to deploy
	SetPartitions(partitions int) RaftDatabaseSetup

	// SetClusters sets the number of clusters in the database
	SetClusters(clusters int) RaftDatabaseSetup

	// SetReplicas sets the number of replicas per partition
	SetReplicas(replicas int) RaftDatabaseSetup

	// SetImage sets the Raft image to deploy
	SetImage(image string) RaftDatabaseSetup

	// SetPullPolicy sets the image pull policy
	SetPullPolicy(pullPolicy corev1.PullPolicy) RaftDatabaseSetup
}

RaftDatabaseSetup is an interface for setting up Raft partitions

type TopoSetup

type TopoSetup interface {
	// SetReplicas sets the number of topo replicas to deploy
	SetReplicas(replicas int) TopoSetup

	// SetImage sets the onos-topo image to deploy
	SetImage(image string) TopoSetup

	// SetPullPolicy sets the image pull policy
	SetPullPolicy(pullPolicy corev1.PullPolicy) TopoSetup

	// SetCpuRequest sets the cpu request
	SetCPURequest(cpuRequest string) TopoSetup

	// SetMemoryRequest sets memory request
	SetMemoryRequest(memoryRequest string) TopoSetup

	// SetMemoryLimit sets memory limit
	SetMemoryLimit(memoryLimit string) TopoSetup

	// SetCPULimit sets cpu limit
	SetCPULimit(cpuLimit string) TopoSetup
}

TopoSetup is an interface for setting up topo nodes

func Topo

func Topo() TopoSetup

Topo returns the setup configuration for the topo service

Jump to

Keyboard shortcuts

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