Umbreo Command Line Interface


We have 2 ways to call action command:

  • command-suite
  • command-form

Wiki Umbreo Command CLI

  1. Endpoint Configuration
  2. Authentication
  3. Instance
  4. Module
  5. Profile
  6. System
  7. Blueprint
  8. Stack Template
  9. Stack
  10. Cloud Provider
  11. Provider
  12. Service Provider
  13. Service


Getting Started

This guide will help you to setup and run CLI

Step1: install bundler

$ gem install bundler

Step2: Run bundle install

$ bundle install


How to Run CLI

You can simply go run this command

For first time
$ bundle exec bin/umbreo [command] [arg]
For secondtime
$ umbreo [command] [arg]


Below are current lists command on CLI


1. Endpoint Configuration

We can switch host endpoint for development mode

command-suite
$ umbreo endpoint configure --url endpoint_url
$ umbreo endpoint configure --url https://beta.umbreo.com
command-form
$ umbreo endpoint configure
$ Enter your Endpoint (URL): https://beta.umbreo.com


2. Authentication

Login

File Credential will be created on ~/.umbreoconfig file

command-suite
$ umbreo login --email your_email --password your_password
$ umbreo login --email foo@umbreo.com --password foobar
command-form
$ umbreo endpoint login

Enter your Umbreo credentials.
$ Email: foobar@umbreo.com 
$ Password (Typing will be hidden):

Logout

$ umbreo logout
Local credentials cleared.


3. Instance

List or filter

command-suite
$ umbreo instance list --register_type |all|registered|unregistered| --type |all|test|manual|provider| --cloud |aws|gcompute|docean|openstack|XenServer| --page |number_of_page|
$ umbreo instance list --register_type all --type test --cloud aws --page 2
command-form
$ umbreo instance list

1. all
2. registered
3. unregistered
$ Please choose filter of register type? all

1. all
2. test
3. manual
4. provider
$ Please choose filter of instance deployment type? test
command-suite
$ umbreo instance search --keyword |search_keyword| --register_type |all|registered|unregistered| --type |all|test|manual|provider| --cloud |aws|gcompute|docean|openstack|XenServer| --page |number_of_page|
$ umbreo instance search --keyword 'Foo Instance' --register_type all --type test --cloud aws
command-form
$ umbreo instance search

1. all
2. registered
3. unregistered
$ Please choose filter of register type? all

1. all
2. test
3. manual
4. provider
$ Please choose filter of instance deployment type? test

$ Search keyword: Foo Instance

Show detail

command-suite
$ umbreo instance show --id |id_or_name|
$ umbreo instance show --id 'foo instance'
command-form
$ umbreo instance show
$ Name or ID of Instance: foo instance

Deploy Blueprint

command-suite
$ umbreo instance deploy --custom |optional_to_get_custom_or_umbreo_blueprints| --name |name_of_instance| --desc |desc_of_instance| --blueprint |directory_blueprint_json_file| --service_logging |directory_my_service_logging_json_file| --service_monitoring |directory_service_monitoring_json_file| --service_backup |directory_service_backup_json_file| --type |test|manual|provider| --provider |directory_my_provider_json_file|
$ umbreo instance deploy --name 'Foo Instance' --desc 'My first instance' --type provider --blueprint apache_webserver_with_php.json --provider digital_ocean_provider.json --service_backup baculaexternal.json
command-form
$ umbreo instance deploy --custom

$ Name of new instance: Foo Instance
$ Description of new instance: My First instance
$ Blueprint directory File JSON: custom_apache_webserver_with_php.json
$ Service logging directory File JSON (optional): 
$ Service monitoring directory File JSON (optional): 
$ Service backup directory File JSON (optional): 

1. test
2. manual
3. provider
$ Please choose deployment type? 1


4. Module

All command that’s associated to Module

List

command-suite
$ umbreo module list --page |number_of_page|
$ umbreo module list

Search

command-suite
$ umbreo module search --keyword |search_keyword| --page |number_of_page|
$ umbreo module search --keyword php


5. Profile

All command that’s associated to Profile

List

