Skip to content
/ hammer Public

Wrapper CLI for interacting with OM, BOSH and others for PCF environments

License

Notifications You must be signed in to change notification settings

pivotal/hammer

Repository files navigation

hammer - wrapper CLI for interacting with PCF environments

Test Status

Installation

The latest build of the hammer cli is available from the releases page. Download the tar for your platform, untar it, and move it to your $PATH.

Or using brew on macOS or Linux:

brew tap pivotal/hammer https://github.com/pivotal/hammer
brew install hammer

Alternatively you can build hammer from source if you have Go installed:

git clone [email protected]:pivotal/hammer.git && cd hammer && go install

Config

In order to run the hammer tool against a given environment you need to have an environment config file in the following format:

{
  "name": "ENVIRONMENT-NAME",
  "ops_manager": {
    "url": "OPSMAN-URL",
    "username": "OPSMAN-USERNAME",
    "password": "OPSMAN-PASSWORD"
  },
  "ops_manager_private_key": "OPSMAN-RSA-PRIVATE-KEY",
  "ops_manager_public_ip": "OPSMAN-PUBLIC-IP",
  "sys_domain": "PAS-SYSTEM-DOMAIN",
  "pks_api":  {
     "url": "PKS-API-URL"
  }
}

Or the equivalent in yaml:

name: ENVIRONMENT-NAME
ops_manager:
  password: OPSMAN-PASSWORD
  url: OPSMAN-URL
  username: OPSMAN-USERNAME
ops_manager_private_key: OPSMAN-RSA-PRIVATE-KEY
ops_manager_public_ip: OPSMAN-PUBLIC-IP
pks_api:
  url: PKS-API-URL
sys_domain: PAS-SYSTEM-DOMAIN

This file can then be passed into the tool via hammer -t path-to-env-config <command>.

NB: sys_domain and pks_api.url are only needed for using hammer cf-login and hammer pks-login respectively.

Development

Unit and integration tests can be run if you have Ginkgo installed:

ginkgo -r .

Linters can also be run using golangci-lint:

golangci-lint run

Or just run both with:

make test

Special thanks to @blgm for letting an internal tool he created serve as the basis for this tool.

About

Wrapper CLI for interacting with OM, BOSH and others for PCF environments

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages