cfops

module
v2.0.29+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2016 License: Apache-2.0

README

cfops wercker status GoDoc Gitter

Version Compatibility

IAAS Supports PivotalCF on:

  • VSphere
    • ops-manager (backup/restore verified)
    • elastic-runtime
      • postgres datastore (backup/restore verified)
      • mysql datastore (backup/restore coming soon)
      • external datastore (backup/restore no yet supported)
  • AWS
    • ops-manager (backup verified)
    • elastic-runtime (not yet supported)
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-restore/backup-pcf.html).

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

Backing up ER will take Cloud Controller offline for the duration of the backup, causing your foundation to become readonly for the duration of the backup. App pushes etc will not work during this time.

Install

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

Contributing

PRs welcome.

Differences between v1 and v2

While the core package cfops uses to do the backup & restore has not changed the cli of cfops itself has been changed.

Major differences are:

  • one must specify a single tile to backup/restore at a time.
  • one can list the tiles that are supported via the cli.
  • more to come...
Usage (cfops v2.x.x+)

general commands

NAME:
   cfops - Cloud Foundry Operations Tool

USAGE:
   ./cfops command [command options] [arguments...]

COMMANDS:
   version	shows the application version currently in use
   list-tiles	shows a list of available backup/restore target tiles
   backup	creates a backup archive of the target tile
   restore	restores from an archive to the target tile
   help, h	Shows a list of commands or help for one command

setting pcf versions

If using PCF 1.6 or above you need to set the ER_VERSION variable.

ER_VERSION=1.6 ./cfops backup ...

setting log levels

LOG_LEVEL=(debug|info|error) ./cfops backup ...

list available tiles

$ cfops list-tiles
Available Tiles:
ops-manager
elastic-runtime

list version

$ cfops version
cfops version v2.0.0

run a backup on a tile

NAME:
   ./cfops backup - creates a backup archive of the target tile

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

DESCRIPTION:
   backup --opsmanagerhost <host> --adminuser <usr> --adminpass <pass> --opsmanageruser <opsuser> --opsmanagerpass <opspass> -d <dir> --tile elastic-runtime

OPTIONS:
   --destination, -d 		path of the Cloud Foundry archive [$CFOPS_DEST_PATH]
   --tile, -t 			a tile you would like to run the operation on [$CFOPS_TILE]
   --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]

run a restore on a tile

NAME:
   ./cfops restore - restores from an archive to the target tile

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

DESCRIPTION:
   restore --opsmanagerhost <host> --adminuser <usr> --adminpass <pass> --opsmanageruser <opsuser> --opsmanagerpass <opspass> -d <dir> --tile elastic-runtime

OPTIONS:
   --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 archive [$CFOPS_DEST_PATH]
   --tile, -t 			a tile you would like to run the operation on [$CFOPS_TILE]
   --opsmanagerhost, --omh 	hostname for Ops Manager [$CFOPS_HOST]

Usage (cfops v1.x.x)

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]

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cloudfoundry-community/go-cfenv
Package cfenv provides information about the current app deployed on Cloud Foundry, including any bound service(s).
Package cfenv provides information about the current app deployed on Cloud Foundry, including any bound service(s).
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
_workspace/src/github.com/kr/fs
Package fs provides filesystem-related functions.
Package fs provides filesystem-related functions.
_workspace/src/github.com/mitchellh/mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang
Ginkgo is a BDD-style testing framework for Golang
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
The Ginkgo CLI
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Ginkgo's Default Reporter
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
_workspace/src/github.com/onsi/gomega/ghttp/protobuf
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
Gomega matchers
_workspace/src/github.com/op/go-logging
Package logging implements a logging infrastructure for Go.
Package logging implements a logging infrastructure for Go.
_workspace/src/github.com/pkg/sftp
Package sftp implements the SSH File Transfer Protocol as described in https://filezilla-project.org/specs/draft-ietf-secsh-filexfer-02.txt
Package sftp implements the SSH File Transfer Protocol as described in https://filezilla-project.org/specs/draft-ietf-secsh-filexfer-02.txt
_workspace/src/github.com/pkg/sftp/examples/buffered-read-benchmark
buffered-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to a []byte on the client via io.Copy.
buffered-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to a []byte on the client via io.Copy.
_workspace/src/github.com/pkg/sftp/examples/buffered-write-benchmark
buffered-write-benchmark benchmarks the peformance of writing a single large []byte on the client to /dev/null on the server via io.Copy.
buffered-write-benchmark benchmarks the peformance of writing a single large []byte on the client to /dev/null on the server via io.Copy.
_workspace/src/github.com/pkg/sftp/examples/sftp-server
An example SFTP server implementation using the golang SSH package.
An example SFTP server implementation using the golang SSH package.
_workspace/src/github.com/pkg/sftp/examples/streaming-read-benchmark
streaming-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to /dev/null on the client via io.Copy.
streaming-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to /dev/null on the client via io.Copy.
_workspace/src/github.com/pkg/sftp/examples/streaming-write-benchmark
streaming-write-benchmark benchmarks the peformance of writing from /dev/zero on the client to /dev/null on the server via io.Copy.
streaming-write-benchmark benchmarks the peformance of writing from /dev/zero on the client to /dev/null on the server via io.Copy.
_workspace/src/github.com/rlmcpherson/s3gof3r
Package s3gof3r provides fast, parallelized, streaming access to Amazon S3.
Package s3gof3r provides fast, parallelized, streaming access to Amazon S3.
_workspace/src/github.com/rlmcpherson/s3gof3r/gof3r
gof3r is a command-line interface for s3gof3r: fast, concurrent, streaming access to Amazon S3.
gof3r is a command-line interface for s3gof3r: fast, concurrent, streaming access to Amazon S3.
_workspace/src/github.com/technoweenie/multipartstreamer
Package multipartstreamer helps you encode large files in MIME multipart format without reading the entire content into memory.
Package multipartstreamer helps you encode large files in MIME multipart format without reading the entire content into memory.
_workspace/src/golang.org/x/crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
_workspace/src/golang.org/x/crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
Package agent implements a client to an ssh-agent daemon.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/golang.org/x/crypto/ssh/test
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
_workspace/src/gopkg.in/yaml.v1
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.
cmd

Jump to

Keyboard shortcuts

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