command-suite
$ umbreo profile list --page |number_of_page|
$ umbreo profile list

Search

command-suite
$ umbreo profile search --keyword |search_keyword| --page |number_of_page|
$ umbreo profile search --keyword rails


6. System

List

command-suite
$ umbreo system list


7. Blueprint

All command that’s associated to Blueprint

List or filter

command-suite
$ umbreo blueprint list --custom |optional_to_get_custom_or_umbreo_blueprints| --os |all|linux|windows| --page |number_of_page|
$ umbreo blueprint list --os all
command-form
$ umbreo blueprint list

1. all
2. linux
3. windows
$ Please choose filter of instance provider? all

Search

command-suite
$ umbreo blueprint search --keyword |search_keyword| --custom |optional_to_get_custom_or_umbreo_blueprints| --os |all|linux|windows| --page |number_of_page|
$ umbreo blueprint search --keyword 'lamp server' --os all
command-form
$ umbreo blueprint search

1. all
2. linux
3. windows
$ Please choose filter of instance provider? all

$ Search keyword: lamp server

Show detail

command-suite
$ umbreo blueprint show --id |id_or_slug| --custom |optional_to_get_custom_or_umbreo_blueprints|
$ umbreo blueprint show --id lamp-server
command-form
$ umbreo blueprint show
$ ID or Slug of blueprint: lamp-server
output
ID: 3
Name: LAMP Server
Description: 
OS: linux

Delete my custom blueprint

Delete bluprient can bse used if a custom blueprint didn’t have instance.

command-suite
$ umbreo delete --id |id_or_slug|
$ umbreo delete --id foo-blueprint
command-form
$ umbreo blueprint delete
Id or Slug Custom Blueprint: foo-blueprint

Create custom blueprint

command-suite
$ umbreo blueprint create --name |name_blueprint| --operating_system |linux|windows| --system |name_ofsystem| --profile |profiles|
$ umbreo blueprint create --name 'foo blueprint' --operating_system linux --system 'Ubuntu 12.04' --profile 'Ruby, Postgresql'
command-form
$ umbreo blueprint create

$ Name of blueprint: Foo Blueprint

1. linux
2. windows
$ Please choose your blueprint operating system? linux

$ Description: My first blueprint

1. Ubuntu
2. CentOS
3. Fedora
4. Ubuntu 12.04
5. Ubuntu 14.04
6. CentOS 5
7. CentOS 6
8. CentOS 7
9. Fedora 19
10. Fedora 20
11. Ubuntu 10.04
12. Windows
$ Please choose your blueprint system? Ubuntu 10.04

$ Add profiles (call list_profiles to show profiles) eg: 'Ruby, Postgresql': Ruby, Postgresql

Deploy blueprint

Export blueprint json

command-suite
$ umbreo blueprint export --custom |optional_to_get_custom_or_umbreo_blueprints| --id |id_or_name_of_blueprint|
$ umbreo blueprint export --custom --id 'foo-blueprint'
command-form
$ umbreo blueprint export --custom
ID or Slug of Blueprint: foo-blueprint

Validate blueprint json

command-suite
$ umbreo blueprint valid --file |directory_of_json_file|
$ umbreo blueprint valid --file foo_blueprint.json
command-form
$ umbreo blueprint validate
$ Directory of Blueprint: foo_blueprint.json


8. Stack Template

All command that’s associated to Stack Template

List or filter

command-suite
$ umbreo stack_template list

Search

command-suite
$ umbreo stack_template search --keyword |search_keyword|
$ umbreo stack_template search --keyword php
command-form
$ umbreo stack_template search
$ Keyword of Stack Template: php

Show detail

command-suite
$ umbreo stack_template show --id |id_or_name|
$ umbreo stack_template show --id 'Load Balanced Lamp Server'
command-form
$ umbreo stack_template show
$ Name or id of Stack Template: Load Balanced Lamp Server

Export stack template json

command-suite
$ umbreo stack_template export --id |id_or_name_of_blueprint|
$ umbreo stack_template export --id 'Load Balanced Lamp Server'
command-form
$ umbreo stack_template export
Name or ID of Stack Template: Load Balanced Lamp Server

