sshprovisioner

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CheckProvisioned = checkProvisioned

CheckProvisioned checks if any juju init service already exist on the host machine.

View Source
var DetectSeriesAndHardwareCharacteristics = detectSeriesAndHardwareCharacteristics

DetectSeriesAndHardwareCharacteristics detects the OS series and hardware characteristics of the remote machine by connecting to the machine and executing a bash script.

Functions

func InitUbuntuUser

func InitUbuntuUser(host, login, authorizedKeys string, read io.Reader, write io.Writer) error

InitUbuntuUser adds the ubuntu user if it doesn't already exist, updates its ~/.ssh/authorized_keys, and enables passwordless sudo for it.

InitUbuntuUser will initially attempt to login as the ubuntu user, and verify that passwordless sudo is enabled; only if this is false will there be an attempt with the specified login.

authorizedKeys may be empty, in which case the file will be created and left empty.

func ProvisionMachine

func ProvisionMachine(args manual.ProvisionMachineArgs) (machineId string, err error)

Provision returns a new machineId and nil if the provision process is done successfully The func will manual provision a linux machine using as it's default protocol SSH

func ProvisioningScript

func ProvisioningScript(icfg *instancecfg.InstanceConfig) (string, error)

ProvisioningScript generates a bash script that can be executed on a remote host to carry out the cloud-init configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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