Documentation ¶
Index ¶
- Variables
- func CheckKeyName(c sdutils.AppContext, a *awsPlugin, keyname string) (bool, error)
- func DeleteKeyPair(c sdutils.AppContext, a *awsPlugin, keyname string) error
- func GetAmiVersion(c sdutils.AppContext, region string, ami *string) (*string, error)
- func GetGravitonDependencyExe(context sdutils.AppContext, program string) (string, error)
- func GetPackerPath(context sdutils.AppContext) (string, error)
- func GetPlugin() sdutils.Plugin
- func GetTerraformPath(context sdutils.AppContext) (string, error)
- func GetValidVolumeTypes() []string
- func ImportKeyName(c sdutils.AppContext, a *awsPlugin, keyname string, publickey []byte) error
- func MakeTestPacker(rc int, output string, dir string) (string, string, error)
- func MakeTestSSH(rc int) (string, string, error)
- func MakeTestTerraform(rc int, output string, dir string) (string, string, error)
- func PlaceAsset(cliContext sdutils.AppContext, dir string, assentName string, temp bool) (string, error)
- type EbsVolumes
- type Ec2Instance
- func (awsI *Ec2Instance) CreateInstance(volumeSize int, zookeeperSize int, idleTimeout int, ...) error
- func (awsI *Ec2Instance) DeleteInstance() error
- func (awsI *Ec2Instance) InstanceExists() bool
- func (awsI *Ec2Instance) OpenInstance(volumeSize int, zookeeperSize int, mask string, idleTimeout int) error
- func (awsI *Ec2Instance) Status() error
- type InstanceStatusDescription
- type OutputEntry
- type VolumeStatusDescription
Constants ¶
This section is empty.
Variables ¶
var ( TerraformVersion = "0.11.15" PackerVersion = "1.2.3" )
var ( // ValidRegions is the list of regions that are supported by this plugin ValidRegions = []string{ "us-west-1", "us-west-2", "us-east-1", "us-east-2", "eu-central-1", "eu-west-1", } // ValidVolumeTypes is the list of volume types that are supported by this plugin and // their default iops values ValidVolumeTypes = make(map[string]int) )
Functions ¶
func CheckKeyName ¶
CheckKeyName will return true or false based on the existance of the keyname in the configured AWS environment. If an error occurs while communicating with AWS an error will be returned.
func DeleteKeyPair ¶
func GetAmiVersion ¶
GetAmiVersion returns the graviton version associated with the AMI
func GetGravitonDependencyExe ¶
func GetGravitonDependencyExe(context sdutils.AppContext, program string) (string, error)
func GetPackerPath ¶
func GetPackerPath(context sdutils.AppContext) (string, error)
func GetTerraformPath ¶
func GetTerraformPath(context sdutils.AppContext) (string, error)
func GetValidVolumeTypes ¶
func GetValidVolumeTypes() []string
GetValidVolumeTypes returns a list of the volume types that are supported
func ImportKeyName ¶
func MakeTestPacker ¶
func MakeTestTerraform ¶
Types ¶
type EbsVolumes ¶
type EbsVolumes struct { DeploymentName string `json:"deployment_name,omitempty"` Region string `json:"aws_region,omitempty"` SizeOfEachVolume string `json:"stardog_home_volume_size,omitempty"` ClusterSize string `json:"cluster_size,omitempty"` AwsKeyName string `json:"aws_key_name,omitempty"` KeyPath string `json:"key_path,omitempty"` AmiID string `json:"ami,omitempty"` InstanceType string `json:"instance_type,omitempty"` LicensePath string `json:"stardog_license,omitempty"` VolumeType string `json:"stardog_home_volume_type,omitempty"` IoPs string `json:"stardog_home_volume_iops,omitempty"` VolumeDir string `json:"-"` // contains filtered or unexported fields }
EbsVolumes describes the disk volumes used by aws to store STARDOG_HOME.
func LoadEbsVolume ¶
func LoadEbsVolume(ac sdutils.AppContext, volDir string) (*EbsVolumes, error)
LoadEbsVolume will inflate a EbsVolumes structure for the information stored in the files under the configuration directory.
func NewAwsEbsVolumeManager ¶
func NewAwsEbsVolumeManager(ac sdutils.AppContext, dd *awsDeploymentDescription) *EbsVolumes
NewAwsEbsVolumeManager returns a EbsVolumes structure that will be used by graviton to manage the volumes.
func (*EbsVolumes) CreateSet ¶
func (v *EbsVolumes) CreateSet(licensePath string, sizeOfEachVolume int, clusterSize int) error
CreateSet uses terraform to create and format the EBS volumes in AWS.
func (*EbsVolumes) DeleteSet ¶
func (v *EbsVolumes) DeleteSet() error
DeleteSet will delete the EBS volumes from AWS.
func (*EbsVolumes) Status ¶
func (v *EbsVolumes) Status() error
Status will print out status information about the EBS volumes.
func (*EbsVolumes) VolumeExists ¶
func (v *EbsVolumes) VolumeExists() bool
VolumeExists returns true or false based on whether or not the Volumes already exist.
type Ec2Instance ¶
type Ec2Instance struct { DeploymentName string `json:"deployment_name,omitempty"` Region string `json:"aws_region,omitempty"` KeyName string `json:"aws_key_name,omitempty"` Version string `json:"version,omitempty"` ZkInstanceType string `json:"zk_instance_type,omitempty"` SdInstanceType string `json:"stardog_instance_type,omitempty"` ZkSize string `json:"zookeeper_size,omitempty"` SdSize string `json:"stardog_size,omitempty"` AmiID string `json:"baseami,omitempty"` PrivateKey string `json:"private_key,omitempty"` HTTPMask string `json:"http_subnet,omitempty"` ELBIdleTimeout string `json:"elb_idle_timeout,omitempty"` CustomPropsData string `json:"custom_properties_data,omitempty"` CustomLog4JData string `json:"custom_log4j_data,omitempty"` Environment string `json:"environment_variables,omitempty"` StartOpts string `json:"stardog_start_opts,omitempty"` RootVolumeSize int `json:"root_volume_size"` RootVolumeIops int `json:"root_volume_iops,omitempty"` CustomScript string `json:"custom_script,omitempty"` CustomZkScript string `json:"custom_zk_script,omitempty"` DeployDir string `json:"-"` Ctx sdutils.AppContext `json:"-"` BastionContact string `json:"-"` StardogContact string `json:"-"` StardogInternalContact string `json:"-"` ZkNodesContact []string `json:"-"` }
Ec2Instance represents an instance of a Stardog service in AWS.
func NewEc2Instance ¶
func NewEc2Instance(ctx sdutils.AppContext, dd *awsDeploymentDescription) (*Ec2Instance, error)
NewEc2Instance instanciates a AwsEc2Instance object which will be used to boot or inspect a Stardog ec2 instance.
func (*Ec2Instance) CreateInstance ¶
func (awsI *Ec2Instance) CreateInstance(volumeSize int, zookeeperSize int, idleTimeout int, bastionVolSnapshotId string) error
CreateInstance will boot up a Stardog service in AWS.
func (*Ec2Instance) DeleteInstance ¶
func (awsI *Ec2Instance) DeleteInstance() error
DeleteInstance will teardown the Stardog service.
func (*Ec2Instance) InstanceExists ¶
func (awsI *Ec2Instance) InstanceExists() bool
InstanceExists will return a bool if the associated AwsEc2Instance has already been created.
func (*Ec2Instance) OpenInstance ¶
func (awsI *Ec2Instance) OpenInstance(volumeSize int, zookeeperSize int, mask string, idleTimeout int) error
OpenInstance will open the firewall to allow incoming traffic to port 5821 from the give CIDR.
func (*Ec2Instance) Status ¶
func (awsI *Ec2Instance) Status() error
Status will print the status of the ec2 instance.
type InstanceStatusDescription ¶
type InstanceStatusDescription struct {
ZkNodesContact []string
}
InstanceStatusDescription describes details about a running Stardog instance. The zookeeper contact strings are described.
type OutputEntry ¶
type OutputEntry struct { Sensitive bool `json:"sensitive,omitempty"` Type string `json:"type,omitempty"` Value interface{} `json:"value,omitempty"` }
OutputEntry allows the plugin to return opaque information and mark it as sensitive or not. If it is sensitive the base code knows not to print it out or write it to a log.
type VolumeStatusDescription ¶
type VolumeStatusDescription struct {
VolumeIds []string
}
VolumeStatusDescription is an opaque way to pass AWS specific information to the calling code.