Export blueprints of stack template json

command-suite
$ umbreo stack_template blueprint_export --id |id_or_name_of_blueprint|
$ umbreo stack_template blueprint_export --id 'Load Balanced Lamp Server'
command-form
$ umbreo stack_template blueprint_export
Name or ID of Stack Template: Load Balanced Lamp Server


9. Stack

All command that’s associated to Stack

List

command-suite
$ umbreo stack list

Search

command-suite
$ umbreo stack search --keyword |search_keyword|
$ umbreo stack search --keyword 'Stack One'
command-form
$ umbreo stack search
$ Keyword of Stack: one

Show detail

command-suite
$ umbreo stack show --id |id_or_name_stack|
$ umbreo stack show --id 'Foo Stack'
command-form
$ umbreo stack show
$ Name or ID of Stack: Foo Stack

Create stack

$ umbreo stack create --id |id_or_name_stack_template| --name |name_of_stack| --desc |desc_of_stack|
$ umbreo stack create --id 1 --name 'Foo Stack' --desc 'My first Foo Stack'

1. yes
2. no
$ Will you add Nginx Webserver? yes
$ Description of new instance: My first node stack
$ Blueprint directory File JSON: /Users/foo/Documents/json/nginx_webserver.json
$ Service logging directory File JSON (optional): 
$ Service monitoring directory File JSON (optional): 
$ Service backup directory File JSON (optional): 

1. test
2. manual
3. provider
$ Please choose deployment type? 3
$ Compute provider directory File JSON: /Users/foo/Documents/json/digital_ocean_provider.json


10. Cloud Provider

All command that’s associated to Stack

List

command-suite
$ umbreo cloud_provider list

Export cloud provider json

command-suite
$ umbreo cloud_provider export --id |id_or_slug_of_cloud_provider|
$ umbreo cloud_provider export --id aws
command-form
$ umbreo cloud_provider export
$ ID or Slug of Cloud Provider: aws

Validate cloud provider json

command-suite
$ umbreo cloud_provider valid --file |directory_of_json_file|
$ umbreo cloud_provider valid --file amazon_web_services(aws).json
command-form
$ umbreo blueprint validate
$ Directory File JSON: amazon_web_services(aws).json


11. Provider

List or filter

command-suite
$ umbreo provider list --cloud |slug_cloud_provider| --page |number_of_page|
$ umbreo provider list --cloud all --page 2
command-form
$ umbreo provider list --page 2

1. all
2. aws
3. gcompute
4. docean
5. openstack
6. XenServer
$ Please choose Cloud Provider filter? all

Search

command-suite
$ umbreo provider search --cloud |slug_cloud_provider| --keyword |search_keyword| --page |number_of_page|
$ umbreo provider search --cloud docean --keyword foo
command-form
$ umbreo provider search

1. all
2. aws
3. gcompute
4. docean
5. openstack
6. XenServer
$ Please choose Cloud Provider filter? docean

$ Search keyword: FooPro1

Show detail

command-suite
$ umbreo provider show --id |id_or_name|
$ umbreo provider show --id 'FooPro1'
command-form
$ umbreo provider show
$ Name or ID of Provider: FooPro1

Create provider

For create provider, we have to export cloud provider json first

command-suite
 $ umbreo provider:create |aws|gcompute|docean|openstack|xenserver| --file |directory_of_json_file| --name |provider_name| --desc |provider_description|
 $ umbreo provider:create digital_ocean --file digital_ocean.json --name 'Foo Instance'
command-form
$ umbreo cloud_provider:create digital_ocean 
$ Provider Name: Foo Instance
$ Description (optional): test
$ Directory of File: digital_ocean.json

Get Data Credential

For create instance, we need data credential from if we choose provider as deployment type

Digital Ocean

Get Images for Digital Ocean Provider

$ umbreo provider:digital_ocean images --id |id_or_name_provider|
$ umbreo provider:digital_ocean images --id 'Foo Provider'

Get Flavors for Digital Ocean Provider

