Skip to content

Instantly share code, notes, and snippets.

@ezmobius
Created November 9, 2010 22:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ezmobius/669919 to your computer and use it in GitHub Desktop.
Save ezmobius/669919 to your computer and use it in GitHub Desktop.
(master) % vmc apps
No applications available.
(master) % ls
foo.rb
(master) % cat foo.rb
require 'rubygems'
require 'sinatra'
get '/' do
host = ENV['VMC_APP_HOST']
port = ENV['VMC_APP_PORT']
"<h1>Hello from the Cloud! via: #{host}:#{port}</h1>"
end
(master) % vmc push fu
Would you like to deploy from the current directory? [Yn]:
Application Deployed URL: 'fu.vcloudlabs.com'?
Simple Sinatra application detected in foo.rb.
Memory Reservation [Default:128M] (64M, 128M, 256M or 512M) 64M
Uploading Application Information.
Uploading Application.
Uploaded Application 'fu' (0K).
Push completed.
Trying to start Application: 'fu'.
.
Application 'fu' started.
(master) % vmc instances fu 5
Scaled 'fu' up to 5 instances.
(master) % vmc instances fu
Index State Since
-- -------- -------------
0 RUNNING 11/09/2010 02:05PM
1 RUNNING 11/09/2010 02:05PM
2 RUNNING 11/09/2010 02:05PM
3 RUNNING 11/09/2010 02:05PM
4 RUNNING 11/09/2010 02:05PM
(master) % vmc instances fu 3
Scaled 'fu' down to 3 instances.
(master) % vmc instances fu
Index State Since
-- -------- -------------
0 RUNNING 11/09/2010 02:05PM
1 RUNNING 11/09/2010 02:05PM
2 RUNNING 11/09/2010 02:05PM
(master) % vmc instances fu 1
Scaled 'fu' down to 1 instance.
(master) % vmc stats fu
Instance CPU (Cores) Memory (limit) Disk (limit) Uptime
--------- ----------- -------------- ------------ ------
0 0.3% (8) 21.5M (64M) 44.0K (2G) 0d:0h:1m:5s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment