hammer - wrapper CLI for interacting with PCF environments
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.
Alternatively you can build hammer
from source if you have Go:
$ git clone git@github.com: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-FQDN",
"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-FQDN"
}
}
This file can then be passed into the tool via hammer -t path-to-env-config.json <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
Special thanks to @blgm for letting an internal tool he created serve as the basis for this tool.