engine

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID              string `envconfig:"CLIENT_ID"`
	ClientSecret          string `envconfig:"CLIENT_SECRET"`
	MasterDNSPrefix       string `envconfig:"DNS_PREFIX"`
	PublicSSHKey          string `envconfig:"PUBLIC_SSH_KEY"`
	WindowsAdminPasssword string `envconfig:"WINDOWS_ADMIN_PASSWORD"`
	OrchestratorRelease   string `envconfig:"ORCHESTRATOR_RELEASE"`
}

Config represents the configuration values of a template stored as env vars

func ParseConfig

func ParseConfig() (*Config, error)

ParseConfig will return a new engine config struct taking values from env vars

type Engine

type Engine struct {
	Config                    *Config
	ClusterDefinitionPath     string                        // The original template we want to use to build the cluster from.
	ClusterDefinitionTemplate string                        // This is the template after we splice in the environment variables
	GeneratedDefinitionPath   string                        // Holds the contents of running acs-engine generate
	OutputPath                string                        // This is the root output path
	DefinitionName            string                        // Unique cluster name
	GeneratedTemplatePath     string                        // azuredeploy.json path
	GeneratedParametersPath   string                        // azuredeploy.parameters.json path
	ClusterDefinition         *api.VlabsARMContainerService // Holds the parsed ClusterDefinition
}

Engine holds necessary information to interact with acs-engine cli

func Build

func Build(cwd, templatePath, outputPath, definitionName string) (*Engine, error)

Build takes a template path and will inject values based on provided environment variables it will then serialize the structs back into json and save it to outputPath

func (*Engine) Generate

func (e *Engine) Generate() error

Generate will run acs-engine generate on a given cluster definition

func (*Engine) HasLinuxAgents

func (e *Engine) HasLinuxAgents() bool

HasLinuxAgents will return true if there is at least 1 linux agent pool

func (*Engine) HasWindowsAgents

func (e *Engine) HasWindowsAgents() bool

HasWindowsAgents will return true is there is at least 1 windows agent pool

func (*Engine) NodeCount

func (e *Engine) NodeCount() int

NodeCount returns the number of nodes that should be provisioned for a given cluster definition

Jump to

Keyboard shortcuts

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