teleport 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/teleport/run.sh +6 -12
- data/lib/teleport/version.rb +1 -1
- data/spec/support/ec2.rb +9 -8
- metadata +4 -4
data/lib/teleport/run.sh
CHANGED
@@ -35,7 +35,7 @@ function install_ruby() {
|
|
35
35
|
else
|
36
36
|
readline=libreadline-gplv2-dev
|
37
37
|
fi
|
38
|
-
apt-get
|
38
|
+
apt-get -y install wget $readline
|
39
39
|
|
40
40
|
banner "installing Ruby $CONFIG_RUBY..."
|
41
41
|
case $CONFIG_RUBY in
|
@@ -65,13 +65,7 @@ function install_rubygems() {
|
|
65
65
|
#
|
66
66
|
|
67
67
|
function install_ruby_19_requirements() {
|
68
|
-
|
69
|
-
if [ "${DISTRIB_RELEASE//[.]/}" -lt "1110" ] ; then
|
70
|
-
ffi=libffi5
|
71
|
-
else
|
72
|
-
ffi=libffi6
|
73
|
-
fi
|
74
|
-
apt-get install -y bison build-essential checkinstall $ffi libssl-dev libyaml-dev zlib1g-dev
|
68
|
+
apt-get -y install bison build-essential checkinstall libffi-dev libssl-dev libyaml-dev zlib1g-dev
|
75
69
|
}
|
76
70
|
|
77
71
|
function install_ruby_192() {
|
@@ -105,7 +99,7 @@ function install_ruby_192() {
|
|
105
99
|
}
|
106
100
|
|
107
101
|
function install_ruby_193() {
|
108
|
-
local patch=
|
102
|
+
local patch=p286
|
109
103
|
|
110
104
|
install_ruby_19_requirements
|
111
105
|
|
@@ -138,7 +132,7 @@ function install_ruby_ree() {
|
|
138
132
|
|
139
133
|
# this is necessary on 12.04 (thanks noeticpenguin)
|
140
134
|
apt-get -y install libssl0.9.8
|
141
|
-
|
135
|
+
|
142
136
|
wget http://rubyenterpriseedition.googlecode.com/files/$ree
|
143
137
|
dpkg -i $ree
|
144
138
|
|
@@ -183,8 +177,8 @@ fi
|
|
183
177
|
# do we need to get rid of the apt rubygems package?
|
184
178
|
if dpkg-query -f='${Status}' -W rubygems1.8 2>&1 | grep 'install ok installed' ; then
|
185
179
|
banner "Installing rubygems from source..."
|
186
|
-
apt-get
|
187
|
-
apt-get
|
180
|
+
apt-get -y install wget
|
181
|
+
apt-get -y remove rubygems1.8
|
188
182
|
install_rubygems
|
189
183
|
fi
|
190
184
|
|
data/lib/teleport/version.rb
CHANGED
data/spec/support/ec2.rb
CHANGED
@@ -4,14 +4,15 @@ require "AWS"
|
|
4
4
|
module Support
|
5
5
|
module Ec2
|
6
6
|
# these are all us-east-1 64-bit instance
|
7
|
-
AMI_10_04 = "
|
8
|
-
AMI_10_10 = "
|
9
|
-
AMI_11_04 = "
|
10
|
-
AMI_11_10 = "
|
7
|
+
AMI_10_04 = "8fac75e6" # lucid
|
8
|
+
AMI_10_10 = "098f5760" # maverick
|
9
|
+
AMI_11_04 = "35c31a5c" # natty
|
10
|
+
AMI_11_10 = "8baa73e2" # oneiric
|
11
|
+
AMI_12_04 = "3c994355" # precise
|
11
12
|
KEYPAIR = "teleport"
|
12
13
|
GROUP = "teleport"
|
13
14
|
|
14
|
-
AMI = "ami-#{
|
15
|
+
AMI = "ami-#{AMI_12_04}"
|
15
16
|
|
16
17
|
def self.configured?
|
17
18
|
ENV["TELEPORT_ACCESS_KEY_ID"] && ENV["TELEPORT_SECRET_ACCESS_KEY"] && ENV["TELEPORT_SSH_KEY"]
|
@@ -53,14 +54,14 @@ EOF
|
|
53
54
|
|
54
55
|
#
|
55
56
|
# this controller class does all the work
|
56
|
-
#
|
57
|
+
#
|
57
58
|
|
58
59
|
class Controller
|
59
60
|
def initialize
|
60
61
|
raise "not configured" if !Support::Ec2::configured?
|
61
62
|
@ec2 = AWS::EC2::Base.new(:access_key_id => ENV["TELEPORT_ACCESS_KEY_ID"], :secret_access_key => ENV["TELEPORT_SECRET_ACCESS_KEY"])
|
62
63
|
end
|
63
|
-
|
64
|
+
|
64
65
|
def start
|
65
66
|
puts "Running new ec2 instance..."
|
66
67
|
# setup security group and allow ssh
|
@@ -69,7 +70,7 @@ EOF
|
|
69
70
|
rescue AWS::InvalidGroupDuplicate
|
70
71
|
# ignore
|
71
72
|
end
|
72
|
-
@ec2.authorize_security_group_ingress(:group_name => GROUP, :ip_protocol => "tcp", :from_port => 22, :to_port => 22)
|
73
|
+
@ec2.authorize_security_group_ingress(:group_name => GROUP, :ip_protocol => "tcp", :from_port => 22, :to_port => 22)
|
73
74
|
|
74
75
|
# create the instance
|
75
76
|
@ec2.run_instances(:image_id => AMI, :instance_type => "m1.large", :key_name => KEYPAIR, :security_group => GROUP)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teleport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: amazon-ec2
|
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash: -
|
139
|
+
hash: -4476656226626324211
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
segments:
|
147
147
|
- 0
|
148
|
-
hash: -
|
148
|
+
hash: -4476656226626324211
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project: teleport
|
151
151
|
rubygems_version: 1.8.21
|