Skip to content
forked from sneal/omg-cli

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

License

Notifications You must be signed in to change notification settings

anwarchk/omg-cli

 
 

Repository files navigation

- 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

how we do bosh / cloud config / deployments

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

download here:

https://github.com/enaml-ops/omg-cli/releases/latest

install bosh on aws

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

$ omg-osx aws --aws-subnet subnet-123456 --aws-elastic-ip 12.34.567.890 --aws-pem-path ~/boshstuff/bosh.pem --aws-access-key  xxxxxxxxxxxx --aws-secret xxxxxxxxxx --aws-instance-size t2.micro --aws-region us-east-1 --aws-availability-zone us-east-1c

install bosh on azure

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

$ $ ./omg-osx azure --name bosh --azure-public-ip xxxx --azure-vnet xxxx --azure-subnet xxxx --azure-subscription-id xxxx --azure-tenant-id xxxx --azure-client-id xxxx --azure-client-secret xxxx --azure-resource-group xxxx --azure-storage-account xxxx --azure-security-group xxxx --azure-ssh-pub-key xxxx --azure-ssh-user xxxx --azure-private-key-path xxxx

register a plugin

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)

$ ./omg-osx register-plugin --type cloudconfig --pluginpath ~/Downloads/aws-cloudconfigplugin-osx

# to see your newly added plugin
$ ./omg-osx list-cloudconfigs
Cloud Configs:
aws  -  .plugins/cloudconfig/aws-cloudconfigplugin-osx  -  map[]

How to use omg + plugins to install concourse (bosh, cloud-config, aws and osx)

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

initial setup

install your omg-cli & plugins

export VERSION=v0.0.12
export OS=osx
$ wget https://github.com/enaml-ops/omg-cli/releases/download/${VERSION}/omg-${OS}
$ wget https://github.com/enaml-ops/omg-cli/releases/download/${VERSION}/concourse-plugin-${OS}
$ wget https://github.com/enaml-ops/omg-cli/releases/download/${VERSION}/aws-cloudconfigplugin-${OS}

$ mv ./omg-${OS} omg && chmod +x omg
$ ./omg register-plugin --type cloudconfig --pluginpath aws-cloudconfigplugin-${OS}
$ ./omg list-cloudconfigs
$ ./omg register-plugin --type product --pluginpath concourse-plugin-${OS}
$ ./omg list-products

bosh install

build your bosh

$ ./omg aws \
--aws-subnet subnet-123456 \
--aws-elastic-ip bosh.url.com \
--aws-pem-path ~/boshstuff/bosh.pem \
--aws-access-key  xxxxxxxxxxxxxxxxxxxx \
--aws-secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--aws-instance-size t2.micro \
--aws-region us-east-1 \
--aws-availability-zone us-east-1c

setup cloud config

setup a 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-subnet-map us-east-1c:subnet-123456 \
--region us-east-1 \
--security-group bosh

bosh deployed concourse

deploy a concourse

# 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
$ bosh upload release https://bosh.io/d/github.com/concourse/concourse?v=1.0.1
$ bosh upload release https://bosh.io/d/github.com/cloudfoundry-incubator/garden-linux-release?v=0.337.0
$ bosh upload stemcell https://bosh.io/d/stemcells/bosh-aws-xen-hvm-ubuntu-trusty-go_agent?v=3232.4 

$ ./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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.8%
  • Shell 0.2%