Skip to content

Commit

Permalink
Ruby deployment example.
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmann committed Jul 13, 2011
1 parent 58dab23 commit cf2a9fc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions deploy.rb
@@ -0,0 +1,18 @@
#/bin/env ruby

# sudo gem install json rest-client

require 'rubygems'
require 'yaml'
require 'rest_client'
require 'json'

hash = JSON.parse(RestClient.post("http://localhost:9990/management/add-content", :file => File.new("node-info.war", 'rb')))['result']['BYTES_VALUE']

RestClient.post("http://localhost:9990/management", {
'content' => [ 'hash' => { 'BYTES_VALUE' => hash } ],
'address' => [ 'deployment' => 'node-info.war' ],
'operation' => 'add',
'enabled' => 'true'
}.to_json)

Binary file added node-info.war
Binary file not shown.

0 comments on commit cf2a9fc

Please sign in to comment.