This file contains hidden or 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
# Nothing revolutionary, but here are some random examples of interacting | |
# with deltacloud-client using Conductor's Rails console. | |
# Find the mock provider (because it's what I wanted to use) | |
provider = Provider.find_by_name 'mock' | |
# Get its account (modify this if you don't actually want the first one) | |
account = provider.provider_accounts.first | |
# Get a connection |
This file contains hidden or 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
# Stop the 'real' dbomatic: | |
sudo service conductor-dbomatic stop | |
# Start the one in src/ in the foreground and log to stdout: | |
dbomatic/dbomatic -n -l - | |
# Also, note that you can manipulate "instances" on Deltacloud's mock driver. | |
# They live in /var/tmp/deltacloud-mock-nobody/instances/ as YAML files. | |
# It seems you do not need to start Deltacloud for them to take effect. | |
# |
This file contains hidden or 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
namespace :dev do | |
desc "Setup and run cucumber and rspec" | |
task :tests => ["db:migrate", :cucumber, :spec] do |t| | |
end | |
desc "Generate PDF of models" | |
# This requires the railroad gem and graphviz (dot) | |
task :model_pdf do |t| | |
system "railroad -a --hide-magic -ij -o project.dot -M" |
This file contains hidden or 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
# Install the RPM at http://people.redhat.com/mawagner/rpms/rubygem-aeolus-image-0.3.0-0.20120104161149gitc13b654.fc15.noarch.rpm | |
# It includes some debugging output you'll see in irb | |
# | |
# Then start irb (from anywhere) | |
require 'rubygems' | |
#=> false | |
require 'aeolus_image' | |
#=> true |
This file contains hidden or 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
$ ab -c100 -t 30 http://blogs.n1zyy.com/n1zyy | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking blogs.n1zyy.com (be patient) | |
Finished 143 requests | |
Server Software: Apache/2.2.15 |
This file contains hidden or 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
acl purge { | |
"localhost"; | |
"127.0.0.1"; | |
} | |
#backend default { | |
# .host = "127.0.0.1"; | |
# .port = "8080"; | |
#} |
This file contains hidden or 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
$ ab -c100 -t 30 http://blogs.n1zyy.com/n1zyy | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking blogs.n1zyy.com (be patient) | |
Completed 5000 requests | |
Completed 10000 requests | |
Completed 15000 requests | |
Completed 20000 requests |
This file contains hidden or 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
$ ab -c100 -t 30 http://blogs.n1zyy.com/n1zyy | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking blogs.n1zyy.com (be patient) | |
Completed 5000 requests | |
Completed 10000 requests | |
Completed 15000 requests | |
Completed 20000 requests |
This file contains hidden or 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
$ ab -c100 -t 30 http://blogs.n1zyy.com/n1zyy | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking blogs.n1zyy.com (be patient) | |
Finished 969 requests | |
Server Software: Apache/2.2.15 |
This file contains hidden or 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
# Import an imaginary image from mock | |
>> img = Aeolus::Image::Factory::Image.new(:target_identifier => 'ami-ahmee', :target_name => 'mock', :provider_name => 'mock', :image_descriptor => '<image><name>ami-amigo</name></image>') | |
=> #<Aeolus::Image::Factory::Image:0x7f1b83fca058 @prefix_options={}, @attributes={"target_identifier"=>"ami-ahmee", "target_name"=>"mock", "provider_name"=>"mock", "image_descriptor"=>"<image><name>ami-amigo</name></image>"} | |
# Save! the image to send Factory the build request | |
>> img.save! | |
=> true | |
# pp img | |
>> img |