This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
:pass: yourSecurePassword | |
:user: youremail@test.com | |
:rs_api_url: https://my.rightscale.com/api/acct/999999999999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> require 'rubygems' | |
=> true | |
irb(main):002:0> Gem.available?('sinatra') | |
=> false | |
irb(main):003:0> `gem install sinatra` | |
WARNING: Installing to ~/.gem since /opt/local/lib/ruby/gems/1.8 and | |
/opt/local/bin aren't both writable. | |
WARNING: You don't have /Users/jeremy/.gem/ruby/1.8/bin in your PATH, | |
gem executables will not run. | |
=> "Successfully installed sinatra-0.9.2\n1 gem installed\nInstalling ri documentation for sinatra-0.9.2...\nInstalling RDoc documentation for sinatra-0.9.2...\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> require 'rubygems' | |
=> true | |
irb(main):002:0> Gem.available(^C | |
(reverse-i-search)`availab': Gem.^Cailable?('sinatra') | |
irb(main):002:0> Gem.available?('mixlib-cli') | |
=> false | |
irb(main):003:0> `gem install mixlib-cli` | |
WARNING: Installing to ~/.gem since /opt/local/lib/ruby/gems/1.8 and | |
/opt/local/bin aren't both writable. | |
WARNING: You don't have /Users/jeremy/.gem/ruby/1.8/bin in your PATH, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HISTFILE = "~/.irb_history" | |
MAXHISTSIZE = 100 | |
begin | |
if defined? Readline::HISTORY | |
histfile = File::expand_path( HISTFILE ) | |
if File::exists?( histfile ) | |
lines = IO::readlines( histfile ).collect {|line| line.chomp} | |
puts "Read %d saved history commands from %s." % | |
[ lines.nitems, histfile ] if $DEBUG || $VERBOSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# this will eventually be a cmd line script: | |
# inputs - | |
# 1) authentication, 2) packages list, 3) chef recipe url, 4) node attributes as .. yaml? | |
# | |
require 'rubygems' | |
require 'right_rackspace' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$activity.start_ruboto_activity("$source_picker") do | |
setup_content do | |
x = self.load_deployments | |
@list_view = list_view(:id => 55555, :list => x) | |
#registerForContextMenu(@list_view) | |
@list_view | |
end | |
def self.reload_deploys(parent_context) | |
x = get_deployments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Distributed logging for physical deployment (for UEC and more) | |
User story: | |
As a UEC admin I can view all logs from every physical system include in my UEC deployment in one central place so that I can easily find out and debug why some components of my UEC deployment are failing. | |
* flume: | |
- java component | |
- centrally configured (redundant via zookeeper) | |
- agents / forwarders / sinks / management server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Moving from one "currently running server" to another | |
server1 = Server.find 1 | |
server2 = Server.find 2 | |
server1.reload_current | |
server2.reload_current | |
server1.parameters = server2.parameters | |
server1.save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rest_connection' | |
require 'rspec' | |
require 'ruby-debug' | |
CONFIGDIR = File.dirname(__FILE__) | |
def set_params_from_json(server, file) | |
inputs = JSON::load(IO.read(File.join(CONFIGDIR, file))) | |
server.parameters = inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## One way to change the rest_connection settings using Ruby code. | |
RightScale::Api::BaseExtend.class_eval <<-EOF | |
@@connection.settings = { | |
:user => "someuser@rightscale.com", | |
:pass => "test1234_", | |
:api_url => "https://my.rightscale.com/api/acct/12345", | |
:common_headers => { | |
"X_API_VERSION" => "1.0" | |
} |
OlderNewer