$ umbreo provider:digital_ocean flavors --id |id_or_name_provider| --image |id_image_digital_ocean_provider|
$ umbreo provider:digital_ocean flavors --id 'Foo Provider' --image 18830380

Get Regions for Digital Ocean Provider

$ umbreo provider:digital_ocean regions --id |id_or_name_provider| --image |id_image_digital_ocean_provider|
$ umbreo provider:digital_ocean regions --id 'Foo Provider' --image 18830380

Get Compute Params JSON file

$ umbreo provider:digital_ocean export --id |id_or_name_provider|
$ umbreo provider:digital_ocean export --id 'Foo Provider'

Check valid Compute Params JSON file

$ umbreo provider:digital_ocean valid --file |directory_of_json_file|
$ umbreo provider:digital_ocean valid --file digital_ocean_compute_params.json
Openstack

Get Zone for Openstack

$ umbreo provider:openstack zones --id |id_or_name_provider|
$ umbreo provider:openstack zones --id 'Openstack Foo Provider'

Get Flavor for Openstack

$ umbreo provider:openstack flavors --id |id_or_name_provider|
$ umbreo provider:openstack flavors --id 'Openstack Foo Provider'

Get Image for Openstack

$ umbreo provider:openstack images --id |id_or_name_provider|
$ umbreo provider:openstack images --id 'Openstack Foo Provider'

Get Group for Openstack

$ umbreo provider:openstack groups --id |id_or_name_provider|
$ umbreo provider:openstack groups --id 'Openstack Foo Provider'

Get Keypair for Openstack

$ umbreo provider:openstack keypairs --id |id_or_name_provider|
$ umbreo provider:openstack keypairs --id 'Openstack Foo Provider'

Get Export for Openstack

$ umbreo provider:openstack export --id |id_or_name_provider|
$ umbreo provider:openstack export --id 'Openstack Foo Provider'

Get Validate for Openstack

$ umbreo provider:openstack valid --file |directory_of_json_file|
$ umbreo provider:openstack valid --file openstack_provider.json
Google Cloud Engine

Get Image for Google Compute Engine

$ umbreo provider:google_ce images --id |id_or_name_provider|
$ umbreo provider:google_ce images --id 'GCE Foo Provider'

Get Region for Google Compute Engine

$ umbreo provider:google_ce regions --id |id_or_name_provider|
$ umbreo provider:google_ce regions --id 'GCE Foo Provider'

Get Machine for Google Compute Engine

$ umbreo provider:google_ce machines --id |id_or_name_provider|
$ umbreo provider:google_ce machines --id 'GCE Foo Provider'

Get Network for Google Compute Engine

$ umbreo provider:google_ce networks --id |id_or_name_provider|
$ umbreo provider:google_ce networks --id 'GCE Foo Provider'

Get Export for Google Compute Engine

$ umbreo provider:google_ce export --id |id_or_name_provider|
$ umbreo provider:google_ce export --id 'GCE Foo Provider'

Get Validate for Google Compute Engine

$ umbreo provider:google_ce valid --file |directory_of_json_file|
$ umbreo provider:google_ce valid --file google_compute_engine_service_provider.json
Amazon Web Service

Get Images for AWS Provider

$ umbreo provider:amazon_web_service images --id |id_or_name_provider|
$ umbreo provider:amazon_web_service images --id 'AWS Foo Provider'

Get Size Storage for AWS Provider

$ umbreo provider:amazon_web_service sizes --id |id_or_name_provider|
$ umbreo provider:amazon_web_service sizes --id 'AWS Foo Provider'

Get Region for AWS Provider

$ umbreo provider:amazon_web_service regions --id |id_or_name_provider|
$ umbreo provider:amazon_web_service regions --id 'AWS Foo Provider'

Get Keypair for AWS Provider

$ umbreo provider:amazon_web_service keypairs --id |id_or_name_provider|
$ umbreo provider:amazon_web_service keypairs --id 'AWS Foo Provider'

Get Security Group for AWS Provider

$ umbreo provider:amazon_web_service security_groups --id |id_or_name_provider|
$ umbreo provider:amazon_web_service security_groups --id 'AWS Foo Provider'

