Documentation ¶
Index ¶
- type AuthorizedKeys
- type CPIProperties
- type Cloud
- type Config
- type OCIProperties
- func (b OCIProperties) AuthorizedKeysContents() []string
- func (b OCIProperties) CpiSSHConfig() SSHConfig
- func (b OCIProperties) CpiSSHPublicKeyContent() string
- func (b OCIProperties) TransportConfig(host string) transport.Config
- func (b OCIProperties) UserSSHPublicKeyContent() string
- func (b OCIProperties) Validate() error
- type SSHConfig
- type SSHTunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedKeys ¶
AuthorizedKeys is the set of public ssh-rsa keys to be installed on the default initial account provisioned on a new vm
type CPIProperties ¶
type CPIProperties struct { OCI OCIProperties Agent registry.AgentOptions Registry registry.ClientOptions }
CPIProperties element in Cloud.Config
type Cloud ¶
type Cloud struct { Plugin string Properties CPIProperties }
Cloud element in the Config
type Config ¶
type Config struct {
Cloud Cloud
}
Config represents the full CPI configuration
It is passed to CPI by its invoker (BOSH cli or Director) via by the --configFile=<configfile> startup option.
func NewConfigFromPath ¶
func NewConfigFromPath(configFile string, fs boshsys.FileSystem) (Config, error)
NewConfigFromPath unmarshals(builds) a Config from CPI configuration json persisted in a file on the file system.
type OCIProperties ¶
type OCIProperties struct { // Tenancy under which the resources are provisioned Tenancy string `json:"tenancy"` // User OCID User string `json:"user"` // Compartment OCID CompartmentID string `json:"compartment"` // Region name Region string `json:"region"` // Fingerprint of the User API key Fingerprint string `json:"fingerprint"` // APIKeyFile is the path to the private API key APIKeyFile string `json:"apikeyfile"` // CPIKeyfile is the path to the private key used by the CPI // used for SSH connections CpiKeyFile string `json:"cpikeyfile"` // UsePublicIPForSSH controls whether to use public or private IP // of the target insatnce for establishing SSH connections UsePublicIPForSSH bool `json:"usePublicIpForSsh,omitempty"` // AuthorizedKeys contains the public ssh-keys to provision // on new vms AuthorizedKeys AuthorizedKeys `json:"authorized_keys"` // SSHTunnel is the configuration for creating a forward SSH tunnel SSHTunnel SSHTunnel `json:"sshTunnel,omitempty"` }
OCIProperties contains the properties for configuring BOSH CPI for Oracle Cloud Infrastructure
func (OCIProperties) AuthorizedKeysContents ¶
func (b OCIProperties) AuthorizedKeysContents() []string
func (OCIProperties) CpiSSHConfig ¶
func (b OCIProperties) CpiSSHConfig() SSHConfig
CpiSSHConfig returns the CPI ssh configuration
func (OCIProperties) CpiSSHPublicKeyContent ¶
func (b OCIProperties) CpiSSHPublicKeyContent() string
CpiSSHPublicKeyContent returns the configured cpi user's ssh-rsa public key
func (OCIProperties) TransportConfig ¶
func (b OCIProperties) TransportConfig(host string) transport.Config
TransportConfig returns the configuration properties needed by the underlying transport layer for communicating with OCI
func (OCIProperties) UserSSHPublicKeyContent ¶
func (b OCIProperties) UserSSHPublicKeyContent() string
UserSSHPublicKeyContent returns the configured ssh-rsa user public key
func (OCIProperties) Validate ¶
func (b OCIProperties) Validate() error
Validate raises an error if any of the mandatory properties are missing
type SSHConfig ¶
type SSHConfig struct {
// contains filtered or unexported fields
}
SSHConfig contains configuration used by the CPI for establishing SSH connection for configuring new vm instances
func (SSHConfig) LocalIdentityKeyPath ¶
LocalIdentityKeyPath returns the path to the identity file containing the key for establishing the connection
func (SSHConfig) RemoteUser ¶
RemoteUser returns the name of the user on the target instance
func (SSHConfig) UsePublicIP ¶
UsePublicIP returns true if the SSH connection should be tried on the public IP of the target instance
type SSHTunnel ¶
type SSHTunnel struct { LocalPort int `json:"localPort"` UsePublicIP bool `json:"usePublicIP,omitempty"` User string `json:"user"` Duration string `json:"duration"` }
SSHTunnel holds the CPI configuration for creating a forward SSH tunnel to a newly created vm
func (SSHTunnel) IsConfigured ¶
IsConfigured determines if an SSHTunnel has been configured or not