Documentation ¶
Overview ¶
Package oci contains a packer.Builder implementation that builds Oracle Bare Metal Cloud Services (OCI) images.
Index ¶
Constants ¶
View Source
const BuilderId = "packer.oracle.oci"
BuilderId uniquely identifies the builder
Variables ¶
This section is empty.
Functions ¶
func NewRawConfigurationProvider ¶
func NewRawConfigurationProvider(tenancy, user, region, fingerprint, privateKey string, privateKeyPassphrase *string) common.ConfigurationProvider
NewRawConfigurationProvider will create a rawConfigurationProvider.
Types ¶
type Artifact ¶
Artifact is an artifact implementation that contains a built Custom Image.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a builder implementation that creates Oracle OCI custom images.
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` Comm communicator.Config `mapstructure:",squash"` ConfigProvider ocicommon.ConfigurationProvider AccessCfgFile string `mapstructure:"access_cfg_file"` AccessCfgFileAccount string `mapstructure:"access_cfg_file_account"` // Access config overrides UserID string `mapstructure:"user_ocid"` TenancyID string `mapstructure:"tenancy_ocid"` Region string `mapstructure:"region"` Fingerprint string `mapstructure:"fingerprint"` KeyFile string `mapstructure:"key_file"` PassPhrase string `mapstructure:"pass_phrase"` UsePrivateIP bool `mapstructure:"use_private_ip"` AvailabilityDomain string `mapstructure:"availability_domain"` CompartmentID string `mapstructure:"compartment_ocid"` // Image BaseImageID string `mapstructure:"base_image_ocid"` Shape string `mapstructure:"shape"` ImageName string `mapstructure:"image_name"` // Instance InstanceName string `mapstructure:"instance_name"` // Metadata optionally contains custom metadata key/value pairs provided in the // configuration. While this can be used to set metadata["user_data"] the explicit // "user_data" and "user_data_file" values will have precedence. // An instance's metadata can be obtained from at http://169.254.169.254 on the // launched instance. Metadata map[string]string `mapstructure:"metadata"` // UserData and UserDataFile file are both optional and mutually exclusive. UserData string `mapstructure:"user_data"` UserDataFile string `mapstructure:"user_data_file"` // Networking SubnetID string `mapstructure:"subnet_ocid"` // Tagging Tags map[string]string `mapstructure:"tags"` // contains filtered or unexported fields }
type Driver ¶
type Driver interface { CreateInstance(ctx context.Context, publicKey string) (string, error) CreateImage(ctx context.Context, id string) (core.Image, error) DeleteImage(ctx context.Context, id string) error GetInstanceIP(ctx context.Context, id string) (string, error) TerminateInstance(ctx context.Context, id string) error WaitForImageCreation(ctx context.Context, id string) error WaitForInstanceState(ctx context.Context, id string, waitStates []string, terminalState string) error }
Driver interfaces between the builder steps and the OCI SDK.
func NewDriverOCI ¶
NewDriverOCI Creates a new driverOCI with a connected compute client and a connected vcn client.
Click to show internal directories.
Click to hide internal directories.