omg-cli

command module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2017 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)

Version Compatibility

currently uses pluginlib v1 w/ protocol version 2. will not work with plugins prior to version 1.

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
# the below dependencies only apply if you are looking to install a BOSH Director with omg-cli
$> sudo apt-get update
$> sudo apt-get install -y build-essential zlibc zlib1g-dev ruby ruby-dev openssl libxslt-dev libxml2-dev libssl-dev libreadline6 libreadline6-dev libyaml-dev libsqlite3-dev sqlite3

or

$> xcode-select --install
$> brew install openssl
# 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 \
--az z1 \
--az z2 \
--aws-availablity-zone us-east-1a \
--aws-availablity-zone us-east-1b \
--network-name-1 deployment \
--network-az-1 z1 \
--network-cidr-1 10.0.16.0/20 \
--network-gateway-1 10.0.16.1 \
--network-dns-1 10.0.0.2 \
--network-reserved-1 10.0.16.2-10.0.16.10 \
--network-static-1 10.0.16.11 \
--aws-subnet-name-1 subnet-1 \
--aws-security-group-1 sg-1234
--network-name-2 deployment \
--network-az-2 z2 \
--network-cidr-2 10.0.32.0/20 \
--network-gateway-2 10.0.32.1 \
--network-dns-2 10.0.0.2 \
--network-reserved-2 10.0.32.2-10.0.32.10 \
--network-static-2 10.0.32.11 \
--aws-subnet-name-2 subnet-2 \
--aws-security-group-2 sg-1234

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