Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SetupCmd = &cobra.Command{ Use: "setup", Short: "Manually set up a launched instance with Cedana defaults and user-provided scripts", Long: "Provide commands to run on the remote instance in user_commands.yaml in the ~/.cedana config folder", Hidden: true, RunE: func(cmd *cobra.Command, args []string) error { db := db.NewDB() l := utils.GetLogger() jobFile, err := cedana.InitJobFile(jobFile) if err != nil { l.Fatal().Err(err).Msg("could not set up cedana job") } instance := db.GetInstanceByProviderId(instanceId) if instance.IPAddress == "" { return fmt.Errorf("could not find instance with id %s", instanceId) } cfg, err := utils.InitCedanaConfig() if err != nil { return fmt.Errorf("could not load spot config %v", err) } is := InstanceSetup{ logger: &l, cfg: cfg, instance: *instance, jobFile: jobFile, } if userOnly { is.execUserCommands() } else { is.ClientSetup(true) } return nil }, }
Functions ¶
func SetVersionInfo ¶
func SetVersionInfo(version, commit, date string)
used in main.go to set version info
func StringPtrToString ¶
stupid AWS returns everything as a pointer
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// contains filtered or unexported fields
}
func (*Bootstrap) AWSBootstrap ¶
func (b *Bootstrap) AWSBootstrap()
TODO: Should check for launch templates?
func (*Bootstrap) AzureBootstrap ¶
func (b *Bootstrap) AzureBootstrap()
func (*Bootstrap) CreateAWSKeyFile ¶
func (*Bootstrap) GCPBootstrap ¶
func (b *Bootstrap) GCPBootstrap()
type CLIDaemon ¶
type CLIDaemon struct {
// contains filtered or unexported fields
}
func NewCLIDaemon ¶
func NewCLIDaemon() *CLIDaemon
func (*CLIDaemon) PollProvider ¶
PollingDaemon checks for provider events and sends a checkpoint status over NATS. Needs to be async (so can't use the command channel) because it might have to be run on the user's machine.
func (*CLIDaemon) PollProviderOnce ¶
func (*CLIDaemon) UpdateJobStatus ¶
UpdateJobStatus receives on NATS messages from the orchestrator about successful checkpoints/restores and on the state of the running task.
type InstanceSetup ¶
type InstanceSetup struct {
// contains filtered or unexported fields
}
func BuildInstanceSetup ¶
func BuildInstanceSetup(i cedana.Instance, job cedana.Job) *InstanceSetup
func (*InstanceSetup) ClientSetup ¶
func (is *InstanceSetup) ClientSetup(runTask bool) error
Runs cedana-specific and user-specified instantiation scripts for a client instance in an SSH session.
func (*InstanceSetup) CreateConn ¶
func (is *InstanceSetup) CreateConn() (*ssh.Client, error)
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
the batch command launches 100 of these in parallel!
func (*Runner) CreateNATSStream ¶
func (*Runner) CreateObjectStores ¶
creates object stores for checkpoints & for workdirs
func (*Runner) PublishJob ¶
func (*Runner) SetupNATSForJob ¶
Click to show internal directories.
Click to hide internal directories.