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 string, adminUsername string, adminPassword string, opsManagerUsername string, opsManagerPassword string, target string) (context *OpsManager, err error) { backupContext := cfbackup.NewBackupContext(target, cfenv.CurrentEnv()) 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, BackupContext: backupContext, LocalExecuter: command.NewLocalExecuter(), OpsmanagerBackupDir: OpsMgrBackupDir, SSHUsername: opsManagerUsername, SSHPassword: opsManagerPassword, SSHPort: OpsMgrDefaultSSHPort, } 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 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 }
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) (opsManagerTile tileregistry.Tile, err error)
New -- builds a new ops manager object pre initialized
Click to show internal directories.
Click to hide internal directories.