Skip to content

cjoelrun/monster

 
 

Repository files navigation

Monster

An OpenStack Orchestration Engine

To install

Installation

  • Clone the repo and install
    git clone https://github.com/rcbops-qa/monster.git ~/monster
    virtualenv -p `which python2` ~/monster/.venv
    source ~/monster/.venv/bin/activate
    pip install -r ~/monster/requirements.txt
        

    note: If you’re on a small server I’ve experienced failed installs of gevent because there isn’t enough memory. Adding swap fixed things.

  • put your credentials in secret.yaml at the top level of monster
    rackspace:
      user: YOUR_USERNAME
      api_key: YOUR_API_KEY
      auth_url: https://identity.api.rackspacecloud.com/v2.0/
      region: dfw
      plugin: rackspace
        

    if you use cloudfiles your user and password can also be placed in the secret.yaml

    cloudfiles:
      user: YOUR_USER
      password: YOUR_PASSWORD
        

    If you use razor to provision servers add its API endpoint support clean up

    razor:
      url: RAZOR_IP
        

    You will also need to provide the default password for the cluster nodes

    default_pass: DEFAULT_PASSWORD
        

CLI

compute.py and storage.py are the CLIs

Build

Deploys an OpenStack cluster

compute.py build -n ubuntu-default --branch master --template ubuntu-default --config config.yaml --secret-path secret.yaml --log log.txt --log-level DEBUG --provisioner rackspace

Arguments

  • name: name of the deployment
  • branch: branch rcbops cookbooks
  • template: name of template to use
  • config: path to config file
  • secret-path: path to secret config file
  • dry: only build environment (will provision in cloud)
  • log: path to log file
  • log-level: level to log - INFO, DEBUG
  • provisioner: provisioner to use - razor, rackspace, openstack

Show

Shows details about an OpenStack deployment

compute.py show -n ubuntu-default

Arguments

  • name: name of the deployment
  • config: path to config file
  • secret-path: path to secret config file
  • log: path to log file
  • log-level: level to log - INFO, DEBUG

Destroy

Destroys an OpenStack deployment

compute.py destroy -n ubuntu-default --config config.yaml --log log.txt --log-level DEBUG

Arguments

  • name: name of the deployment
  • config: path to config file
  • secret-path: path to secret config file
  • log: path to log file
  • log-level: level to log - INFO, DEBUG

openrc

Load openrc environment variables into shell. After loaded openstack cli commands will communicate to cluster.

compute.py openrc -n precise-default
nova boot --image cirros-image --flavor 1

Arguments

  • name: name of the deployment
  • config: path to config file
  • secret-path: path to secret config file
  • log: path to log file
  • log-level: level to log - INFO, DEBUG

Horizon

Attempts to open Horizon in browser

compute.py horizon -n ubuntu-default

Arguments

  • name: name of the deployment
  • config: path to config file
  • secret-path: path to secret config file
  • log: path to log file
  • log-level: level to log - INFO, DEBUG

Test

Runs tests on a running OpenStack cluster

compute.py test --ha --tempest -n ubuntu-default --config config.yaml --log log.txt --log-level DEBUG --iterations 3

Arguments

  • ha: enables high availability testing
  • tempest: enables the tempest testing suite
  • name: name of the deployment
  • config: path to config file
  • secret-path: path to secret config file
  • log: path to log file
  • log-level: level to log - INFO, DEBUG
  • iterations: number of full test runs

Upgrade

Upgrades the deployment to the specified branch

compute.py upgrade -n ubuntu-default -u v4.2.1 --log-level DEBUG

Arguments

  • name: name of the deployment
  • upgrade-branch: branch to upgrade to
  • config: path to config file
  • secret-path: path to secret config file
  • log: path to log file
  • log-level: level to log - INFO, DEBUG

Tmux

Opens an new tmux session with each node in a different window

compute.py tmux -n ubuntu-default

Requires tmux version >= 1.8

To add a 12.4 precise tmux 1.8 backport PPA, execute the following:

add-apt-repository -y ppa:kalakris/tmux
apt-get update
apt-get install tmux -y

Arguments

  • name: name of the deployment
  • config: path to config file
  • secret-path: path to secret config file
  • log: path to log file
  • log-level: level to log - INFO, DEBUG

Development

iPython

To make development of monster easier you can load deployments using iPython and mess around with them:

  1. Start ipython in top monster directory
  2. Run
    from tools.ipython import load
    deployment = load("yourdep")
        
  3. ????
  4. profit!!!

About

Deployment/Orchestration Engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.9%
  • Shell 6.1%