opsmanager

package
v0.1.158 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	OpsMgrInstallationSettingsFilename    string = "installation.json"
	OpsMgrInstallationAssetsFileName      string = "installation.zip"
	OpsMgrInstallationAssetsPostFieldName string = "installation[file]"
	OpsMgrDeploymentsFileName             string = "deployments.tar.gz"
	OpsMgrEncryptionKeyFileName           string = "cc_db_encryption_key.txt"
	OpsMgrBackupDir                       string = "opsmanager"
	OpsMgrDeploymentsDir                  string = "deployments"
	OpsMgrDefaultSSHPort                  int    = 22
	OpsMgrInstallationSettingsURL         string = "https://%s/api/installation_settings"
	OpsMgrInstallationAssetsURL           string = "https://%s/api/installation_asset_collection"
	OpsMgrDeploymentsFile                 string = "/var/tempest/workspaces/default/deployments/bosh-deployments.yml"
)

OpsManager constants

Variables

View Source
var NewOpsManager = func(opsManagerHostname,
	adminUsername,
	adminPassword,
	adminToken,
	opsManagerUsername,
	opsManagerPassword,
	opsManagerPassphrase,
	clientID,
	clientSecret,
	target,
	cryptKey string) (context *OpsManager, err error) {

	backupContext := cfbackup.NewBackupContext(target, cfenv.CurrentEnv(), cryptKey)
	settingsHTTPRequestor := ghttp.NewHttpGateway()
	settingsMultiHTTPRequestor := httpUploader(cfbackup.GetUploader(backupContext))
	assetsHTTPRequestor := ghttp.NewHttpGateway()
	assetsMultiHTTPRequestor := httpUploader(cfbackup.GetUploader(backupContext))

	context = &OpsManager{
		SettingsUploader:    settingsMultiHTTPRequestor,
		AssetsUploader:      assetsMultiHTTPRequestor,
		SettingsRequestor:   settingsHTTPRequestor,
		AssetsRequestor:     assetsHTTPRequestor,
		DeploymentDir:       path.Join(target, OpsMgrBackupDir, OpsMgrDeploymentsDir),
		Hostname:            opsManagerHostname,
		Username:            adminUsername,
		Password:            adminPassword,
		ClientID:            clientID,
		ClientSecret:        clientSecret,
		Token:               adminToken,
		BackupContext:       backupContext,
		LocalExecuter:       command.NewLocalExecuter(),
		OpsmanagerBackupDir: OpsMgrBackupDir,
		SSHUsername:         opsManagerUsername,
		SSHPassword:         opsManagerPassword,
		Passphrase:          opsManagerPassphrase,
		SSHPort:             OpsMgrDefaultSSHPort,
		ClearBoshManifest:   false,
	}
	err = context.createExecuter()
	return
}

NewOpsManager initializes an OpsManager instance

Functions

This section is empty.

Types

type OpsManager

type OpsManager struct {
	cfbackup.BackupContext
	Hostname            string
	Username            string
	Password            string
	Token               string
	ClientID            string
	ClientSecret        string
	Passphrase          string
	TempestPassword     string
	DbEncryptionKey     string
	Executer            command.Executer
	LocalExecuter       command.Executer
	SettingsUploader    httpUploader
	AssetsUploader      httpUploader
	SettingsRequestor   httpRequestor
	AssetsRequestor     httpRequestor
	DeploymentDir       string
	OpsmanagerBackupDir string
	SSHPrivateKey       string
	SSHUsername         string
	SSHPassword         string
	SSHPort             int
	ClearBoshManifest   bool
}

OpsManager contains the location and credentials of a Pivotal Ops Manager instance

func (*OpsManager) Backup

func (context *OpsManager) Backup() (err error)

Backup performs a backup of a Pivotal Ops Manager instance

func (*OpsManager) GetInstallationSettings

func (context *OpsManager) GetInstallationSettings() (settings io.Reader, err error)

GetInstallationSettings retrieves all the installation settings from OpsMan and returns them in a buffered reader

func (*OpsManager) Restore

func (context *OpsManager) Restore() (err error)

Restore performs a restore of a Pivotal Ops Manager instance

func (*OpsManager) SetSSHPrivateKey

func (context *OpsManager) SetSSHPrivateKey(key string)

SetSSHPrivateKey - sets the private key in the ops manager object and rebuilds the remote executer associated with the opsmanager

type OpsManagerBuilder

type OpsManagerBuilder struct{}

OpsManagerBuilder - an object that can build ops manager objects

func (*OpsManagerBuilder) New

func (s *OpsManagerBuilder) New(tileSpec tileregistry.TileSpec) (opsManagerTileCloser tileregistry.TileCloser, err error)

New -- builds a new ops manager object pre initialized

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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