compute

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggingCmdStd   = true
	NoLoggingCmdStd = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Compute

type Compute struct {
	// Non spot return a on-demand insntace
	Instance *ec2.Instance
	// Spot instance is created through a mixedPolicy on a as group
	// in case of asg it is accessed through the LB
	AutoscalingGroup *autoscaling.Group
	// If LB is nil Eip is used for machine otherwise for the instance
	Eip *ec2.Eip
	LB  *lb.LoadBalancer
	// This can be used in case explicit
	// dependencies on the Compute resources
	Dependencies []pulumi.Resource
}

func (*Compute) GetHostIP

func (c *Compute) GetHostIP(public bool) (ip pulumi.StringInput)

function returns the ip to access the target host

func (*Compute) Readiness

func (compute *Compute) Readiness(ctx *pulumi.Context,
	cmd string,
	prefix, id string,
	mk *tls.PrivateKey, username string,
	b *bastion.BastionResult,
	dependecies []pulumi.Resource) error

Check if compute is healthy based on running a remote cmd

func (*Compute) RunCommand added in v0.9.0

func (compute *Compute) RunCommand(ctx *pulumi.Context,
	cmd string,
	loggingCmdStd bool,
	prefix, id string,
	mk *tls.PrivateKey, username string,
	b *bastion.BastionResult,
	dependecies []pulumi.Resource) (*remote.Command, error)

Check if compute is healthy based on running a remote cmd

type ComputeRequest

type ComputeRequest struct {
	MCtx   *mc.Context
	Prefix string
	ID     string
	VPC    *ec2.Vpc
	Subnet *ec2.Subnet
	Eip    *ec2.Eip
	// If LB is nill EIP should be associated to the machine
	// to allow make use of it before creating the instance
	LB *lb.LoadBalancer
	// Array of TCP ports to be
	// created as tg for the LB
	LBTargetGroups  []int
	AMI             *ec2.LookupAmiResult
	KeyResources    *keypair.KeyPairResources
	SecurityGroups  pulumi.StringArray
	InstaceTypes    []string
	InstanceProfile *iam.InstanceProfile
	DiskSize        *int
	Airgap          bool
	Spot            bool
	// Only required if Spot is true
	SpotPrice float64
	// Only required if we need to set userdata
	UserDataAsBase64 pulumi.StringPtrInput
	// If we need to add explicit dependecies
	DependsOn []pulumi.Resource
}

func (*ComputeRequest) NewCompute

func (r *ComputeRequest) NewCompute(ctx *pulumi.Context) (*Compute, error)

TODO on-demand could be changed to to policy trying spot

Jump to

Keyboard shortcuts

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