cfops

package module
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

README

cfops wercker status GoDoc

Version Compatibility

(as of release v1.0.0+)

This is tested and known to work for Ops Manager v1.5

This is tested and known to work for ER v1.5

(!!! NOTE: Automated restore not working for ER 1.5 !!!)

Overview

This is simply an automation that is based on the supported way to back up Pivotal Cloud Foundry (http://docs.pivotal.io/pivotalcf/customizing/backup-settings.html).

It may be extended in the future to support greater breadth of functionality.

Install

Download the latest version here: https://github.com/pivotalservices/cfops/releases

Contributing

PRs welcome.

Usage

For example you can try the various commands, args and flags (and --help documentation) that are currently proposed, such as:

$ ./cfops -help

$ ./cfops backup

$ ./cfops restore

etc.

Sample help output:

$ ./cfops help backup
NAME:
   backup - backup --opsmanagerhost <host> --adminuser <usr> --adminpass <pass> --opsmanageruser <opsuser> --opsmanagerpass <opspass> -d <dir> --tl 'opsmanager, er'

USAGE:
   command backup [command options] [arguments...]

DESCRIPTION:
   backup a Cloud Foundry deployment, including Ops Manager configuration, databases, and blob store

OPTIONS:
   --tilelist, --tl 		a csv list of the tiles you would like to run the operation on [$CFOPS_TILE_LIST]
   --opsmanagerhost, --omh 	hostname for Ops Manager [$CFOPS_HOST]
   --adminuser, --du 		username for Ops Mgr admin (Ops Manager WebConsole Credentials) [$CFOPS_ADMIN_USER]
   --adminpass, --dp 		password for Ops Mgr admin (Ops Manager WebConsole Credentials) [$CFOPS_ADMIN_PASS]
   --opsmanageruser, --omu 	username for Ops Manager VM Access (used for ssh connections) [$CFOPS_OM_USER]
   --opsmanagerpass, --omp 	password for Ops Manager VM Access (used for ssh connections) [$CFOPS_OM_PASS]
   --destination, -d 		path of the Cloud Foundry backup archive [$CFOPS_BACKUP_PATH]






   
$ ./cfops help restore
NAME:
   restore - restore --opsmanagerhost <host> --adminuser <usr> --adminpass <pass> --opsmanageruser <opsuser> --opsmanagerpass <opspass> -d <dir> --tl 'opsmanager, er'

USAGE:
   command restore [command options] [arguments...]

DESCRIPTION:
   Restore a Cloud Foundry deployment, including Ops Manager configuration, databases, and blob store

OPTIONS:
   --tilelist, --tl 		a csv list of the tiles you would like to run the operation on [$CFOPS_TILE_LIST]
   --opsmanagerhost, --omh 	hostname for Ops Manager [$CFOPS_HOST]
   --adminuser, --du 		username for Ops Mgr admin (Ops Manager WebConsole Credentials) [$CFOPS_ADMIN_USER]
   --adminpass, --dp 		password for Ops Mgr admin (Ops Manager WebConsole Credentials) [$CFOPS_ADMIN_PASS]
   --opsmanageruser, --omu 	username for Ops Manager VM Access (used for ssh connections) [$CFOPS_OM_USER]
   --opsmanagerpass, --omp 	password for Ops Manager VM Access (used for ssh connections) [$CFOPS_OM_PASS]
   --destination, -d 		path of the Cloud Foundry backup archive [$CFOPS_BACKUP_PATH]

Documentation

Index

Constants

View Source
const (
	ErrUnsupportedTileFormat = "you have a unsupported tile in your list: %s"

	Restore = "restore"
	Backup  = "backup"
	OpsMgr  = "OPSMANAGER"
	ER      = "ER"
)

Variables

View Source
var (
	BuiltinPipelineExecution = map[string]func(string, string, string, string, string, string) error{
		Restore: cfbackup.RunRestorePipeline,
		Backup:  cfbackup.RunBackupPipeline,
	}
	SupportedTiles map[string]func() (Tile, error)
)

Functions

func ErrUnsupportedTile

func ErrUnsupportedTile(errString string) error

func RunPipeline

func RunPipeline(fs flagSet, action string) (err error)

func SetLogger

func SetLogger(logger log.Logger)

func SetupSupportedTiles

func SetupSupportedTiles(fs flagSet)

Types

type Tile

type Tile interface {
	Backup() error
	Restore() error
}

Directories

Path Synopsis
Godeps
cmd

Jump to

Keyboard shortcuts

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