rumm 0.0.24 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/Gemfile +1 -0
- data/README.md +4 -4
- data/app/controllers/flavors_controller.rb +7 -0
- data/app/controllers/jenkins_controller.rb +66 -0
- data/app/controllers/jobs_controller.rb +28 -0
- data/app/controllers/servers_controller.rb +11 -1
- data/app/forms/jenkins/create_form.rb +6 -0
- data/app/forms/jobs/create_form.rb +8 -0
- data/app/forms/servers/create_form.rb +1 -0
- data/app/help/commands.txt +10 -1
- data/app/help/create_job_on_jenkins_server.txt +17 -0
- data/app/help/install_jenkins_on_server.txt +18 -0
- data/app/help/routes.rb +4 -0
- data/app/help/show_flavors.txt +14 -0
- data/app/providers/flavors_provider.rb +16 -0
- data/app/providers/job_provider.rb +14 -0
- data/app/routes.rb +4 -0
- data/app/views/flavors/index.txt.erb +5 -0
- data/app/views/jenkins/create.txt.erb +1 -0
- data/app/views/jobs/create.txt.erb +1 -0
- data/app/views/jobs/job_template.xml.erb +79 -0
- data/app/views/servers/create.txt.erb +6 -2
- data/lib/rumm/version.rb +1 -1
- data/rumm.gemspec +1 -1
- data/spec/features/flavors_spec.rb +17 -0
- data/spec/fixtures/cassettes/flavors/show.yml +173 -0
- data/spec/providers/job_provider_spec.rb +19 -0
- metadata +27 -6
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZDEwOTk4MGFiMzQ1N2Y1ZmJlZTExNjU5MzAwNDBkY2VlZDY0MjY2NjBhNzhl
|
10
|
-
MzEzZDgzYzdiMTBkMDFiMTVhNTNhZjYzMDZhZmY2MzIwN2M3YTllMWYzNzU4
|
11
|
-
NGI0YjRmNGQyN2ZlY2QyZGEyZmUzYWFhYmJlNjdjMDdkZWYxYmE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZjQyNWMwYzgxMjU2MmU3MDVkMTcyZWEzMWFlNjM3NGIwYjFiYTY0Mzk0Mzg2
|
14
|
-
Zjk5MzE5MjUxZDQwMzBkYjAzODkyZjkyZTZjZDU1MTcyZGE4YTJjMDdlZmM5
|
15
|
-
ODMyZmUxMGZjZWI0NTQxZGM4NDdlYTJlNmMwZmVmZGViYjM5MjE=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a3d7f25fc9b2ef4f7a3d3637423a4f9dfe3e39f2
|
4
|
+
data.tar.gz: d9dacf2f9f9e7b73c4315dd791f09ab121cb2be5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9e3c0965b2a470d8e5d5c6ed71a93f9953a350be841841b6eccabf008503d83a591ef5917ef5ff9292e022c50e8bc5729ed9ae91bcfa92ebb431fd23ac1bfb47
|
7
|
+
data.tar.gz: 48e35fa414200ed79dca3b5b2390e495c30a55355cd8f8e25a7618e18cbd5f2030d2fa752ea528a08463ab5035d12ff0e12d3c897057c4823c3d253703b195e0
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -12,14 +12,14 @@ to easily build and manage infrastructure for great good.
|
|
12
12
|
## Usage
|
13
13
|
|
14
14
|
Authenticate with rackspace using your cloud credentials as follows:
|
15
|
-
|
15
|
+
|
16
16
|
rumm login
|
17
17
|
username: joe
|
18
18
|
password: ****
|
19
19
|
Default Region (Enter for ord):
|
20
20
|
|
21
21
|
logged in as joe, credentials written to ~/.rummrc
|
22
|
-
|
22
|
+
*(Note: The authentication will fail unless you have generated and bound an API Key to your account: https://mycloud.rackspace.com/account#settings).*
|
23
23
|
|
24
24
|
Now we can see the list of servers we have available:
|
25
25
|
|
@@ -37,11 +37,11 @@ For further help, including a full listing of commands, type:
|
|
37
37
|
|
38
38
|
rumm help
|
39
39
|
|
40
|
-
To access servers outside of your default region, you can prefix your rumm command with REGION=<region name
|
40
|
+
To access servers outside of your default region, you can prefix your rumm command with `REGION=<region name>`.
|
41
41
|
|
42
42
|
For example to list servers in IAD you would execute the following:
|
43
43
|
|
44
|
-
REGION=iad rumm show servers
|
44
|
+
REGION=iad rumm show servers
|
45
45
|
|
46
46
|
## Further Reading
|
47
47
|
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require "tmpdir"
|
2
|
+
require "open3"
|
3
|
+
require "bundler"
|
4
|
+
|
5
|
+
class JenkinsController < MVCLI::Controller
|
6
|
+
requires :compute
|
7
|
+
requires :naming
|
8
|
+
requires :command
|
9
|
+
|
10
|
+
def create
|
11
|
+
template = Jenkins::CreateForm
|
12
|
+
argv = MVCLI::Argv.new command.argv
|
13
|
+
form = template.new argv.options
|
14
|
+
command.output.puts "Setting up a chef kitchen in order to install jenkins on your server."
|
15
|
+
command.output.puts "This could take a while...."
|
16
|
+
sleep(1)
|
17
|
+
tmpdir = Pathname(Dir.tmpdir).join 'chef_kitchen'
|
18
|
+
FileUtils.mkdir_p tmpdir
|
19
|
+
Dir.chdir tmpdir do
|
20
|
+
Bundler.with_clean_env do
|
21
|
+
File.open('Gemfile', 'w') do |f|
|
22
|
+
f.puts 'source "https://rubygems.org"'
|
23
|
+
f.puts 'gem "knife-solo", ">= 0.3.0pre3"'
|
24
|
+
f.puts 'gem "berkshelf"'
|
25
|
+
end
|
26
|
+
execute "bundle install --binstubs"
|
27
|
+
execute "bin/knife solo init ."
|
28
|
+
FileUtils.rm "Berksfile"
|
29
|
+
File.open 'Berksfile', 'w' do |f|
|
30
|
+
f.puts "site :opscode"
|
31
|
+
f.puts ""
|
32
|
+
f.puts "cookbook 'runit', '>= 1.1.2'"
|
33
|
+
f.puts "cookbook 'jenkinsbox', github: 'hayesmp/jenkins-rackbox-cookbook'"
|
34
|
+
end
|
35
|
+
execute "bin/berks install --path cookbooks/"
|
36
|
+
execute "bin/knife solo prepare root@#{server.ipv4_address}"
|
37
|
+
File.open('nodes/host.json', 'w') do |f|
|
38
|
+
f.puts("{\"run_list\":[\"recipe[build-essential]\",\"recipe[jenkinsbox::postgresql]\",\"recipe[jenkinsbox]\",\"recipe[jenkinsbox::jenkins]\"],\"jenkinsbox\":{\"build_essential\":{ \"compiletime\":true},\"jenkins\":{\"git_name\":\"#{form.git_name}\",\"git_email\":\"#{form.git_email}\",\"ip_address\":\"#{server.ipv4_address}\", \"host\":\"#{server.name}\"},\"ruby\":{\"versions\":[\"2.0.0-p247\"],\"global_version\":\"2.0.0-p247\"},\"apps\":{\"unicorn\":[{\"appname\":\"app1\",\"hostname\":\"app1\"}]},\"db_root_password\":\"iloverandompasswordsbutthiswilldo\", \"databases\":{\"postgresql\":[{\"database_name\":\"app1_production\",\"username\":\"app1\",\"password\":\"app1_pass\"}]}}}")
|
39
|
+
end
|
40
|
+
|
41
|
+
FileUtils.rm_rf "#{server.ipv4_address}.json"
|
42
|
+
FileUtils.mv "nodes/host.json", "nodes/#{server.ipv4_address}.json"
|
43
|
+
execute "bin/knife solo cook root@#{server.ipv4_address} -V"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
return server
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def execute(cmd)
|
52
|
+
Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
|
53
|
+
while line = stdout.gets
|
54
|
+
command.output.puts " " + line
|
55
|
+
end
|
56
|
+
exit_status = wait_thr.value
|
57
|
+
unless exit_status.success?
|
58
|
+
abort "FAILED !!! #{cmd}"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def server
|
64
|
+
compute.servers.find {|s| s.name == params[:id]} or fail Fog::Errors::NotFound
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'net/ssh'
|
2
|
+
|
3
|
+
class JobsController < MVCLI::Controller
|
4
|
+
requires :compute
|
5
|
+
requires :command
|
6
|
+
requires :job
|
7
|
+
|
8
|
+
def create
|
9
|
+
template = Jobs::CreateForm
|
10
|
+
argv = MVCLI::Argv.new command.argv
|
11
|
+
form = template.new argv.options
|
12
|
+
command.output.puts "Setting up new jenkins job: #{form.job_name} on server: #{server.name}."
|
13
|
+
sleep(1)
|
14
|
+
xml = job.job_template(form.job_repo, form.job_command)
|
15
|
+
Net::SSH.start("#{server.ipv4_address}", "root") do |ssh|
|
16
|
+
# 'ssh' is an instance of Net::SSH::Connection::Session
|
17
|
+
ssh.exec! "echo '#{xml}' >> #{form.job_name}-config.xml"
|
18
|
+
ssh.exec! "java -jar /home/jenkins/jenkins-cli.jar -s http://0.0.0.0:8080 create-job #{form.job_name} < #{form.job_name}-config.xml"
|
19
|
+
end
|
20
|
+
return server
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def server
|
26
|
+
compute.servers.find {|s| s.name == params[:id]} or fail Fog::Errors::NotFound
|
27
|
+
end
|
28
|
+
end
|
@@ -17,6 +17,7 @@ class ServersController < MVCLI::Controller
|
|
17
17
|
form = template.new argv.options
|
18
18
|
form.validate!
|
19
19
|
#Add personalization
|
20
|
+
|
20
21
|
options = {
|
21
22
|
name: form.name,
|
22
23
|
flavor_id: form.flavor_id,
|
@@ -24,11 +25,20 @@ class ServersController < MVCLI::Controller
|
|
24
25
|
private_key_path: form.ssh_private, #"~/.ssh/id_rsa"
|
25
26
|
public_key_path: form.ssh_public #"~/.ssh/id_rsa.pub"
|
26
27
|
}
|
28
|
+
|
29
|
+
if form.no_passwd_lock
|
30
|
+
options[:no_passwd_lock] = true
|
31
|
+
end
|
32
|
+
|
27
33
|
command.output.puts "--> bootstrapping server #{options[:name]}"
|
28
34
|
#Progress bar
|
29
35
|
server = compute.servers.bootstrap options
|
30
36
|
command.output.puts " done."
|
31
|
-
|
37
|
+
|
38
|
+
OpenStruct.new.tap do |os|
|
39
|
+
os.server = server
|
40
|
+
os.no_passwd_lock = options[:no_passwd_lock]
|
41
|
+
end
|
32
42
|
end
|
33
43
|
|
34
44
|
def update
|
@@ -6,6 +6,7 @@ class Servers::CreateForm < MVCLI::Form
|
|
6
6
|
input :flavor_id, String, default: 2
|
7
7
|
input :ssh_private, String, default: ->() {File.expand_path "~/.ssh/id_rsa"}, decode: ->(s) {File.expand_path s}
|
8
8
|
input :ssh_public, String, default: ->() {File.expand_path "~/.ssh/id_rsa.pub"}, decode: ->(s) {File.expand_path s}
|
9
|
+
input :no_passwd_lock, String
|
9
10
|
|
10
11
|
validates(:ssh_private, "private ssh key location must lead to a file") {|ssh_private| File.exists? ssh_private}
|
11
12
|
validates(:ssh_private, "private ssh key must be a valid key") do |ssh_private|
|
data/app/help/commands.txt
CHANGED
@@ -4,7 +4,9 @@ Authentication:
|
|
4
4
|
|
5
5
|
Images:
|
6
6
|
rumm show images
|
7
|
-
|
7
|
+
|
8
|
+
Flavors:
|
9
|
+
rumm show flavors
|
8
10
|
|
9
11
|
Servers:
|
10
12
|
rumm show servers
|
@@ -14,6 +16,13 @@ Servers:
|
|
14
16
|
rumm destroy server :id
|
15
17
|
rumm ssh :id
|
16
18
|
|
19
|
+
Railsify:
|
20
|
+
rumm railsify server :id
|
21
|
+
|
22
|
+
Jenkins:
|
23
|
+
rumm install jenkins on server :id
|
24
|
+
rumm create job on jenkins server :id
|
25
|
+
|
17
26
|
Loadbalancers:
|
18
27
|
rumm show loadbalancers
|
19
28
|
rumm show loadbalancer :id
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Usage:
|
2
|
+
rumm create job on jenkins server id [--job_name STRING] [--job_repo STRING] [--job_command STRING]
|
3
|
+
|
4
|
+
Options:
|
5
|
+
--job_name STRING # Job name, exa: "rails-girls-job"
|
6
|
+
--job_repo STRING # Git repository (https), exa: "https://github.com/hayesmp/railsgirls-app.git"
|
7
|
+
--job_command STRING # Job command, exa: "rake"
|
8
|
+
|
9
|
+
Arguments:
|
10
|
+
ID: STRING # Name of the jenkins server to create job on
|
11
|
+
|
12
|
+
Description:
|
13
|
+
This command will allow you to create jobs on your rumm created jenkins server.
|
14
|
+
A typical setup is with a rails projects, running the rake command to trigger any tests.
|
15
|
+
|
16
|
+
Examples:
|
17
|
+
rumm create job on server sorrel-shantung --job_name rails-girls-job --job_repo https://github.com/hayesmp/railsgirls-app.git --job_command rake
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Usage:
|
2
|
+
rumm install jenkins on server id [--git_name STRING] [--git_email STRING]
|
3
|
+
|
4
|
+
Options:
|
5
|
+
--git_name STRING # Git name, exa: "Grover Cleveland"
|
6
|
+
--git_email STRING # Git email, exa: "grover@whitehouse.gov"
|
7
|
+
|
8
|
+
Arguments:
|
9
|
+
ID: STRING # Name of the server to install jenkins on
|
10
|
+
|
11
|
+
Description:
|
12
|
+
The purpose of this rumm command is to easily create a CI (continuous integration)
|
13
|
+
server for a given project. The 'install jenkins' command will install and setup
|
14
|
+
jenkins on a rumm-prepared server. If the user may specify git credentials to be
|
15
|
+
used.
|
16
|
+
|
17
|
+
Examples:
|
18
|
+
rumm install jenkins on server sorrel-shantung --git_name Grover Cleveland --git_email grover@whitehouse.gov
|
data/app/help/routes.rb
CHANGED
@@ -15,6 +15,8 @@ help('logout')
|
|
15
15
|
|
16
16
|
help('show images')
|
17
17
|
|
18
|
+
help('show flavors')
|
19
|
+
|
18
20
|
help('show servers')
|
19
21
|
help('show server')
|
20
22
|
help('create server')
|
@@ -22,6 +24,8 @@ help('update server')
|
|
22
24
|
help('destroy server')
|
23
25
|
|
24
26
|
help('railsify server')
|
27
|
+
help('install jenkins on server')
|
28
|
+
help('create job on jenkins server')
|
25
29
|
|
26
30
|
help('show loadbalancers')
|
27
31
|
help('show loadbalancer')
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fog'
|
2
|
+
class FlavorsProvider
|
3
|
+
requires :credentials
|
4
|
+
|
5
|
+
def value
|
6
|
+
options = {
|
7
|
+
:provider => 'Rackspace',
|
8
|
+
:rackspace_username => credentials.username,
|
9
|
+
:rackspace_api_key => credentials.api_key,
|
10
|
+
:version => :v2,
|
11
|
+
:rackspace_region => credentials.rackspace_region,
|
12
|
+
:connection_options => {:headers => {"User-Agent" => "rumm/#{Rumm::VERSION} fog/#{Fog::VERSION}"}}
|
13
|
+
}
|
14
|
+
Fog::Compute.new(options).flavors
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'erubis'
|
2
|
+
|
3
|
+
class JobProvider
|
4
|
+
def value
|
5
|
+
self
|
6
|
+
end
|
7
|
+
|
8
|
+
def job_template(git_url, build_command)
|
9
|
+
template = File.read(File.join(File.dirname(File.expand_path(__FILE__)), "../views/jobs/job_template.xml.erb"))
|
10
|
+
template = Erubis::Eruby.new(template, :escape_html => false)
|
11
|
+
#fail template.inspect
|
12
|
+
template.result(:build_command => build_command, :git_url => git_url)
|
13
|
+
end
|
14
|
+
end
|
data/app/routes.rb
CHANGED
@@ -9,6 +9,8 @@ match 'logout' => 'authentication#logout'
|
|
9
9
|
|
10
10
|
match 'show images' => 'images#index'
|
11
11
|
|
12
|
+
match 'show flavors' => 'flavors#index'
|
13
|
+
|
12
14
|
match 'show servers' => 'servers#index'
|
13
15
|
match 'show server :id' => 'servers#show'
|
14
16
|
match 'create server' => 'servers#create'
|
@@ -16,6 +18,8 @@ match 'update server :id' => 'servers#update'
|
|
16
18
|
match 'destroy server :id' => 'servers#destroy'
|
17
19
|
|
18
20
|
match 'railsify server :id' => 'railsifications#create'
|
21
|
+
match 'install jenkins on server :id' => 'jenkins#create'
|
22
|
+
match 'create job on jenkins server :id' => 'jobs#create'
|
19
23
|
|
20
24
|
match 'show loadbalancers' => 'loadbalancers#index'
|
21
25
|
match 'show loadbalancer :id' => 'loadbalancers#show'
|
@@ -0,0 +1 @@
|
|
1
|
+
jenkins installed on server <%= this.name %>: <%= this.ipv4_address %>
|
@@ -0,0 +1 @@
|
|
1
|
+
new jenkins job created on server <%= this.name %>: <%= this.ipv4_address %>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project>
|
3
|
+
<actions/>
|
4
|
+
<description></description>
|
5
|
+
<keepDependencies>false</keepDependencies>
|
6
|
+
<properties/>
|
7
|
+
<scm class="hudson.plugins.git.GitSCM" plugin="git@1.5.0">
|
8
|
+
<configVersion>2</configVersion>
|
9
|
+
<userRemoteConfigs>
|
10
|
+
<hudson.plugins.git.UserRemoteConfig>
|
11
|
+
<name></name>
|
12
|
+
<refspec></refspec>
|
13
|
+
<url><%= git_url %></url>
|
14
|
+
</hudson.plugins.git.UserRemoteConfig>
|
15
|
+
</userRemoteConfigs>
|
16
|
+
<branches>
|
17
|
+
<hudson.plugins.git.BranchSpec>
|
18
|
+
<name>**</name>
|
19
|
+
</hudson.plugins.git.BranchSpec>
|
20
|
+
</branches>
|
21
|
+
<disableSubmodules>false</disableSubmodules>
|
22
|
+
<recursiveSubmodules>false</recursiveSubmodules>
|
23
|
+
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
|
24
|
+
<authorOrCommitter>false</authorOrCommitter>
|
25
|
+
<clean>false</clean>
|
26
|
+
<wipeOutWorkspace>false</wipeOutWorkspace>
|
27
|
+
<pruneBranches>false</pruneBranches>
|
28
|
+
<remotePoll>false</remotePoll>
|
29
|
+
<ignoreNotifyCommit>false</ignoreNotifyCommit>
|
30
|
+
<useShallowClone>false</useShallowClone>
|
31
|
+
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
|
32
|
+
<gitTool>Default</gitTool>
|
33
|
+
<submoduleCfg class="list"/>
|
34
|
+
<relativeTargetDir></relativeTargetDir>
|
35
|
+
<reference></reference>
|
36
|
+
<excludedRegions></excludedRegions>
|
37
|
+
<excludedUsers></excludedUsers>
|
38
|
+
<gitConfigName></gitConfigName>
|
39
|
+
<gitConfigEmail></gitConfigEmail>
|
40
|
+
<skipTag>false</skipTag>
|
41
|
+
<includedRegions></includedRegions>
|
42
|
+
<scmName></scmName>
|
43
|
+
</scm>
|
44
|
+
<canRoam>true</canRoam>
|
45
|
+
<disabled>false</disabled>
|
46
|
+
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
47
|
+
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
48
|
+
<triggers>
|
49
|
+
<com.cloudbees.jenkins.GitHubPushTrigger plugin="github@1.8">
|
50
|
+
<spec></spec>
|
51
|
+
</com.cloudbees.jenkins.GitHubPushTrigger>
|
52
|
+
</triggers>
|
53
|
+
<concurrentBuild>false</concurrentBuild>
|
54
|
+
<builders>
|
55
|
+
<hudson.tasks.Shell>
|
56
|
+
<command>bundle install
|
57
|
+
bundle exec rake db:migrate
|
58
|
+
<%= build_command %></command>
|
59
|
+
</hudson.tasks.Shell>
|
60
|
+
</builders>
|
61
|
+
<publishers/>
|
62
|
+
<buildWrappers>
|
63
|
+
<ruby-proxy-object>
|
64
|
+
<ruby-object ruby-class="Jenkins::Tasks::BuildWrapperProxy" pluginid="rbenv">
|
65
|
+
<object ruby-class="RbenvWrapper" pluginid="rbenv">
|
66
|
+
<ruby__build__repository pluginid="rbenv" ruby-class="String">https://github.com/sstephenson/ruby-build.git</ruby__build__repository>
|
67
|
+
<rbenv__root pluginid="rbenv" ruby-class="String">$HOME/.rbenv</rbenv__root>
|
68
|
+
<rbenv__revision pluginid="rbenv" ruby-class="String">master</rbenv__revision>
|
69
|
+
<rbenv__repository pluginid="rbenv" ruby-class="String">https://github.com/sstephenson/rbenv.git</rbenv__repository>
|
70
|
+
<ruby__build__revision pluginid="rbenv" ruby-class="String">master</ruby__build__revision>
|
71
|
+
<gem__list pluginid="rbenv" ruby-class="String">bundler,rake</gem__list>
|
72
|
+
<version pluginid="rbenv" ruby-class="String">2.0.0-p247</version>
|
73
|
+
<ignore__local__version ruby-class="FalseClass" pluginid="rbenv"/>
|
74
|
+
</object>
|
75
|
+
<pluginid pluginid="rbenv" ruby-class="String">rbenv</pluginid>
|
76
|
+
</ruby-object>
|
77
|
+
</ruby-proxy-object>
|
78
|
+
</buildWrappers>
|
79
|
+
</project>
|
@@ -1,2 +1,6 @@
|
|
1
|
-
created server: <%= this.name %>
|
2
|
-
|
1
|
+
created server: <%= this.server.name %>
|
2
|
+
<% if this.no_passwd_lock %>
|
3
|
+
id: <%= this.server.id %>, password: <%= this.server.password %>
|
4
|
+
<% else %>
|
5
|
+
id: <%= this.server.id %>, password locked
|
6
|
+
<% end %>
|
data/lib/rumm/version.rb
CHANGED
data/rumm.gemspec
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "using the flavors api" do
|
4
|
+
|
5
|
+
context "to show" do
|
6
|
+
include_context "rummrc"
|
7
|
+
When { VCR.use_cassette("flavors/show") {run "rumm show flavors"}}
|
8
|
+
Then {all_stdout =~ /performance1-1 1 GB Performance/}
|
9
|
+
And {last_exit_status.should eql 0}
|
10
|
+
end
|
11
|
+
|
12
|
+
context "to get help" do
|
13
|
+
Given { rumm "help show flavors" }
|
14
|
+
Then { all_stdout.match "Shows a list of all of the server flavors available on Rackspace" }
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,173 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://identity.api.rackspacecloud.com/v2.0/tokens
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"auth":{"RAX-KSKEY:apiKeyCredentials":{"username":"<rackspace-username>","apiKey":"<rackspace-api-key>"}}}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- rumm/0.0.24 fog/1.16.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- application/json
|
16
|
+
X-Auth-Token: []
|
17
|
+
response:
|
18
|
+
status:
|
19
|
+
code: 200
|
20
|
+
message:
|
21
|
+
headers:
|
22
|
+
Server:
|
23
|
+
- nginx/0.8.55
|
24
|
+
Date:
|
25
|
+
- Thu, 19 Dec 2013 18:16:06 GMT
|
26
|
+
Content-Type:
|
27
|
+
- application/json
|
28
|
+
Transfer-Encoding:
|
29
|
+
- chunked
|
30
|
+
Connection:
|
31
|
+
- keep-alive
|
32
|
+
vary:
|
33
|
+
- Accept, Accept-Encoding, X-Auth-Token
|
34
|
+
VIA:
|
35
|
+
- 1.0 Repose (Repose/2.3.5)
|
36
|
+
Front-End-Https:
|
37
|
+
- 'on'
|
38
|
+
body:
|
39
|
+
encoding: US-ASCII
|
40
|
+
string: ! '{"access":{"token":{"id":"<rackspace-api-token>","expires":"2013-12-20T15:44:37.831Z","tenant":{"id":"01234","name":"01234"},"RAX-AUTH:authenticatedBy":["APIKEY"]},"serviceCatalog":[{"name":"cloudBackup","endpoints":[{"region":"HKG","tenantId":"01234","publicURL":"https:\/\/hkg.backup.api.rackspacecloud.com\/v1.0\/01234"},{"region":"DFW","tenantId":"01234","publicURL":"https:\/\/dfw.backup.api.rackspacecloud.com\/v1.0\/01234"},{"region":"SYD","tenantId":"01234","publicURL":"https:\/\/syd.backup.api.rackspacecloud.com\/v1.0\/01234"},{"region":"ORD","tenantId":"01234","publicURL":"https:\/\/ord.backup.api.rackspacecloud.com\/v1.0\/01234"},{"region":"IAD","tenantId":"01234","publicURL":"https:\/\/iad.backup.api.rackspacecloud.com\/v1.0\/01234"}],"type":"rax:backup"},{"name":"cloudServersOpenStack","endpoints":[{"region":"IAD","tenantId":"01234","publicURL":"https:\/\/iad.servers.api.rackspacecloud.com\/v2\/01234","versionInfo":"https:\/\/iad.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/iad.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"HKG","tenantId":"01234","publicURL":"https:\/\/hkg.servers.api.rackspacecloud.com\/v2\/01234","versionInfo":"https:\/\/hkg.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/hkg.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"SYD","tenantId":"01234","publicURL":"https:\/\/syd.servers.api.rackspacecloud.com\/v2\/01234","versionInfo":"https:\/\/syd.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/syd.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"ORD","tenantId":"01234","publicURL":"https:\/\/ord.servers.api.rackspacecloud.com\/v2\/01234","versionInfo":"https:\/\/ord.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/ord.servers.api.rackspacecloud.com\/","versionId":"2"},{"region":"DFW","tenantId":"01234","publicURL":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2\/01234","versionInfo":"https:\/\/dfw.servers.api.rackspacecloud.com\/v2","versionList":"https:\/\/dfw.servers.api.rackspacecloud.com\/","versionId":"2"}],"type":"compute"},{"name":"cloudLoadBalancers","endpoints":[{"region":"HKG","tenantId":"01234","publicURL":"https:\/\/hkg.loadbalancers.api.rackspacecloud.com\/v1.0\/01234"},{"region":"IAD","tenantId":"01234","publicURL":"https:\/\/iad.loadbalancers.api.rackspacecloud.com\/v1.0\/01234"},{"region":"SYD","tenantId":"01234","publicURL":"https:\/\/syd.loadbalancers.api.rackspacecloud.com\/v1.0\/01234"},{"region":"ORD","tenantId":"01234","publicURL":"https:\/\/ord.loadbalancers.api.rackspacecloud.com\/v1.0\/01234"},{"region":"DFW","tenantId":"01234","publicURL":"https:\/\/dfw.loadbalancers.api.rackspacecloud.com\/v1.0\/01234"}],"type":"rax:load-balancer"},{"name":"cloudDatabases","endpoints":[{"region":"HKG","tenantId":"01234","publicURL":"https:\/\/hkg.databases.api.rackspacecloud.com\/v1.0\/01234"},{"region":"IAD","tenantId":"01234","publicURL":"https:\/\/iad.databases.api.rackspacecloud.com\/v1.0\/01234"},{"region":"SYD","tenantId":"01234","publicURL":"https:\/\/syd.databases.api.rackspacecloud.com\/v1.0\/01234"},{"region":"DFW","tenantId":"01234","publicURL":"https:\/\/dfw.databases.api.rackspacecloud.com\/v1.0\/01234"},{"region":"ORD","tenantId":"01234","publicURL":"https:\/\/ord.databases.api.rackspacecloud.com\/v1.0\/01234"}],"type":"rax:database"},{"name":"cloudBlockStorage","endpoints":[{"region":"HKG","tenantId":"01234","publicURL":"https:\/\/hkg.blockstorage.api.rackspacecloud.com\/v1\/01234"},{"region":"IAD","tenantId":"01234","publicURL":"https:\/\/iad.blockstorage.api.rackspacecloud.com\/v1\/01234"},{"region":"SYD","tenantId":"01234","publicURL":"https:\/\/syd.blockstorage.api.rackspacecloud.com\/v1\/01234"},{"region":"ORD","tenantId":"01234","publicURL":"https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/01234"},{"region":"DFW","tenantId":"01234","publicURL":"https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/01234"}],"type":"volume"},{"name":"cloudQueues","endpoints":[{"region":"ORD","tenantId":"01234","publicURL":"https:\/\/ord.queues.api.rackspacecloud.com\/v1\/01234","internalURL":"https:\/\/snet-ord.queues.api.rackspacecloud.com\/v1\/01234"},{"region":"SYD","tenantId":"01234","publicURL":"https:\/\/syd.queues.api.rackspacecloud.com\/v1\/01234","internalURL":"https:\/\/snet-syd.queues.api.rackspacecloud.com\/v1\/01234"},{"region":"DFW","tenantId":"01234","publicURL":"https:\/\/dfw.queues.api.rackspacecloud.com\/v1\/01234","internalURL":"https:\/\/snet-dfw.queues.api.rackspacecloud.com\/v1\/01234"},{"region":"IAD","tenantId":"01234","publicURL":"https:\/\/iad.queues.api.rackspacecloud.com\/v1\/01234","internalURL":"https:\/\/snet-iad.queues.api.rackspacecloud.com\/v1\/01234"},{"region":"HKG","tenantId":"01234","publicURL":"https:\/\/hkg.queues.api.rackspacecloud.com\/v1\/01234","internalURL":"https:\/\/snet-hkg.queues.api.rackspacecloud.com\/v1\/01234"}],"type":"rax:queues"},{"name":"autoscale","endpoints":[{"region":"IAD","tenantId":"01234","publicURL":"https:\/\/iad.autoscale.api.rackspacecloud.com\/v1.0\/01234"},{"region":"SYD","tenantId":"01234","publicURL":"https:\/\/syd.autoscale.api.rackspacecloud.com\/v1.0\/01234"},{"region":"ORD","tenantId":"01234","publicURL":"https:\/\/ord.autoscale.api.rackspacecloud.com\/v1.0\/01234"},{"region":"DFW","tenantId":"01234","publicURL":"https:\/\/dfw.autoscale.api.rackspacecloud.com\/v1.0\/01234"},{"region":"HKG","tenantId":"01234","publicURL":"https:\/\/hkg.autoscale.api.rackspacecloud.com\/v1.0\/01234"}],"type":"rax:autoscale"},{"name":"cloudMonitoring","endpoints":[{"tenantId":"01234","publicURL":"https:\/\/monitoring.api.rackspacecloud.com\/v1.0\/01234"}],"type":"rax:monitor"},{"name":"cloudDNS","endpoints":[{"tenantId":"01234","publicURL":"https:\/\/dns.api.rackspacecloud.com\/v1.0\/01234"}],"type":"rax:dns"},{"name":"cloudFiles","endpoints":[{"region":"IAD","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/storage101.iad3.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","internalURL":"https:\/\/snet-storage101.iad3.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"HKG","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/storage101.hkg1.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","internalURL":"https:\/\/snet-storage101.hkg1.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"SYD","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/storage101.syd2.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","internalURL":"https:\/\/snet-storage101.syd2.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"ORD","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/storage101.ord1.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","internalURL":"https:\/\/snet-storage101.ord1.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"DFW","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/storage101.dfw1.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","internalURL":"https:\/\/snet-storage101.dfw1.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"}],"type":"object-store"},{"name":"cloudFilesCDN","endpoints":[{"region":"IAD","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/cdn5.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"HKG","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/cdn6.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"SYD","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/cdn4.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"ORD","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/cdn2.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"},{"region":"DFW","tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","publicURL":"https:\/\/cdn1.clouddrive.com\/v1\/TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9"}],"type":"rax:object-cdn"}],"user":{"id":"d8856371def243f6a8356d94cf0bd50c","roles":[{"id":"10000258","description":"Full
|
41
|
+
Access Admin Role for Account User","name":"admin"},{"tenantId":"01234","id":"6","description":"A
|
42
|
+
Role that allows a user access to keystone Service methods","name":"compute:default"},{"tenantId":"TestCloudFS_abcdefg1-2665-4162-b8e4-7e69b8bb0dc9","id":"5","description":"A
|
43
|
+
Role that allows a user access to keystone Service methods","name":"object-store:default"},{"id":"10000150","description":"Checkmate
|
44
|
+
Access role","name":"checkmate"},{"id":"2","description":"Default Role.","name":"identity:default"}],"name":"<rackspace-username>","RAX-AUTH:defaultRegion":"IAD"}}}'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 19 Dec 2013 18:15:49 GMT
|
47
|
+
- request:
|
48
|
+
method: get
|
49
|
+
uri: https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/detail
|
50
|
+
body:
|
51
|
+
encoding: US-ASCII
|
52
|
+
string: ''
|
53
|
+
headers:
|
54
|
+
User-Agent:
|
55
|
+
- rumm/0.0.24 fog/1.16.0
|
56
|
+
Content-Type:
|
57
|
+
- application/json
|
58
|
+
Accept:
|
59
|
+
- application/json
|
60
|
+
X-Auth-Token:
|
61
|
+
- <rackspace-api-token>
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message:
|
66
|
+
headers:
|
67
|
+
Content-Type:
|
68
|
+
- application/json
|
69
|
+
Via:
|
70
|
+
- 1.1 Repose (Repose/2.12)
|
71
|
+
Content-Length:
|
72
|
+
- '8117'
|
73
|
+
Date:
|
74
|
+
- Thu, 19 Dec 2013 18:16:08 GMT
|
75
|
+
x-compute-request-id:
|
76
|
+
- req-bfe73f85-dc48-4fbd-82ce-0fc65775c6c3
|
77
|
+
Server:
|
78
|
+
- Jetty(8.0.y.z-SNAPSHOT)
|
79
|
+
body:
|
80
|
+
encoding: US-ASCII
|
81
|
+
string: ! '{"flavors": [{"OS-FLV-WITH-EXT-SPECS:extra_specs": {"class": "standard1",
|
82
|
+
"disk_io_index": "2", "number_of_data_disks": "0"}, "name": "512MB Standard
|
83
|
+
Instance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/2",
|
84
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/2",
|
85
|
+
"rel": "bookmark"}], "ram": 512, "vcpus": 1, "swap": 512, "rxtx_factor": 80.0,
|
86
|
+
"OS-FLV-EXT-DATA:ephemeral": 0, "disk": 20, "id": "2"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
87
|
+
{"class": "standard1", "disk_io_index": "2", "number_of_data_disks": "0"},
|
88
|
+
"name": "1GB Standard Instance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/3",
|
89
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/3",
|
90
|
+
"rel": "bookmark"}], "ram": 1024, "vcpus": 1, "swap": 1024, "rxtx_factor":
|
91
|
+
120.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 40, "id": "3"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
92
|
+
{"class": "standard1", "disk_io_index": "2", "number_of_data_disks": "0"},
|
93
|
+
"name": "2GB Standard Instance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/4",
|
94
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/4",
|
95
|
+
"rel": "bookmark"}], "ram": 2048, "vcpus": 2, "swap": 2048, "rxtx_factor":
|
96
|
+
240.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 80, "id": "4"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
97
|
+
{"class": "standard1", "disk_io_index": "2", "number_of_data_disks": "0"},
|
98
|
+
"name": "4GB Standard Instance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/5",
|
99
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/5",
|
100
|
+
"rel": "bookmark"}], "ram": 4096, "vcpus": 2, "swap": 2048, "rxtx_factor":
|
101
|
+
400.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 160, "id": "5"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
102
|
+
{"class": "standard1", "disk_io_index": "2", "number_of_data_disks": "0"},
|
103
|
+
"name": "8GB Standard Instance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/6",
|
104
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/6",
|
105
|
+
"rel": "bookmark"}], "ram": 8192, "vcpus": 4, "swap": 2048, "rxtx_factor":
|
106
|
+
600.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 320, "id": "6"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
107
|
+
{"class": "standard1", "disk_io_index": "2", "number_of_data_disks": "0"},
|
108
|
+
"name": "15GB Standard Instance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/7",
|
109
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/7",
|
110
|
+
"rel": "bookmark"}], "ram": 15360, "vcpus": 6, "swap": 2048, "rxtx_factor":
|
111
|
+
800.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 620, "id": "7"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
112
|
+
{"class": "standard1", "disk_io_index": "2", "number_of_data_disks": "0"},
|
113
|
+
"name": "30GB Standard Instance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/8",
|
114
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/8",
|
115
|
+
"rel": "bookmark"}], "ram": 30720, "vcpus": 8, "swap": 2048, "rxtx_factor":
|
116
|
+
1200.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 1200, "id": "8"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
117
|
+
{"resize_policy_class": "performance_flavor", "class": "performance1", "disk_io_index":
|
118
|
+
"40", "number_of_data_disks": "0"}, "name": "1 GB Performance", "links": [{"href":
|
119
|
+
"https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance1-1",
|
120
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance1-1",
|
121
|
+
"rel": "bookmark"}], "ram": 1024, "vcpus": 1, "swap": "", "rxtx_factor": 200.0,
|
122
|
+
"OS-FLV-EXT-DATA:ephemeral": 0, "disk": 20, "id": "performance1-1"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
123
|
+
{"resize_policy_class": "performance_flavor", "class": "performance1", "disk_io_index":
|
124
|
+
"40", "number_of_data_disks": "1"}, "name": "2 GB Performance", "links": [{"href":
|
125
|
+
"https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance1-2",
|
126
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance1-2",
|
127
|
+
"rel": "bookmark"}], "ram": 2048, "vcpus": 2, "swap": "", "rxtx_factor": 400.0,
|
128
|
+
"OS-FLV-EXT-DATA:ephemeral": 20, "disk": 40, "id": "performance1-2"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
129
|
+
{"resize_policy_class": "performance_flavor", "class": "performance1", "disk_io_index":
|
130
|
+
"40", "number_of_data_disks": "1"}, "name": "4 GB Performance", "links": [{"href":
|
131
|
+
"https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance1-4",
|
132
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance1-4",
|
133
|
+
"rel": "bookmark"}], "ram": 4096, "vcpus": 4, "swap": "", "rxtx_factor": 800.0,
|
134
|
+
"OS-FLV-EXT-DATA:ephemeral": 40, "disk": 40, "id": "performance1-4"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
135
|
+
{"resize_policy_class": "performance_flavor", "class": "performance1", "disk_io_index":
|
136
|
+
"40", "number_of_data_disks": "1"}, "name": "8 GB Performance", "links": [{"href":
|
137
|
+
"https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance1-8",
|
138
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance1-8",
|
139
|
+
"rel": "bookmark"}], "ram": 8192, "vcpus": 8, "swap": "", "rxtx_factor": 1600.0,
|
140
|
+
"OS-FLV-EXT-DATA:ephemeral": 80, "disk": 40, "id": "performance1-8"}, {"OS-FLV-WITH-EXT-SPECS:extra_specs":
|
141
|
+
{"resize_policy_class": "performance_flavor", "class": "performance2", "disk_io_index":
|
142
|
+
"80", "number_of_data_disks": "4"}, "name": "120 GB Performance", "links":
|
143
|
+
[{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance2-120",
|
144
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance2-120",
|
145
|
+
"rel": "bookmark"}], "ram": 122880, "vcpus": 32, "swap": "", "rxtx_factor":
|
146
|
+
10000.0, "OS-FLV-EXT-DATA:ephemeral": 1200, "disk": 40, "id": "performance2-120"},
|
147
|
+
{"OS-FLV-WITH-EXT-SPECS:extra_specs": {"resize_policy_class": "performance_flavor",
|
148
|
+
"class": "performance2", "disk_io_index": "40", "number_of_data_disks": "1"},
|
149
|
+
"name": "15 GB Performance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance2-15",
|
150
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance2-15",
|
151
|
+
"rel": "bookmark"}], "ram": 15360, "vcpus": 4, "swap": "", "rxtx_factor":
|
152
|
+
1250.0, "OS-FLV-EXT-DATA:ephemeral": 150, "disk": 40, "id": "performance2-15"},
|
153
|
+
{"OS-FLV-WITH-EXT-SPECS:extra_specs": {"resize_policy_class": "performance_flavor",
|
154
|
+
"class": "performance2", "disk_io_index": "40", "number_of_data_disks": "1"},
|
155
|
+
"name": "30 GB Performance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance2-30",
|
156
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance2-30",
|
157
|
+
"rel": "bookmark"}], "ram": 30720, "vcpus": 8, "swap": "", "rxtx_factor":
|
158
|
+
2500.0, "OS-FLV-EXT-DATA:ephemeral": 300, "disk": 40, "id": "performance2-30"},
|
159
|
+
{"OS-FLV-WITH-EXT-SPECS:extra_specs": {"resize_policy_class": "performance_flavor",
|
160
|
+
"class": "performance2", "disk_io_index": "60", "number_of_data_disks": "2"},
|
161
|
+
"name": "60 GB Performance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance2-60",
|
162
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance2-60",
|
163
|
+
"rel": "bookmark"}], "ram": 61440, "vcpus": 16, "swap": "", "rxtx_factor":
|
164
|
+
5000.0, "OS-FLV-EXT-DATA:ephemeral": 600, "disk": 40, "id": "performance2-60"},
|
165
|
+
{"OS-FLV-WITH-EXT-SPECS:extra_specs": {"resize_policy_class": "performance_flavor",
|
166
|
+
"class": "performance2", "disk_io_index": "70", "number_of_data_disks": "3"},
|
167
|
+
"name": "90 GB Performance", "links": [{"href": "https://ord.servers.api.rackspacecloud.com/v2/01234/flavors/performance2-90",
|
168
|
+
"rel": "self"}, {"href": "https://ord.servers.api.rackspacecloud.com/01234/flavors/performance2-90",
|
169
|
+
"rel": "bookmark"}], "ram": 92160, "vcpus": 24, "swap": "", "rxtx_factor":
|
170
|
+
7500.0, "OS-FLV-EXT-DATA:ephemeral": 900, "disk": 40, "id": "performance2-90"}]}'
|
171
|
+
http_version:
|
172
|
+
recorded_at: Thu, 19 Dec 2013 18:15:51 GMT
|
173
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "job_provider"
|
3
|
+
|
4
|
+
describe "getting a jenkins job config xml" do
|
5
|
+
use_natural_assertions
|
6
|
+
Given(:job) { JobProvider.new.job_template *arguments }
|
7
|
+
|
8
|
+
context "with default arguments" do
|
9
|
+
Given(:arguments) { ["https://github.com/hayesmp/railsgirls-app.git", "bundle exec rake"] }
|
10
|
+
Then { not job.nil? }
|
11
|
+
Then { job.class == String }
|
12
|
+
end
|
13
|
+
|
14
|
+
context "with custom arguments" do
|
15
|
+
Given(:arguments) { ["https://github.com/hayesmp/rumm.git", "custom command"] }
|
16
|
+
Then { job.include?("https://github.com/hayesmp/rumm.git")==true }
|
17
|
+
Then { job.include?("custom command")==true }
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rumm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Lowell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mvcli
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.16
|
33
|
+
version: '1.16'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.16
|
40
|
+
version: '1.16'
|
41
41
|
description: Lift heavy things inside your Rackspace
|
42
42
|
email:
|
43
43
|
- cowboyd@thefrontside.net
|
@@ -58,9 +58,12 @@ files:
|
|
58
58
|
- app/controllers/containers_controller.rb
|
59
59
|
- app/controllers/databases_controller.rb
|
60
60
|
- app/controllers/files_controller.rb
|
61
|
+
- app/controllers/flavors_controller.rb
|
61
62
|
- app/controllers/help_controller.rb
|
62
63
|
- app/controllers/images_controller.rb
|
63
64
|
- app/controllers/instances_controller.rb
|
65
|
+
- app/controllers/jenkins_controller.rb
|
66
|
+
- app/controllers/jobs_controller.rb
|
64
67
|
- app/controllers/loadbalancers_controller.rb
|
65
68
|
- app/controllers/nodes_controller.rb
|
66
69
|
- app/controllers/railsifications_controller.rb
|
@@ -73,6 +76,8 @@ files:
|
|
73
76
|
- app/forms/files/create_form.rb
|
74
77
|
- app/forms/files/download_form.rb
|
75
78
|
- app/forms/instances/create_form.rb
|
79
|
+
- app/forms/jenkins/create_form.rb
|
80
|
+
- app/forms/jobs/create_form.rb
|
76
81
|
- app/forms/loadbalancers/create_form.rb
|
77
82
|
- app/forms/nodes/create_form.rb
|
78
83
|
- app/forms/servers/create_form.rb
|
@@ -85,6 +90,7 @@ files:
|
|
85
90
|
- app/help/create_database_on_dbinstance.txt
|
86
91
|
- app/help/create_dbinstance.txt
|
87
92
|
- app/help/create_file_in_container.txt
|
93
|
+
- app/help/create_job_on_jenkins_server.txt
|
88
94
|
- app/help/create_loadbalancer.txt
|
89
95
|
- app/help/create_node_on_loadbalancer.txt
|
90
96
|
- app/help/create_server.txt
|
@@ -101,6 +107,7 @@ files:
|
|
101
107
|
- app/help/destroy_user_on_dbinstance.txt
|
102
108
|
- app/help/destroy_volume.txt
|
103
109
|
- app/help/download_file_in_container.txt
|
110
|
+
- app/help/install_jenkins_on_server.txt
|
104
111
|
- app/help/login.txt
|
105
112
|
- app/help/logout.txt
|
106
113
|
- app/help/railsify_server.txt
|
@@ -115,6 +122,7 @@ files:
|
|
115
122
|
- app/help/show_dbinstances.txt
|
116
123
|
- app/help/show_file_in_container.txt
|
117
124
|
- app/help/show_files_in_container.txt
|
125
|
+
- app/help/show_flavors.txt
|
118
126
|
- app/help/show_images.txt
|
119
127
|
- app/help/show_loadbalancer.txt
|
120
128
|
- app/help/show_loadbalancers.txt
|
@@ -137,8 +145,10 @@ files:
|
|
137
145
|
- app/providers/containers_provider.rb
|
138
146
|
- app/providers/credentials_provider.rb
|
139
147
|
- app/providers/databases_provider.rb
|
148
|
+
- app/providers/flavors_provider.rb
|
140
149
|
- app/providers/instance_provider.rb
|
141
150
|
- app/providers/instances_provider.rb
|
151
|
+
- app/providers/job_provider.rb
|
142
152
|
- app/providers/loadbalancers_provider.rb
|
143
153
|
- app/providers/login_information_provider.rb
|
144
154
|
- app/providers/naming/adj.txt
|
@@ -168,12 +178,16 @@ files:
|
|
168
178
|
- app/views/files/download.txt.erb
|
169
179
|
- app/views/files/index.txt.erb
|
170
180
|
- app/views/files/show.txt.erb
|
181
|
+
- app/views/flavors/index.txt.erb
|
171
182
|
- app/views/help/show.txt.erb
|
172
183
|
- app/views/images/index.txt.erb
|
173
184
|
- app/views/instances/create.txt.erb
|
174
185
|
- app/views/instances/destroy.txt.erb
|
175
186
|
- app/views/instances/index.txt.erb
|
176
187
|
- app/views/instances/show.txt.erb
|
188
|
+
- app/views/jenkins/create.txt.erb
|
189
|
+
- app/views/jobs/create.txt.erb
|
190
|
+
- app/views/jobs/job_template.xml.erb
|
177
191
|
- app/views/loadbalancers/create.txt.erb
|
178
192
|
- app/views/loadbalancers/destroy.txt.erb
|
179
193
|
- app/views/loadbalancers/index.txt.erb
|
@@ -207,6 +221,7 @@ files:
|
|
207
221
|
- spec/features/databases_spec.rb
|
208
222
|
- spec/features/dbinstances_spec.rb
|
209
223
|
- spec/features/files_spec.rb
|
224
|
+
- spec/features/flavors_spec.rb
|
210
225
|
- spec/features/help_spec.rb
|
211
226
|
- spec/features/loadbalancers_spec.rb
|
212
227
|
- spec/features/login_spec.rb
|
@@ -233,6 +248,7 @@ files:
|
|
233
248
|
- spec/fixtures/cassettes/files/download.yml
|
234
249
|
- spec/fixtures/cassettes/files/show-all.yml
|
235
250
|
- spec/fixtures/cassettes/files/show.yml
|
251
|
+
- spec/fixtures/cassettes/flavors/show.yml
|
236
252
|
- spec/fixtures/cassettes/instances/create.yml
|
237
253
|
- spec/fixtures/cassettes/instances/destroy.yml
|
238
254
|
- spec/fixtures/cassettes/instances/show-all.yml
|
@@ -257,6 +273,7 @@ files:
|
|
257
273
|
- spec/fixtures/cassettes/volumes/destroy.yml
|
258
274
|
- spec/fixtures/cassettes/volumes/show-all.yml
|
259
275
|
- spec/fixtures/cassettes/volumes/show.yml
|
276
|
+
- spec/providers/job_provider_spec.rb
|
260
277
|
- spec/providers/naming_provider_spec.rb
|
261
278
|
- spec/spec_helper.rb
|
262
279
|
- tmp/aruba/.gitkeep
|
@@ -270,12 +287,12 @@ require_paths:
|
|
270
287
|
- lib
|
271
288
|
required_ruby_version: !ruby/object:Gem::Requirement
|
272
289
|
requirements:
|
273
|
-
- -
|
290
|
+
- - '>='
|
274
291
|
- !ruby/object:Gem::Version
|
275
292
|
version: 1.9.3
|
276
293
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
277
294
|
requirements:
|
278
|
-
- -
|
295
|
+
- - '>='
|
279
296
|
- !ruby/object:Gem::Version
|
280
297
|
version: '0'
|
281
298
|
requirements: []
|
@@ -291,6 +308,7 @@ test_files:
|
|
291
308
|
- spec/features/databases_spec.rb
|
292
309
|
- spec/features/dbinstances_spec.rb
|
293
310
|
- spec/features/files_spec.rb
|
311
|
+
- spec/features/flavors_spec.rb
|
294
312
|
- spec/features/help_spec.rb
|
295
313
|
- spec/features/loadbalancers_spec.rb
|
296
314
|
- spec/features/login_spec.rb
|
@@ -317,6 +335,7 @@ test_files:
|
|
317
335
|
- spec/fixtures/cassettes/files/download.yml
|
318
336
|
- spec/fixtures/cassettes/files/show-all.yml
|
319
337
|
- spec/fixtures/cassettes/files/show.yml
|
338
|
+
- spec/fixtures/cassettes/flavors/show.yml
|
320
339
|
- spec/fixtures/cassettes/instances/create.yml
|
321
340
|
- spec/fixtures/cassettes/instances/destroy.yml
|
322
341
|
- spec/fixtures/cassettes/instances/show-all.yml
|
@@ -341,5 +360,7 @@ test_files:
|
|
341
360
|
- spec/fixtures/cassettes/volumes/destroy.yml
|
342
361
|
- spec/fixtures/cassettes/volumes/show-all.yml
|
343
362
|
- spec/fixtures/cassettes/volumes/show.yml
|
363
|
+
- spec/providers/job_provider_spec.rb
|
344
364
|
- spec/providers/naming_provider_spec.rb
|
345
365
|
- spec/spec_helper.rb
|
366
|
+
has_rdoc:
|