Documentation ¶
Index ¶
- Constants
- type AzureClient
- type Builder
- type Config
- type DeploymentFactory
- type DeploymentPoller
- type OpenSshKeyPair
- type StepCaptureImage
- type StepCreateResourceGroup
- type StepDeleteOSDisk
- type StepDeleteResourceGroup
- type StepDeployTemplate
- type StepGetIPAddress
- type StepGetOSDisk
- type StepPowerOffCompute
- type StepValidateTemplate
- type TempName
- type TemplateParameter
- type TemplateParameters
Constants ¶
View Source
const ( DefaultUserName = "packer" DefaultVMSize = "Standard_A1" )
View Source
const ( DeployCanceled = "Canceled" DeployFailed = "Failed" DeployDeleted = "Deleted" DeploySucceeded = "Succeeded" )
View Source
const ( TempNameAlphabet = "0123456789bcdfghjklmnpqrstvwxyz" TempPasswordAlphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" )
View Source
const (
BuilderId = "Azure.ResourceManagement.VMImage"
)
View Source
const (
DefaultPublicIPAddressName = "packerPublicIP"
)
View Source
const (
KeySize = 2048
)
View Source
const Linux = `` /* 5242-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureClient ¶
type AzureClient struct { compute.VirtualMachinesClient network.PublicIPAddressesClient resources.GroupsClient resources.DeploymentsClient storage.BlobStorageClient }
func NewAzureClient ¶
func NewAzureClient(subscriptionID string, resourceGroupName string, storageAccountName string, servicePrincipalToken *azure.ServicePrincipalToken) (*AzureClient, error)
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` // Authentication via OAUTH ClientID string `mapstructure:"client_id"` ClientSecret string `mapstructure:"client_secret"` TenantID string `mapstructure:"tenant_id"` SubscriptionID string `mapstructure:"subscription_id"` // Capture CaptureNamePrefix string `mapstructure:"capture_name_prefix"` CaptureContainerName string `mapstructure:"capture_container_name"` // Compute ImagePublisher string `mapstructure:"image_publisher"` ImageOffer string `mapstructure:"image_offer"` ImageSku string `mapstructure:"image_sku"` Location string `mapstructure:"location"` VMSize string `mapstructure:"vm_size"` // Deployment ResourceGroupName string `mapstructure:"resource_group_name"` StorageAccount string `mapstructure:"storage_account"` // Runtime Values UserName string Password string Comm communicator.Config `mapstructure:",squash"` // contains filtered or unexported fields }
type DeploymentFactory ¶
type DeploymentFactory struct {
// contains filtered or unexported fields
}
type DeploymentPoller ¶
type DeploymentPoller struct {
// contains filtered or unexported fields
}
func NewDeploymentPoller ¶
func NewDeploymentPoller(getProvisioningState func() (string, error)) *DeploymentPoller
func (*DeploymentPoller) PollAsNeeded ¶
func (t *DeploymentPoller) PollAsNeeded() (string, error)
type OpenSshKeyPair ¶
type OpenSshKeyPair struct {
// contains filtered or unexported fields
}
func NewOpenSshKeyPair ¶
func NewOpenSshKeyPair() (*OpenSshKeyPair, error)
func NewOpenSshKeyPairWithSize ¶
func NewOpenSshKeyPairWithSize(keySize int) (*OpenSshKeyPair, error)
func (*OpenSshKeyPair) AuthorizedKey ¶
func (s *OpenSshKeyPair) AuthorizedKey() string
func (*OpenSshKeyPair) PrivateKey ¶
func (s *OpenSshKeyPair) PrivateKey() string
type StepCaptureImage ¶
type StepCaptureImage struct {
// contains filtered or unexported fields
}
func NewStepCaptureImage ¶
func NewStepCaptureImage(client *AzureClient, ui packer.Ui) *StepCaptureImage
func (*StepCaptureImage) Cleanup ¶
func (*StepCaptureImage) Cleanup(multistep.StateBag)
func (*StepCaptureImage) Run ¶
func (s *StepCaptureImage) Run(state multistep.StateBag) multistep.StepAction
type StepCreateResourceGroup ¶
type StepCreateResourceGroup struct {
// contains filtered or unexported fields
}
func NewStepCreateResourceGroup ¶
func NewStepCreateResourceGroup(client *AzureClient, ui packer.Ui) *StepCreateResourceGroup
func (*StepCreateResourceGroup) Cleanup ¶
func (*StepCreateResourceGroup) Cleanup(multistep.StateBag)
func (*StepCreateResourceGroup) Run ¶
func (s *StepCreateResourceGroup) Run(state multistep.StateBag) multistep.StepAction
type StepDeleteOSDisk ¶
type StepDeleteOSDisk struct {
// contains filtered or unexported fields
}
func NewStepDeleteOSDisk ¶
func NewStepDeleteOSDisk(client *AzureClient, ui packer.Ui) *StepDeleteOSDisk
func (*StepDeleteOSDisk) Cleanup ¶
func (*StepDeleteOSDisk) Cleanup(multistep.StateBag)
func (*StepDeleteOSDisk) Run ¶
func (s *StepDeleteOSDisk) Run(state multistep.StateBag) multistep.StepAction
type StepDeleteResourceGroup ¶
type StepDeleteResourceGroup struct {
// contains filtered or unexported fields
}
func NewStepDeleteResourceGroup ¶
func NewStepDeleteResourceGroup(client *AzureClient, ui packer.Ui) *StepDeleteResourceGroup
func (*StepDeleteResourceGroup) Cleanup ¶
func (*StepDeleteResourceGroup) Cleanup(multistep.StateBag)
func (*StepDeleteResourceGroup) Run ¶
func (s *StepDeleteResourceGroup) Run(state multistep.StateBag) multistep.StepAction
type StepDeployTemplate ¶
type StepDeployTemplate struct {
// contains filtered or unexported fields
}
func NewStepDeployTemplate ¶
func NewStepDeployTemplate(client *AzureClient, ui packer.Ui) *StepDeployTemplate
func (*StepDeployTemplate) Cleanup ¶
func (*StepDeployTemplate) Cleanup(multistep.StateBag)
func (*StepDeployTemplate) Run ¶
func (s *StepDeployTemplate) Run(state multistep.StateBag) multistep.StepAction
type StepGetIPAddress ¶
type StepGetIPAddress struct {
// contains filtered or unexported fields
}
func NewStepGetIPAddress ¶
func NewStepGetIPAddress(client *AzureClient, ui packer.Ui) *StepGetIPAddress
func (*StepGetIPAddress) Cleanup ¶
func (*StepGetIPAddress) Cleanup(multistep.StateBag)
func (*StepGetIPAddress) Run ¶
func (s *StepGetIPAddress) Run(state multistep.StateBag) multistep.StepAction
type StepGetOSDisk ¶
type StepGetOSDisk struct {
// contains filtered or unexported fields
}
func NewStepGetOSDisk ¶
func NewStepGetOSDisk(client *AzureClient, ui packer.Ui) *StepGetOSDisk
func (*StepGetOSDisk) Cleanup ¶
func (*StepGetOSDisk) Cleanup(multistep.StateBag)
func (*StepGetOSDisk) Run ¶
func (s *StepGetOSDisk) Run(state multistep.StateBag) multistep.StepAction
type StepPowerOffCompute ¶
type StepPowerOffCompute struct {
// contains filtered or unexported fields
}
func NewStepPowerOffCompute ¶
func NewStepPowerOffCompute(client *AzureClient, ui packer.Ui) *StepPowerOffCompute
func (*StepPowerOffCompute) Cleanup ¶
func (*StepPowerOffCompute) Cleanup(multistep.StateBag)
func (*StepPowerOffCompute) Run ¶
func (s *StepPowerOffCompute) Run(state multistep.StateBag) multistep.StepAction
type StepValidateTemplate ¶
type StepValidateTemplate struct {
// contains filtered or unexported fields
}
func NewStepValidateTemplate ¶
func NewStepValidateTemplate(client *AzureClient, ui packer.Ui) *StepValidateTemplate
func (*StepValidateTemplate) Cleanup ¶
func (*StepValidateTemplate) Cleanup(multistep.StateBag)
func (*StepValidateTemplate) Run ¶
func (s *StepValidateTemplate) Run(state multistep.StateBag) multistep.StepAction
type TempName ¶
type TempName struct { AdminPassword string ComputeName string DeploymentName string ResourceGroupName string OSDiskName string }
func NewTempName ¶
func NewTempName() *TempName
type TemplateParameter ¶
type TemplateParameter struct {
Value string `json:"value"`
}
type TemplateParameters ¶
type TemplateParameters struct { AdminUsername *TemplateParameter `json:"adminUsername,omitempty"` AdminPassword *TemplateParameter `json:"adminPassword,omitempty"` DnsNameForPublicIP *TemplateParameter `json:"dnsNameForPublicIP,omitempty"` ImageOffer *TemplateParameter `json:"imageOffer,omitempty"` ImagePublisher *TemplateParameter `json:"imagePublisher,omitempty"` ImageSku *TemplateParameter `json:"imageSku,omitempty"` OSDiskName *TemplateParameter `json:"osDiskName,omitempty"` SshAuthorizedKey *TemplateParameter `json:"sshAuthorizedKey,omitempty"` StorageAccountName *TemplateParameter `json:"storageAccountName,omitempty"` VMSize *TemplateParameter `json:"vmSize,omitempty"` VMName *TemplateParameter `json:"vmName,omitempty"` }
Source Files ¶
- artifact.go
- azure_client.go
- builder.go
- config.go
- deployment_factory.go
- deployment_poller.go
- openssh_key_pair.go
- step_capture_image.go
- step_create_resource_group.go
- step_delete_os_disk.go
- step_delete_resource_group.go
- step_deploy_template.go
- step_get_ip_address.go
- step_get_os_disk.go
- step_power_off_compute.go
- step_validate_template.go
- template.go
- template_parameters.go
- tempname.go
Click to show internal directories.
Click to hide internal directories.