omg-cli

command module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: Apache-2.0 Imports: 36 Imported by: 0

README

- omg -

it's kind of like an (o)ps (m)anager in (g)olang

an iaas independent plugable executable to install bosh, cloud configs and product deployments

wercker status

release info

What is OMG (http://enaml.pezapp.io)

omg is a cli tool. It natively allows users to:

  • spin up a bosh on a target iaas,
  • load it up with a cloud config
  • deploy 'products' via their new bosh (vault, cloudfoundry, concourse, etc)
What are plugins
plugins are your way of extending omg, providing a deployment definition or cloud config definition. instead of dealing with yaml or tiles, we build testable plugins using enaml and simply register them with omg.

download a bundled plugin from a omg release or build your own available plugin types are cloudconfig or product for more info about how to build a plugin take a look at one of the bundled plugins (ie. https://github.com/enaml-ops/omg-cli/tree/master/cloudconfigs/aws)

how we do bosh / cloud config / deployments

composes bosh-init, enaml and plugins to create a simple cli installer

downloads:

install a BOSH using OMG-cli (aws example)

check the bosh docs to setup your vpc (https://bosh.io/docs/init-aws.html)

# download omg cli
$> wget -O omg https://github.com/enaml-ops/omg-cli/releases/download/v0.0.25/omg-osx && chmod +x omg
# deploy your bosh using the omg cli
$> ./omg aws \
--mode uaa \
--aws-subnet subnet-xxxxxxxxxxx \
--bosh-public-ip x.x.x.x \
--aws-pem-path ~/bosh.pem \
--aws-access-key  xxxxxxxxxxxxxxxxxxxxxx \
--aws-secret xxxxxxxxxxxxxxxxxxx \
--aws-instance-size t2.micro \
--aws-region us-east-1 \
--aws-availability-zone us-east-1c

instructions on how to install BOSH on other supported iaas can be found by:

$> ./omg azure --help
$> ./omg aws --help
$> ./omg vsphere --help
$> ./omg photon --help
$> ./omg gcp --help

Setup Cloud Config on your BOSH (aws example)

# download cloudconfig plugin for aws
$> wget https://github.com/enaml-ops/omg-cli/releases/download/v0.0.25/aws-cloudconfigplugin-osx
# register the cloud config plugin for your iaas
$> ./omg register-plugin \
--type cloudconfig \
--pluginpath aws-cloudconfigplugin-osx
# to see your newly added plugin
$> ./omg list-cloudconfigs
Cloud Configs:
aws  -  .plugins/cloudconfig/aws-cloudconfigplugin-osx  -  map[]
# upload cloud config
$> ./omg deploy-cloudconfig \
--bosh-url https://bosh.url.com --bosh-port 25555 \
--bosh-user admin --bosh-pass admin --ssl-ignore \
aws-cloudconfigplugin-osx \
--aws-region us-east-1 \
--aws-security-group bosh \
--bosh-az-name-1 z1 \
--cidr-1 10.0.0.0/24 \
--gateway-1 10.0.0.1 \
--dns-1 10.0.0.2 \
--aws-az-name-1 us-east-1a \
--aws-subnet-name-1 aws-subnet-1 \
--bosh-reserve-range-1 "10.0.0.1-10.0.0.10"

for information on other options and flags:

$> ./omg deploy-cloudconfig aws-cloudconfigplugin-osx --help

How to use omg + plugins to install a product (ex,. concourse on aws)

tips & tricks

  • set LOG_LEVEL=debug for verbose output
  • adding the --print-manifest flag with the bosh creds will simply print the manifest you are about to deploy
bosh deployed concourse

deploy a concourse

# download concourse product plugin
$> wget https://github.com/enaml-ops/omg-product-bundle/releases/download/v0.0.14/concourse-plugin-osx
# register concourse product plugin
$> ./omg register-plugin --type product --pluginpath concourse-plugin-osx
# please only upload your releases and stemcells manually if your deployment does not use remote urls
# otherwise this will be automatically uploaded via omg-cli
# deploy your concourse
$> ./omg deploy-product \
--bosh-url https://bosh.url.com --bosh-port 25555 --bosh-user admin \
--bosh-pass admin --ssl-ignore \
concourse-plugin-osx \
--web-vm-type small \
--worker-vm-type small \
--database-vm-type small \
--network-name private \
--url my.concourse.com \
--username concourse \
--password concourse \
--web-instances 1 \
--web-azs us-east-1c \
--worker-azs us-east-1c \
--database-azs us-east-1c \
--bosh-stemcell-alias trusty \
--postgresql-db-pwd secret \
--database-storage-type medium

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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