automationconfig

package
v0.0.8-prerelease Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Mongod                ProcessType = "mongod"
	DefaultMongoDBDataDir             = "/data"
	DefaultAgentLogPath               = "/var/log/mongodb-mms-automation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Args26

type Args26 struct {
	Net         Net         `json:"net"`
	Security    Security    `json:"security"`
	Storage     Storage     `json:"storage"`
	Replication Replication `json:"replication"`
}

type Auth

type Auth struct {
	// Users is a list which contains the desired users at the project level.
	Users    []MongoDBUser `json:"usersWanted,omitempty"`
	Disabled bool          `json:"disabled"`
	// AuthoritativeSet indicates if the MongoDBUsers should be synced with the current list of Users
	AuthoritativeSet bool `json:"authoritativeSet"`
	// AutoAuthMechanisms is a list of auth mechanisms the Automation Agent is able to use
	AutoAuthMechanisms []string `json:"autoAuthMechanisms,omitempty"`

	// AutoAuthMechanism is the currently active agent authentication mechanism. This is a read only
	// field
	AutoAuthMechanism string `json:"autoAuthMechanism"`
	// DeploymentAuthMechanisms is a list of possible auth mechanisms that can be used within deployments
	DeploymentAuthMechanisms []string `json:"deploymentAuthMechanisms,omitempty"`
	// AutoUser is the MongoDB Automation Agent user, when x509 is enabled, it should be set to the subject of the AA's certificate
	AutoUser string `json:"autoUser,omitempty"`
	// Key is the contents of the KeyFile, the automation agent will ensure this a KeyFile with these contents exists at the `KeyFile` path
	Key string `json:"key,omitempty"`
	// KeyFile is the path to a keyfile with read & write permissions. It is a required field if `Disabled=false`
	KeyFile string `json:"keyfile,omitempty"`
	// KeyFileWindows is required if `Disabled=false` even if the value is not used
	KeyFileWindows string `json:"keyfileWindows,omitempty"`
	// AutoPwd is a required field when going from `Disabled=false` to `Disabled=true`
	AutoPwd string `json:"autoPwd,omitempty"`
}

func DisabledAuth

func DisabledAuth() Auth

type AutomationConfig

type AutomationConfig struct {
	Version     int          `json:"version"`
	Processes   []Process    `json:"processes"`
	ReplicaSets []ReplicaSet `json:"replicaSets"`
	Auth        Auth         `json:"auth"`
	SSL         SSL          `json:"ssl"`

	Versions []MongoDbVersionConfig `json:"mongoDbVersions"`
	Options  Options                `json:"options"`
}

type BuildConfig

type BuildConfig struct {
	Platform     string   `json:"platform"`
	Url          string   `json:"url"`
	GitVersion   string   `json:"gitVersion"`
	Architecture string   `json:"architecture"`
	Flavor       string   `json:"flavor"`
	MinOsVersion string   `json:"minOsVersion"`
	MaxOsVersion string   `json:"maxOsVersion"`
	Modules      []string `json:"modules"`
}

type Builder

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

func NewBuilder

func NewBuilder() *Builder

func (*Builder) AddVersion

func (b *Builder) AddVersion(version MongoDbVersionConfig) *Builder

func (*Builder) Build

func (b *Builder) Build() (AutomationConfig, error)

func (*Builder) SetDomain

func (b *Builder) SetDomain(domain string) *Builder

func (*Builder) SetFCV

func (b *Builder) SetFCV(fcv string) *Builder

func (*Builder) SetMembers

func (b *Builder) SetMembers(members int) *Builder

func (*Builder) SetMongoDBVersion

func (b *Builder) SetMongoDBVersion(version string) *Builder

func (*Builder) SetName

func (b *Builder) SetName(name string) *Builder

func (*Builder) SetPreviousAutomationConfig added in v0.0.7

func (b *Builder) SetPreviousAutomationConfig(previousAC AutomationConfig) *Builder

func (*Builder) SetTLS

func (b *Builder) SetTLS(caFile, certAndKeyFile string, mode SSLMode) *Builder

