Version: v0.0.0-...-8a8b58e Latest Latest

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 3 Imported by: 0




View Source
const (
	LoadBalancerStandardSKU = "standard"
	LoadBalancerBasicSKU    = "basic"
View Source
const (
	VMStandardB1s  = "Standard_B1s"
	VMStandardB1ms = "Standard_B1ms"
	VMStandardB2s  = "Standard_B2s"
	VMStandardB2ms = "Standard_B2ms"
	VMStandardB4ms = "Standard_B4ms"
	VMStandardB8ms = "Standard_B8ms"

	VMStandardD2sV3  = "Standard_D2s_v3"
	VMStandardD4sV3  = "Standard_D4s_v3"
	VMStandardD8sV3  = "Standard_D8s_v3"
	VMStandardD16sV3 = "Standard_D16s_v3"
	VMStandardD32sV3 = "Standard_D32s_v3"
	VMStandardD64sV3 = "Standard_D64s_v3"

	VMStandardD2V3  = "Standard_D2_v3"
	VMStandardD4V3  = "Standard_D4_v3"
	VMStandardD8V3  = "Standard_D8_v3"
	VMStandardD16V3 = "Standard_D16_v3"
	VMStandardD32V3 = "Standard_D32_v3"
	VMStandardD64V3 = "Standard_D64_v3"

	VMStandardDS1V2 = "Standard_DS1_v2"
	VMStandardDS2V2 = "Standard_DS2_v2"
	VMStandardDS3V2 = "Standard_DS3_v2"
	VMStandardDS4V2 = "Standard_DS4_v2"
	VMStandardDS5V2 = "Standard_DS5_v2"

	VMStandardD1V2 = "Standard_D1_v2"
	VMStandardD2V2 = "Standard_D2_v2"
	VMStandardD3V2 = "Standard_D3_v2"
	VMStandardD4V2 = "Standard_D4_v2"
	VMStandardD5V2 = "Standard_D5_v2"

	VMStandardA1V2  = "Standard_A1_v2"
	VMStandardA2V2  = "Standard_A2_v2"
	VMStandardA4V2  = "Standard_A4_v2"
	VMStandardA8V2  = "Standard_A8_v2"
	VMStandardA2mV2 = "Standard_A2m_v2"
	VMStandardA4mV2 = "Standard_A4m_v2"
	VMStandardA8mV2 = "Standard_A8m_v2"

	VMStandardDC2s = "Standard_DC2s"
	VMStandardDC4s = "Standard_DC4s"

	VMStandardF2sV2  = "Standard_F2s_v2"
	VMStandardF4sV2  = "Standard_F4s_v2"
	VMStandardF8sV2  = "Standard_F8s_v2"
	VMStandardF16sV2 = "Standard_F16s_v2"
	VMStandardF32sV2 = "Standard_F32s_v2"
	VMStandardF64sV2 = "Standard_F64s_v2"
	VMStandardF72sV2 = "Standard_F72s_v2"

	VMStandardF1s  = "Standard_F1s"
	VMStandardF2s  = "Standard_F2s"
	VMStandardF4s  = "Standard_F4s"
	VMStandardF8s  = "Standard_F8s"
	VMStandardF16s = "Standard_F16s"

	VMStandardF1  = "Standard_F1"
	VMStandardF2  = "Standard_F2"
	VMStandardF4  = "Standard_F4"
	VMStandardF8  = "Standard_F8"
	VMStandardF16 = "Standard_F16"
View Source
const (
	JumpboxHostGroupType = "jumpbox"


This section is empty.


This section is empty.


type AzureFile

type AzureFile struct {
	StorageAccount string `yaml:"storage_account"`
	Name           string `yaml:"name"`
	MountPoint     string `yaml:"mount_point"`

type DataDisk

type DataDisk struct {
	ManagedDiskType string `yaml:"managed_disk_type"`
	Caching         string `yaml:"caching"`
	CreateOption    string `yaml:"create_option"`
	DiskSizeGB      int    `yaml:"disk_size_gb"`

type Image

type Image struct {
	Offer     string `yaml:"offer"`
	Publisher string `yaml:"publisher"`
	SKU       string `yaml:"sku"`
	Version   string `yaml:"version"`

type LinuxConfiguration

type LinuxConfiguration struct {
	SSH SSH `yaml:"ssh"`

type LoadBalancer

type LoadBalancer struct {
	Name                string                           `yaml:"name"`
	SKU                 string                           `yaml:"sku"`
	BackendAddressPools []LoadBalancerBackendAddressPool `yaml:"backend_address_pools"`
	HealthProbes        []LoadBalancerHealthProbe        `yaml:"health_probes"`
	Rules               []LoadBalancerRule               `yaml:"rules"`

LoadBalancer contains needed information to create a load balancer on Azure.

type LoadBalancerBackendAddressPool

type LoadBalancerBackendAddressPool struct {
	Name string `yaml:"name"`

type LoadBalancerHealthProbe

type LoadBalancerHealthProbe struct {
	Name        string `yaml:"name"`
	Protocol    string `yaml:"protocol"`
	Port        int    `yaml:"port"`
	RequestPath string `yaml:"request_path"`

type LoadBalancerRule

type LoadBalancerRule struct {
	Name                   string `yaml:"name"`
	Protocol               string `yaml:"protocol"`
	FrontendPort           int    `yaml:"frontend_port"`
	BackendPort            int    `yaml:"backend_port"`
	BackendAddressPoolName string `yaml:"backend_address_pool_name"`
	HealthProbeName        string `yaml:"health_probe_name"`

type Manifest

type Manifest struct {
	Schema                string                 `yaml:"schema,omitempty"`
	EnvName               string                 `yaml:"env_name"`
	ResourceGroupName     string                 `yaml:"resource_group_name"`
	Location              string                 `yaml:"location,omitempty"`
	IaaS                  string                 `yaml:"iaas,omitempty"`
	Platform              *Platform              `yaml:"platform,omitempty"`
	VMGroups              []VMGroup              `yaml:"vm_groups,omitempty"`
	VNets                 []VirtualNetwork       `yaml:"vnets,omitempty"`
	LoadBalancers         []LoadBalancer         `yaml:"load_balancers,omitempty"`
	StorageAccounts       []StorageAccount       `yaml:"storage_accounts,omitempty"`
	NetworkSecurityGroups []NetworkSecurityGroup `yaml:"network_security_groups,omitempty"`
	MysqlDatabases        []MysqlDatabase        `yaml:"mysql_databases,omitempty"`

Manifest contains all needed information, all later on modules will use this manifest

func NewManifestFromYAML

func NewManifestFromYAML(b []byte) (m *Manifest, err error)

NewManifestFromYAML convert yaml bytes to Manifest object

func (*Manifest) GetLoadBalancerByName

func (m *Manifest) GetLoadBalancerByName(loadBalancerName string) *LoadBalancer

func (*Manifest) GetNetworkSecurityGroupByName

func (m *Manifest) GetNetworkSecurityGroupByName(nsgName string) *NetworkSecurityGroup

func (*Manifest) GetSubnetByName

func (m *Manifest) GetSubnetByName(subnetName string) *Subnet

func (*Manifest) ToYAML

func (m *Manifest) ToYAML() (b []byte, err error)

ToYAML converts the object to YAML bytes

type MigrationInformation

type MigrationInformation struct {
	OriginHost     string `yaml:"origin_host"`
	OriginDatabase string `yaml:"origin_database"`
	OriginUsername string `yaml:"origin_username"`
	OriginPassword string `yaml:"origin_password"`

type MysqlDatabase

type MysqlDatabase struct {
	Name                 string                `yaml:"name"`
	Version              string                `yaml:"version"`
	Cores                int                   `yaml:"cores"`
	Tier                 string                `yaml:"tier"`
	Family               string                `yaml:"family"`
	Storage              int                   `yaml:"storage"`
	BackupRetentionDays  int                   `yaml:"backup_retention_days"`
	SSLEnforcement       string                `yaml:"ssl_enforcement"`
	Username             string                `yaml:"username"`
	Password             string                `yaml:"password"`
	MigrationInformation *MigrationInformation `yaml:"migrate_from,omitempty"`

Database contains information to deploy a database on VM(s)

type NetworkSecurityGroup

type NetworkSecurityGroup struct {
	Name                 string                `yaml:"name"`
	NetworkSecurityRules []NetworkSecurityRule `yaml:"network_security_rules"`

type NetworkSecurityRule

type NetworkSecurityRule struct {
	Name                     string `yanl:"name"`
	Priority                 int    `yaml:"priority"`
	Direction                string `yaml:"direction"`
	Access                   string `yaml:"access"`
	Protocol                 string `yaml:"protocol"`
	SourcePortRange          string `yaml:"source_port_range"`
	DestinationPortRange     string `yaml:"destination_port_range"`
	SourceAddressPrefix      string `yaml:"source_address_prefix"`
	DestinationAddressPrefix string `yaml:"destination_address_prefix"`

type OSDisk

type OSDisk struct {
	ManagedDiskType string `yaml:"managed_disk_type"`
	Caching         string `yaml:"caching"`
	CreateOption    string `yaml:"create_option"`

type Platform

type Platform struct {
	Type string `yaml:"type,omitempty"`

Platform contains information about the project type. Several possible values for type: `tomcat/golang/python/java/php/nodejs`

type Role

type Role struct {
	Name       string        `yaml:"name"`
	Vars       yaml.MapSlice `yaml:"vars"`
	BecomeUser string        `yaml:"become_user"`

type SSH

type SSH struct {
	PublicKeys []string `yaml:"public_keys,omitempty"`

type StorageAccount

type StorageAccount struct {
	Name     string `yaml:"name"`
	Location string `yaml:"location"`
	SKU      string `yaml:"sku"`

type Subnet

type Subnet struct {
	Name    string `yaml:"name"`
	Range   string `yaml:"range"`
	Gateway string `yaml:"gateway"`

type VMGroup

type VMGroup struct {
	Name         string          `yaml:"name"`
	Meta         yaml.MapSlice   `yaml:"meta,omitempty"`
	Count        int             `yaml:"count"`
	SKU          string          `yaml:"sku"`
	Type         string          `yaml:"type"`
	OSProfile    VMOSProfile     `yaml:"os_profile"`
	Storage      *VMStorage      `yaml:"storage"`
	NetworkInfos []VMNetworkInfo `yaml:"networks"`
	Roles        []Role          `yaml:"roles"`

VMGroup contains needed information to create a set of VMs on Azure. VMs in the group will have the same SKU, using the same subnet.

func (VMGroup) Jumpbox

func (vg VMGroup) Jumpbox() bool

type VMNetworkInfo

type VMNetworkInfo struct {
	SubnetName                         string            `yaml:"subnet_name"`
	LoadBalancerName                   string            `yaml:"load_balancer_name"`
	LoadBalancerBackendAddressPoolName string            `yaml:"load_balancer_backend_address_pool_name"`
	NetworkSecurityGroupName           string            `yaml:"network_security_group_name"`
	PublicIP                           string            `yaml:"public_ip"`
	Outputs                            []VMNetworkOutput `yaml:"outputs,omitempty"`

type VMNetworkOutput

type VMNetworkOutput struct {
	IP       string `yaml:"ip"`
	PublicIP string `yaml:"public_ip"`
	Host     string `yaml:"host"`

type VMOSProfile

type VMOSProfile struct {
	AdminName          string             `yaml:"admin_name"`
	LinuxConfiguration LinuxConfiguration `yaml:"linux_configuration"`

type VMStorage

type VMStorage struct {
	Image      *Image      `yaml:"image"`
	OSDisk     *OSDisk     `yaml:"os_disk"`
	DataDisks  []DataDisk  `yaml:"data_disks"`
	AzureFiles []AzureFile `yaml:"azure_files"`

type VirtualNetwork

type VirtualNetwork struct {
	Name         string   `yaml:"name"`
	AddressSpace string   `yaml:"address_space"`
	Subnets      []Subnet `yaml:"subnets"`


Path Synopsis

Jump to

Keyboard shortcuts

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