vmscaler

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: CC-BY-4.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright (C) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE-CODE in the project root for license information.

Package vmscaler manages instances of VMSS within a resource group

Copyright (C) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE-CODE in the project root for license information.

Index

Constants

View Source
const (
	DEFAULT_SKU = "Standard_DS14_v2"
	// the default is based on the following study https://github.com/Azure/Avere/blob/main/docs/azure_vm_provision_best_practices.md
	DEFAULT_VMS_PER_VMSS = 25
	MINIMUM_VMS_PER_VMSS = 16
	MAXIMUM_VMS_PER_VMSS = 250

	DEFAULT_VMSS_SINGLEPLACEMENTGROUP = false
	DEFAULT_VMSS_OVERPROVISION        = false
	DEFAULT_QUEUE_PREFIX              = "vmscaler"
)

default configuration parameters

View Source
const (
	TOTAL_NODES_TAG_KEY           = "TOTAL_NODES"
	LAST_TIME_AT_CAPACITY_TAG_KEY = "LAST_TIME_AT_CAPACITY"
	SEALED_TAG_KEY                = "SEALED"
)
View Source
const (
	QueueMessageCount = 1
)
View Source
const (
	VMSS_PREFIX = "vmss"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan struct {
	VmssMap           map[string]compute.VirtualMachineScaleSet
	CurrentCapacity   int64
	IncreasedCapacity int64
	VmssAtCapacity    []string
	VMSSToSeal        []string
	VMSSToIncrease    []string
	VMSSToDelete      []string
	NewVMSSNames      []string
}

func (*Plan) Print

func (p *Plan) Print(v *VMScaler)

type QueueMessage

type QueueMessage struct {
	Message  *azqueue.DequeuedMessagesResponse
	Instance string
}

type VMScaler

type VMScaler struct {
	Context                 context.Context
	AzureTenantId           string
	AzureClientId           string
	AzureClientSecret       string
	AzureSubscriptionId     string
	StorageAccountName      string
	StorageAccountKey       string
	StorageAccountQueueName string
	Authorizer              autorest.Authorizer

	TotalNodes int64
	Location   string

	// network configuration values
	VNETResourceGroup string
	VNETName          string
	SubnetName        string

	// VMSS configuration values
	ResourceGroup        string
	SKU                  string
	ImageID              string
	Username             string
	Password             string
	VMsPerVMSS           int64
	SinglePlacementGroup bool
	OverProvision        bool
	Priority             compute.VirtualMachinePriorityTypes
	EvictionPolicy       compute.VirtualMachineEvictionPolicyTypes
	// contains filtered or unexported fields
}

VMScaler handles all the blob uploads

func (*VMScaler) InitializeClients

func (v *VMScaler) InitializeClients()

func (*VMScaler) Run

func (v *VMScaler) Run(syncWaitGroup *sync.WaitGroup)

Jump to

Keyboard shortcuts

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