Skip to content

kpschuck/ops_manager_cli

 
 

Repository files navigation

OpsManagerCli Build Status Code Climate Gem Version

Command line tool to interact with Pivotal Operations Manager through its API, because GUIs are evil.

Questions? Pop in our slack channel!

Please note that the APIs of Ops Manager is experimental at this point. Changes to the APIs with new Ops Manager releases may break functionality.

Features

Core features

  • Support vSphere infrastructure (easy to extend to any cloud provider)
  • Deploy/Upgrade Ops Manager appliance
  • Deploy/Upgrade product tiles
  • Generate config settings templates for product tiles deployments
  • Run errands on deploy/upgrade for ops_manager < 1.7.x

Other features:

  • Show installation settings
  • Show installation logs
  • Uploads stemcell to Ops Manager
  • Delete unused products
  • Curl ops_manager API

Upgrading OpsManager appliance

To upgrade from 1.7.x -> 1.8.x use ops_manager_cli 0.3.1

Use ops_manager_cli >=0.4.0 once you are on 1.8.x.

Dependencies

All dependencies must be installed and available in user PATH

Installing

gem install ops_manager_cli

Usage

List available commands

ops_manager 

Target

ops_manager target OPSMAN_URL

Login

ops_manager login USERNAME PASSWORD

Deploy/Upgrade Ops Manager appliance

config example: ops_manager_deployment.yml

ops_manager deploy-appliance ops_manager_deployment.yml

Deploy/Upgrade product tile

Before running: target and login. You can do this through through config file too.

config example: product_deployment.yml

./ops_manager deploy-product product_deployment.yml

Regenerating SSL Certificates

Ops Manager generates certificates for BOSH director and UAA automatically before deploying director. Periodically you will want to regenerate this certificates. There is a workaround on how to do this with ops_manager_cli:

  1. Get director template:

     $ ops_manager get-director-template > product_installation_settings.yml
    
  2. Set director's cert and private key to null:

     # product_installation_settings.yml
     # For director ssl certs
     + director_ssl:
     +   private_key_pem:
     +   cert_pem:
    
     # For director ssl certs
     + uaa_ssl:
     +   private_key_pem:
     +   cert_pem:
    
  3. Perform director deployment:

     $ ops_manager deploy-product product_deployment.yml
    

Note: remove this lines unless you want to regenerate certs on every single deployment :)

Using with Docker

The ops_manager_cli tool can be installed in a docker container typically in conjunction with Concourse CI. This allows users to build concourse pipelines to deploy and manage their Pivotal Cloud Foundry deployments.

Building Docker image

git co vX.X.X
bundle exec rake build 
docker build  \
  --build-arg DOWNLOAD_URL=http://your_blobstore.com/VMware-ovftool-4.1.0-2459827-lin.x86_64.bundle \
  -t compozed/ops_manager_cli:vX.X.X

Provisioning docker image to private registry

docker tag -f compozed/ops_manager_cli:vX.X.X PRI_REGISTRY:PORT/compozed/ops_manager_cli:vX.X.X
docker push PRI_REGISTRY:PORT/compozed/ops_manager_cli

Contributing

See our CONTRIBUTING section for more information.

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 99.9%
  • Shell 0.1%