Documentation ¶
Overview ¶
The alicloud contains a packer.Builder implementation that builds ecs images for alicloud.
Index ¶
Constants ¶
View Source
const ( ClassicNet = InstanceNetWork("classic") VpcNet = InstanceNetWork("vpc") ALICLOUD_DEFAULT_SHORT_TIMEOUT = 180 ALICLOUD_DEFAULT_TIMEOUT = 1800 ALICLOUD_DEFAULT_LONG_TIMEOUT = 3600 )
View Source
const BuilderId = "alibaba.alicloud"
The unique ID for this builder
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlicloudAccessConfig ¶
type AlicloudAccessConfig struct { AlicloudAccessKey string `mapstructure:"access_key"` AlicloudSecretKey string `mapstructure:"secret_key"` AlicloudRegion string `mapstructure:"region"` AlicloudSkipValidation bool `mapstructure:"skip_region_validation"` SecurityToken string `mapstructure:"security_token"` }
Config of alicloud
func (*AlicloudAccessConfig) Client ¶
func (c *AlicloudAccessConfig) Client() (*ecs.Client, error)
Client for AlicloudClient
func (*AlicloudAccessConfig) Config ¶
func (c *AlicloudAccessConfig) Config() error
func (*AlicloudAccessConfig) Prepare ¶
func (c *AlicloudAccessConfig) Prepare(ctx *interpolate.Context) []error
type AlicloudDiskDevice ¶
type AlicloudDiskDevice struct { DiskName string `mapstructure:"disk_name"` DiskCategory string `mapstructure:"disk_category"` DiskSize int `mapstructure:"disk_size"` SnapshotId string `mapstructure:"disk_snapshot_id"` Description string `mapstructure:"disk_description"` DeleteWithInstance bool `mapstructure:"disk_delete_with_instance"` Device string `mapstructure:"disk_device"` }
type AlicloudDiskDevices ¶
type AlicloudDiskDevices struct {
ECSImagesDiskMappings []AlicloudDiskDevice `mapstructure:"image_disk_mappings"`
}
type AlicloudImageConfig ¶
type AlicloudImageConfig struct { AlicloudImageName string `mapstructure:"image_name"` AlicloudImageVersion string `mapstructure:"image_version"` AlicloudImageDescription string `mapstructure:"image_description"` AlicloudImageDestinationRegions []string `mapstructure:"image_copy_regions"` AlicloudImageDestinationNames []string `mapstructure:"image_copy_names"` AlicloudImageForceDelete bool `mapstructure:"image_force_delete"` AlicloudImageForceDeleteSnapshots bool `mapstructure:"image_force_delete_snapshots"` AlicloudImageForceDeleteInstances bool `mapstructure:"image_force_delete_instances"` AlicloudImageSkipRegionValidation bool `mapstructure:"skip_region_validation"` AlicloudDiskDevices `mapstructure:",squash"` }
func (*AlicloudImageConfig) Prepare ¶
func (c *AlicloudImageConfig) Prepare(ctx *interpolate.Context) []error
type Artifact ¶
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` AlicloudAccessConfig `mapstructure:",squash"` AlicloudImageConfig `mapstructure:",squash"` RunConfig `mapstructure:",squash"` // contains filtered or unexported fields }
type InstanceNetWork ¶
type InstanceNetWork string
type RunConfig ¶
type RunConfig struct { AssociatePublicIpAddress bool `mapstructure:"associate_public_ip_address"` ZoneId string `mapstructure:"zone_id"` IOOptimized bool `mapstructure:"io_optimized"` InstanceType string `mapstructure:"instance_type"` Description string `mapstructure:"description"` AlicloudSourceImage string `mapstructure:"source_image"` ForceStopInstance bool `mapstructure:"force_stop_instance"` SecurityGroupId string `mapstructure:"security_group_id"` SecurityGroupName string `mapstructure:"security_group_name"` UserData string `mapstructure:"user_data"` UserDataFile string `mapstructure:"user_data_file"` VpcId string `mapstructure:"vpc_id"` VpcName string `mapstructure:"vpc_name"` CidrBlock string `mapstructure:"vpc_cidr_block"` VSwitchId string `mapstructure:"vswitch_id"` VSwitchName string `mapstructure:"vswitch_id"` InstanceName string `mapstructure:"instance_name"` InternetChargeType string `mapstructure:"internet_charge_type"` InternetMaxBandwidthOut int `mapstructure:"internet_max_bandwidth_out"` // Communicator settings Comm communicator.Config `mapstructure:",squash"` SSHPrivateIp bool `mapstructure:"ssh_private_ip"` }
Source Files ¶
- access_config.go
- artifact.go
- builder.go
- image_config.go
- packer_helper.go
- run_config.go
- ssh_helper.go
- step_attach_keypair.go
- step_check_source_image.go
- step_config_eip.go
- step_config_key_pair.go
- step_config_public_ip.go
- step_config_security_group.go
- step_config_vpc.go
- step_config_vswitch.go
- step_create_image.go
- step_create_instance.go
- step_delete_images_snapshots.go
- step_mount_disk.go
- step_pre_validate.go
- step_region_copy_image.go
- step_run_instance.go
- step_share_image.go
- step_stop_instance.go
Click to show internal directories.
Click to hide internal directories.