VMCU

The VMware Cloud CLI. This is the command line interface to VMware's Application Platform

Copyright 2010-2011, VMware, Inc. Licensed under the MIT license, please see the LICENSE file. All rights reserved. Copyright (c) 2011 Uhuru Software, Inc., All Rights Reserved

Usage: vmcu [options] command [<args>] [command_options]
Try 'vmcu help [command]' or 'vmcu help options' for more information.

Currently available vmcu commands are:

Getting Started
  target [url]                                 Reports current target or sets a new target
  login  [email] [--email, --passwd]           Login
  login  [token] [--token UHURU_TOKEN]         Login for Uhuru AppCloud
  cloud-team [name or id] [--realm REALM]      Set cloud team for UhuruApp Cloud. Sys admins can proxy realms.
  import-uhuru                                 Import targets from Uhuru Cloud Foundry Manager
  info                                         System and account information

Applications
  apps                                         List deployed applications

Application Creation
  push [appname]                               Create, push, map, and start a new application
  push [appname] --path                        Push application from specified path
  push [appname] --url                         Set the url for the application
  push [appname] --instances <N>               Set the expected number <N> of instances
  push [appname] --mem M                       Set the memory reservation for the application
  push [appname] --no-start                    Do not auto-start the application

Application Operations
  start <appname>                              Start the application
  stop  <appname>                              Stop the application
  restart <appname>                            Restart the application
  delete <appname>                             Delete the application

Application Updates
  update <appname> [--path]                    Update the application bits
  mem <appname> [memsize]                      Update the memory reservation for an application
  map <appname> <url>                          Register the application to the url
  unmap <appname> <url>                        Unregister the application from the url
  instances <appname> <num|delta>              Scale the application instances up or down

Application Information
  crashes <appname>                            List recent application crashes
  crashlogs <appname>                          Display log information for crashed applications
  logs <appname> [--all]                       Display log information for the application
  files <appname> [path] [--all]               Display directory listing or file download for path
  stats <appname>                              Display resource usage for the application
  instances <appname>                          List application instances

Application Environment
  env <appname>                                List application environment variables
  env-add <appname> <variable[=]value>         Add an environment variable to an application
  env-del <appname> <variable>                 Delete an environment variable to an application

Services
  services                                     Lists of services available and provisioned
  create-service <service> [--name,--bind]     Create a provisioned service
  create-service <service> <name>              Create a provisioned service and assign it <name>
  create-service <service> <name> <app>        Create a provisioned service and assign it <name>, and bind to <app>
  delete-service [servicename]                 Delete a provisioned service
  bind-service <servicename> <appname>         Bind a service to an application
  unbind-service <servicename> <appname>       Unbind service from the application
  clone-services <src-app> <dest-app>          Clone service bindings from <src-app> application to <dest-app>
  tunnel <servicename> [--port]                Create a local tunnel to a service
  tunnel <servicename> <clientcmd>             Create a local tunnel to a service and start a local client

Administration
  user                                         Display user account information
  passwd                                       Change the password for the current user
  logout                                       Logs current user out of the target system
  add-user [--email, --passwd]                 Register a new user (requires admin privileges)
  delete-user <user>                            Delete a user and all apps and services (requires admin privileges)

System
  runtimes                                     Display the supported runtimes of the target system
  frameworks                                   Display the recognized frameworks of the target system

Micro Cloud Foundry
  micro status                                 Display Micro Cloud Foundry VM status
  mciro offline                                Configure Micro Cloud Foundry VM for offline mode
  micro online                                 Configure Micro Cloud Foundry VM for online mode
    [--vmx file]                               Path to micro.vmx
    [--vmrun executable]                       Path to vmrun executable
    [--password cleartext]                     Cleartext password for guest VM vcap user
    [--save]                                   Save cleartext password in ~/.vmc_micro

Misc
  aliases                                      List aliases
  alias <alias[=]command>                      Create an alias for a command
  unalias <alias>                              Remove an alias
  targets                                      List known targets and associated authorization tokens

Help
  help [command]                               Get general help or help on a specific command
  help options                                 Get help on available options

Simple Story (for Ruby apps)

vmcu target api.cloudfoundry.com
vmcu 
bundle package
vmcu push

Uhuru example

# To build the gem and install it from source:
> git clone git://github.com/UhuruSoftware/vmcu.git  # Or just download the source from GitHub
> cd vmcu
> gem build vmcu.gemspec
> gem install vmcu-*.*.*.gem # Replace * with current version

# target to Uhuru AppCloud with the usual target command. It will automatically detect if it is a Uhuru AppCloud
# syntax: vmcu target
> vmcu target-uhuru 192.168.1.10

# Log to Uhuru AppCloud with the login command. Both a normal Uhuru AppCloud authentication token or a One Time Token
# are valid options
# syntax: login  [token] [--token UHURU_TOKEN]
> vmcu login rabbit-bear

# Target to a cloud team. If the cloud team is not beforehand, available cloud teams are presented.
# syntax: cloud-team [name or id] [--realm REALM]      Set cloud team for Uhuru App Cloud. Sys admins can proxy realms.
> vmcu  cloud-team
1: G0003        [Id: 09d8b20e-daf5-489f-8502-e4c886bc9ec6]
Which cloud team would you like to target to?:
> 1
Targeted to Uhuru AppCloud:    [http://services.uhurucloud.com]
 Cloud Team:                    [09d8b20e-daf5-489f-8502-e4c886bc9ec6]
 Cloud Foundry domain:          [uhurucloud.com]

# do some work
> vmcu apps

# target to a regular Cloud Foundry target
> vmcu target api.uhurucloud.net
> vmcu login

# do some work
> vmcu apps

# target back to the saved Uhuru AppCloud
> vmcu target 192.168.1.10
> vmcu apps

# import target from Uhuru Cloud Foundry Manager
> vmcu import-uhuru
1: Cloud Foundry  [http://api.sstest.cloudfoundry.me] / [email protected]
2: Cloud Foundry  [http://api.uhurucloud.net] / [email protected]
3: Uhuru AppCloud [http://www.uhurusts.com/] / BillingAccount5cb1a91539a5472787d289e9bd9493f6 / test / test
4: Uhuru AppCloud [http://192.168.1.10/] / BillingAccount5cb1a91539a5472787d289e9bd9493f6 / test / test
Which target to import?:
> 2
Targeted to Cloud Foundry  [http://api.uhurucloud.net] / [email protected]

# do some work
> vmcu apps