blimpy 0.4.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/blimpy/cli.rb CHANGED
@@ -124,13 +124,27 @@ end
124
124
  end
125
125
 
126
126
  desc 'ssh BLIMP_NAME', 'Log into a running blimp'
127
- def ssh(name, *args)
127
+ def ssh(name=nil, *args)
128
128
  ensure_blimpfile
129
- box = box_by_name(name)
130
- if box.nil?
131
- puts "Could not find a blimp named \"#{name}\""
132
- exit 1
129
+ unless name.nil?
130
+ box = box_by_name(name)
131
+ if box.nil?
132
+ puts "Could not find a blimp named \"#{name}\""
133
+ exit 1
134
+ end
135
+ else
136
+ blimps = current_blimps
137
+ unless blimps
138
+ puts "No Blimps running!"
139
+ exit 1
140
+ end
141
+
142
+ blimps.each do |blimp, data|
143
+ next unless data[:name]
144
+ box = box_by_name(data[:name])
145
+ end
133
146
  end
147
+
134
148
  box.wait_for_sshd
135
149
  box.ssh_into
136
150
  end
@@ -1,3 +1,3 @@
1
1
  module Blimpy
2
- VERSION = "0.4.4"
2
+ VERSION = "0.5.0"
3
3
  end
data/scripts/puppet.sh ADDED
@@ -0,0 +1,44 @@
1
+ #!/bin/sh -x
2
+
3
+ OSNAME=`uname`
4
+
5
+ if [ "${OSNAME}" = "FreeBSD" ]; then
6
+
7
+ which pkg > /dev/null
8
+
9
+ if [ $? -ne 0 ]; then
10
+ echo "pkgng is not installed!"
11
+ ftp -V ftp://anonymous:ec2@ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/pkg.tbz
12
+ pkg_add ./pkg.tbz
13
+
14
+ echo "PACKAGESITE : http://pkgbeta.freebsd.org/freebsd-9-amd64/latest/" > /usr/local/etc/pkg.conf
15
+
16
+ pkg update -q
17
+ # Update pkgng itself
18
+ pkg install -y pkg
19
+ # Install rsync(1) so we don't have to fall back to tar(1)+scp(1) ever again
20
+ pkg install -y rsync
21
+ # Install puppet so we can get that up and running
22
+ pkg install -y puppet
23
+ fi;
24
+
25
+ else
26
+
27
+ export PATH=/var/lib/gems/1.8/bin:$PATH
28
+
29
+ which puppet
30
+
31
+ if [ $? -ne 0 ]; then
32
+ apt-get update
33
+
34
+ apt-get install -y ruby1.8 \
35
+ ruby1.8-dev \
36
+ libopenssl-ruby1.8 \
37
+ rubygems
38
+
39
+ gem install puppet --no-ri --no-rdoc
40
+ fi
41
+
42
+ fi
43
+
44
+ puppet apply --modulepath=./modules --verbose manifests/site.pp
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blimpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-10 00:00:00.000000000Z
12
+ date: 2012-08-11 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
16
- requirement: &20821560 !ruby/object:Gem::Requirement
16
+ requirement: &19966060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *20821560
24
+ version_requirements: *19966060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &20821040 !ruby/object:Gem::Requirement
27
+ requirement: &19965580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *20821040
35
+ version_requirements: *19965580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: minitar
38
- requirement: &20820460 !ruby/object:Gem::Requirement
38
+ requirement: &19965040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *20820460
46
+ version_requirements: *19965040
47
47
  description: Blimpy is a tool for managing a fleet of machines in the CLOUD!
48
48
  email:
49
49
  - tyler@monkeypox.org
@@ -83,8 +83,7 @@ files:
83
83
  - lib/blimpy/livery.rb
84
84
  - lib/blimpy/securitygroups.rb
85
85
  - lib/blimpy/version.rb
86
- - scripts/freebsd_puppet.sh
87
- - scripts/linux_puppet.sh
86
+ - scripts/puppet.sh
88
87
  - spec/blimpy/box_spec.rb
89
88
  - spec/blimpy/boxes/aws_spec.rb
90
89
  - spec/blimpy/boxes/openstack_spec.rb
@@ -108,18 +107,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
107
  - - ! '>='
109
108
  - !ruby/object:Gem::Version
110
109
  version: '0'
111
- segments:
112
- - 0
113
- hash: -980627700140636570
114
110
  required_rubygems_version: !ruby/object:Gem::Requirement
115
111
  none: false
116
112
  requirements:
117
113
  - - ! '>='
118
114
  - !ruby/object:Gem::Version
119
115
  version: '0'
120
- segments:
121
- - 0
122
- hash: -980627700140636570
123
116
  requirements: []
124
117
  rubyforge_project:
125
118
  rubygems_version: 1.8.10
@@ -1,21 +0,0 @@
1
- #!/bin/sh -x
2
-
3
- which pkg > /dev/null
4
-
5
- if [ $? -ne 0 ]; then
6
- echo "pkgng is not installed!"
7
- ftp -V ftp://anonymous:ec2@ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/pkg.tbz
8
- pkg_add ./pkg.tbz
9
-
10
- echo "PACKAGESITE : http://pkgbeta.freebsd.org/freebsd-9-amd64/latest/" > /usr/local/etc/pkg.conf
11
-
12
- pkg update -q
13
- # Update pkgng itself
14
- pkg install -y pkg
15
- # Install rsync(1) so we don't have to fall back to tar(1)+scp(1) ever again
16
- pkg install -y rsync
17
- # Install puppet so we can get that up and running
18
- pkg install -y puppet
19
- fi
20
-
21
- puppet apply --modulepath=./modules --verbose manifests/site.pp
@@ -1,19 +0,0 @@
1
- #!/bin/sh -x
2
-
3
- export PATH=/var/lib/gems/1.8/bin:$PATH
4
-
5
- which puppet
6
-
7
- if [ $? -ne 0 ]; then
8
- apt-get update
9
-
10
- apt-get install -y ruby1.8 \
11
- ruby1.8-dev \
12
- libopenssl-ruby1.8 \
13
- rubygems
14
-
15
- gem install puppet --no-ri --no-rdoc
16
- fi
17
-
18
-
19
- puppet apply --verbose --modulepath=./modules manifests/site.pp