Get Compute Params JSON file

$ umbreo provider:amazon_web_service export --id |id_or_name_provider|
$ umbreo provider:amazon_web_service export --id 'AWS Foo Provider'

Check valid Compute Params JSON file

$ umbreo provider:amazon_web_service valid --file |directory_of_json_file|
$ umbreo provider:amazon_web_service valid --file amazon_web_service_compute_params.json


12. Service Provider

List or filter

command-suite
$ umbreo service_provider list --type |all|logging|monitoring|backup| --resource |all|master|client| --page |number_of_page|
$ umbreo service_provider list --type all --resource all
command-form
$ umbreo service_provider list

1. all
2. logging
3. monitoring
4. backup
$ Please choose filter of service provider type? all

1. all
2. master
3. client
$ Please choose filter of resource? all

Search

command-suite
$ umbreo service_provider search --keyword |search_keyword| --type |all|logging|monitoring|backup| --resource |all|master|client| --page |number_of_page|
$ umbreo service_provider search --keyword bacula --type all --resource all
command-form
$ umbreo service_provider search

1. all
2. logging
3. monitoring
4. backup
$ Please choose filter of service provider type? all

1. all
2. master
3. client
$ Please choose filter of resource? all

$ Search Keyword: bacula

Show detail

command-suite
$ umbreo service_provider show --id |id_or_name|
$ umbreo service_provider show --id baculaserver
command-form
$ umbreo cloud_provider show
$ Name or ID of Service Provider: baculaserver

Export service provider json

command-suite
$ umbreo service_provider export --id |id_or_name|
$ umbreo service_provider export --id baculaserver
command-form
$ umbreo cloud_provider export
$ Name or ID of Service provider: baculaserver

Validate service provider json

command-suite
$ umbreo service_provider valid --file |directory_of_json_file|
$ umbreo service_provider valid --file baculaserver.json
command-form
$ umbreo service_provider validate
$ Directory of Service Provider: baculaserver.json
output
Validate passed. You can deploy now


13. Service

All command that’s associated to Service

List or filter

command-suite
$ umbreo service list --state |all|active|nonactive| --type |optional_id_or_slug_service_provider| --page |number_of_page|
$ umbreo service list --state all --type baculaserver
command-form
$ umbreo service list

1. all
2. active
3. unactive
$ Please choose filter of state service? all

$ ID or Slug of Service provider: baculaserver

Search

command-suite
$ umbreo service search --keyword |search_keyword| --state |all|active|nonactive| --type |optional_id_or_slug_service_provider| --page |number_of_page|
$ umbreo service search --keyword 'BaculaExternal' --state all --type baculaserver
command-form
$ umbreo service search

1. all
2. active
3. unactive
$ Please choose filter of state service? 1

$ ID or Slug of Service provider: baculaserver

$ Search keyword: BaculaExternal

Show detail

command-suite
$ umbreo service show --id |id_or_name|
$ umbreo service show --id 'BaculaExternal'
command-form
$ umbreo service show
$ Name or ID of Service: BaculaExternal
output
ID: 1
Name: BaculaExternal
Service Provider: baculaserver
Link type: external
Active: Yes
Description: My first Bacula

Create Service

command
$ umbreo service create --external |optional_to_choose_external| --file |directory_of_json_file| --id |service_template_id_or_slug| --name |name_of_service| --desc |description_for_service|
$ umbreo service create --external --file baculaclient.json --id bacula --name 'Foo Service' --desc 'My first foo service'

Export service json

command-suite
$ umbreo service export --id |id_or_name|
$ umbreo service export --id 'BaculaExternal'
command-form
$ umbreo service export
$ Name or ID of Service: BaculaExternal

Validate service json

command-suite
$ umbreo service valid --file |directory_of_json_file|
$ umbreo service valid --file baculaexternal.json
command-form
$ umbreo service validate
$ Directory of Service Provider: baculaexternal.json
output
Validate passed. You can deploy now

Help Command To Get Started

For some reason you might be confuse to get started with CLI, you can simply run this command to get help

umbreo help