func (*Builder) SetTopology

func (b *Builder) SetTopology(topology Topology) *Builder

type ClientCertificateMode

type ClientCertificateMode string
const (
	ClientCertificateModeOptional ClientCertificateMode = "OPTIONAL"
	ClientCertificateModeRequired                       = "REQUIRED"
)

type EngineConfig

type EngineConfig struct {
	CacheSizeGB float32 `json:"cacheSizeGB"`
}

type LogRotate

type LogRotate struct {
	SizeThresholdMB  int `json:"sizeThresholdMB"`
	TimeThresholdHrs int `json:"timeThresholdHrs"`
}

type MongoDBSSL

type MongoDBSSL struct {
	Mode                               SSLMode `json:"mode"`
	PEMKeyFile                         string  `json:"PEMKeyFile,omitempty"`
	CAFile                             string  `json:"CAFile,omitempty"`
	AllowConnectionsWithoutCertificate bool    `json:"allowConnectionsWithoutCertificates"`
}

type MongoDBUser

type MongoDBUser struct {
}

type MongoDbVersionConfig

type MongoDbVersionConfig struct {
	Name   string        `json:"name"`
	Builds []BuildConfig `json:"builds"`
}

type Net

type Net struct {
	Port int        `json:"port"`
	SSL  MongoDBSSL `json:"ssl"`
}

type Options

type Options struct {
	DownloadBase string `json:"downloadBase"`
}

type Process

type Process struct {
	Name                        string      `json:"name"`
	HostName                    string      `json:"hostname"`
	Args26                      Args26      `json:"args2_6"`
	FeatureCompatibilityVersion string      `json:"featureCompatibilityVersion"`
	ProcessType                 ProcessType `json:"processType"`
	Version                     string      `json:"version"`
	AuthSchemaVersion           int         `json:"authSchemaVersion"`
	SystemLog                   SystemLog   `json:"systemLog"`
	WiredTiger                  WiredTiger  `json:"wiredTiger"`
}

type ProcessType

type ProcessType string

type ReplicaSet

type ReplicaSet struct {
	Id              string             `json:"_id"`
	Members         []ReplicaSetMember `json:"members"`
	ProtocolVersion string             `json:"protocolVersion"`
}

type ReplicaSetMember

type ReplicaSetMember struct {
	Id          int    `json:"_id"`
	Host        string `json:"host"`
	Priority    int    `json:"priority"`
	ArbiterOnly bool   `json:"arbiterOnly"`
	Votes       int    `json:"votes"`
}

type Replication

type Replication struct {
	ReplicaSetName string `json:"replSetName"`
}

type SSL

type SSL struct {
	CAFilePath            string                `json:"CAFilePath"`
	ClientCertificateMode ClientCertificateMode `json:"clientCertificateMode"`
}

type SSLMode

type SSLMode string
const (
	SSLModeDisabled  SSLMode = "disabled"
	SSLModeAllowed   SSLMode = "allowSSL"
	SSLModePreferred SSLMode = "preferSSL"
	SSLModeRequired  SSLMode = "requireSSL"
)

type Security

type Security struct {
	ClusterAuthMode string `json:"clusterAuthMode,omitempty"`
}

type Storage

type Storage struct {
	DBPath string `json:"dbPath"`
}

type SystemLog

type SystemLog struct {
	Destination string `json:"destination"`
	Path        string `json:"path"`
}

type Topology

type Topology string
const (
	ReplicaSetTopology Topology = "ReplicaSet"
)

type VersionManifest

type VersionManifest struct {
	Updated  int                    `json:"updated"`
	Versions []MongoDbVersionConfig `json:"versions"`
}

func (VersionManifest) BuildsForVersion

func (v VersionManifest) BuildsForVersion(version string) MongoDbVersionConfig

BuildsForVersion returns the MongoDbVersionConfig containing all of the version informatioon for the given mongodb version provided

type WiredTiger

type WiredTiger struct {
	EngineConfig EngineConfig `json:"engineConfig"`
}

Jump to

Keyboard shortcuts

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