Documentation
¶
Index ¶
Constants ¶
View Source
const ( // remoteCommandTimeout int = 300 // https://www.pulumi.com/docs/intro/concepts/resources/options/customtimeouts/ RemoteTimeout string = "40m" // CommandCloudInitWait waits until cloud-init finishes. // // The command accepts exit code 0 and exit code 2 (recoverable error). // When cloud-init reports a fatal error, the command prints the cloud-init // report and the last lines of /var/log/cloud-init-output.log. The log holds // the output of the user data commands. Without this output, the operator // cannot find the command that failed. // https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2048522 CommandCloudInitWait string = `sudo cloud-init status --long --wait; rc=$?; ` + `if [ "$rc" -eq 0 ] || [ "$rc" -eq 2 ]; then exit 0; fi; ` + `echo "=== cloud-init failure (exit code ${rc}) ==="; ` + `sudo cloud-init status --long || true; ` + `echo "=== /var/log/cloud-init-output.log (last 200 lines) ==="; ` + `sudo tail -n 200 /var/log/cloud-init-output.log || true; ` + `exit "$rc"` CommandPing string = "echo ping" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RemoteCommand ¶
Remote command success if error = nil
type RemoteInstance ¶
type RemoteInstance struct {
InstanceIP *pulumi.StringOutput
Instance *ec2.Instance
Username string
PrivateKey *tls.PrivateKey
}
func (RemoteInstance) RemoteExec ¶
Click to show internal directories.
Click to hide internal directories.