engineyard 1.3.12 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/engineyard/model/deployment.rb +1 -1
- data/lib/engineyard/version.rb +1 -1
- metadata +14 -15
- data/lib/engineyard/connection/system.rb +0 -96
data/lib/engineyard/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 13
|
10
|
+
version: 1.3.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|
@@ -30,9 +30,9 @@ dependencies:
|
|
30
30
|
- 14
|
31
31
|
- 6
|
32
32
|
version: 0.14.6
|
33
|
+
requirement: *id001
|
33
34
|
name: thor
|
34
35
|
prerelease: false
|
35
|
-
requirement: *id001
|
36
36
|
type: :runtime
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
@@ -40,15 +40,15 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
43
|
+
hash: 15
|
44
44
|
segments:
|
45
45
|
- 1
|
46
|
-
-
|
47
|
-
-
|
48
|
-
version: 1.
|
46
|
+
- 6
|
47
|
+
- 0
|
48
|
+
version: 1.6.0
|
49
|
+
requirement: *id002
|
49
50
|
name: rest-client
|
50
51
|
prerelease: false
|
51
|
-
requirement: *id002
|
52
52
|
type: :runtime
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
@@ -62,9 +62,9 @@ dependencies:
|
|
62
62
|
- 6
|
63
63
|
- 1
|
64
64
|
version: 1.6.1
|
65
|
+
requirement: *id003
|
65
66
|
name: highline
|
66
67
|
prerelease: false
|
67
|
-
requirement: *id003
|
68
68
|
type: :runtime
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
@@ -76,9 +76,9 @@ dependencies:
|
|
76
76
|
segments:
|
77
77
|
- 0
|
78
78
|
version: "0"
|
79
|
+
requirement: *id004
|
79
80
|
name: json_pure
|
80
81
|
prerelease: false
|
81
|
-
requirement: *id004
|
82
82
|
type: :runtime
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
@@ -92,9 +92,9 @@ dependencies:
|
|
92
92
|
- 0
|
93
93
|
- 4
|
94
94
|
version: 0.0.4
|
95
|
+
requirement: *id005
|
95
96
|
name: escape
|
96
97
|
prerelease: false
|
97
|
-
requirement: *id005
|
98
98
|
type: :runtime
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
@@ -108,9 +108,9 @@ dependencies:
|
|
108
108
|
- 4
|
109
109
|
- 0
|
110
110
|
version: 1.4.0
|
111
|
+
requirement: *id006
|
111
112
|
name: engineyard-serverside-adapter
|
112
113
|
prerelease: false
|
113
|
-
requirement: *id006
|
114
114
|
type: :runtime
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
@@ -124,9 +124,9 @@ dependencies:
|
|
124
124
|
- 0
|
125
125
|
- 1
|
126
126
|
version: 1.0.1
|
127
|
+
requirement: *id007
|
127
128
|
name: open4
|
128
129
|
prerelease: false
|
129
|
-
requirement: *id007
|
130
130
|
type: :runtime
|
131
131
|
description: This gem allows you to deploy your rails application to the Engine Yard cloud directly from the command line.
|
132
132
|
email: cloud@engineyard.com
|
@@ -149,7 +149,6 @@ files:
|
|
149
149
|
- lib/engineyard/collection/environments.rb
|
150
150
|
- lib/engineyard/collection.rb
|
151
151
|
- lib/engineyard/config.rb
|
152
|
-
- lib/engineyard/connection/system.rb
|
153
152
|
- lib/engineyard/error.rb
|
154
153
|
- lib/engineyard/model/account.rb
|
155
154
|
- lib/engineyard/model/api_struct.rb
|
@@ -1,96 +0,0 @@
|
|
1
|
-
require 'escape'
|
2
|
-
|
3
|
-
module EY
|
4
|
-
module Connection
|
5
|
-
class System
|
6
|
-
def adapter(app, instances, verbose)
|
7
|
-
require 'engineyard-serverside-adapter'
|
8
|
-
EY::Serverside::Adapter.new("/usr/local/ey_resin/ruby/bin") do |args|
|
9
|
-
args.app = app.name
|
10
|
-
args.repo = app.repository_uri
|
11
|
-
args.instances = instances
|
12
|
-
args.verbose = verbose || ENV['DEBUG']
|
13
|
-
end
|
14
|
-
end
|
15
|
-
private :adapter
|
16
|
-
|
17
|
-
def deploy(app, ref, instances, stack_name, framework_env, migration_command=nil, extra_configuration=nil, verbose=false)
|
18
|
-
deploy_command = adapter(app, instances, verbose).deploy do |args|
|
19
|
-
args.ref = ref
|
20
|
-
args.stack = stack_name
|
21
|
-
args.framework_env = framework_env
|
22
|
-
args.migrate = migration_command if migration_command
|
23
|
-
args.config = extra_configuration if extra_configuration
|
24
|
-
end
|
25
|
-
|
26
|
-
invoke deploy_command
|
27
|
-
end
|
28
|
-
|
29
|
-
def rollback(app, instances, stack_name, framework_env, extra_configuration=nil, verbose=false)
|
30
|
-
rollback = adapter(app, instances, verbose).rollback do |args|
|
31
|
-
args.stack = stack_name
|
32
|
-
args.framework_env = framework_env
|
33
|
-
args.config = extra_configuration if extra_configuration
|
34
|
-
end
|
35
|
-
invoke rollback
|
36
|
-
end
|
37
|
-
|
38
|
-
|
39
|
-
def put_up_maintenance_page(app, instances, verbose=false)
|
40
|
-
invoke adapter(app, instances, verbose).enable_maintenance_page
|
41
|
-
end
|
42
|
-
|
43
|
-
def take_down_maintenance_page(app, instances, verbose=false)
|
44
|
-
invoke adapter(app, instances, verbose).disable_maintenance_page
|
45
|
-
end
|
46
|
-
|
47
|
-
protected
|
48
|
-
|
49
|
-
def engineyard_serverside_hostname
|
50
|
-
# If we tell engineyard-serverside to use 'localhost', it'll run
|
51
|
-
# commands on the instance directly (#system). If we give it the
|
52
|
-
# instance's actual hostname, it'll SSH to itself.
|
53
|
-
#
|
54
|
-
# Using 'localhost' instead of its EC2 hostname speeds up
|
55
|
-
# deploys on solos and single-app-server clusters significantly.
|
56
|
-
app_master? ? 'localhost' : hostname
|
57
|
-
end
|
58
|
-
|
59
|
-
private
|
60
|
-
|
61
|
-
def ssh(remote_command, output = true)
|
62
|
-
user = environment.username
|
63
|
-
|
64
|
-
cmd = Escape.shell_command(%w[ssh -o StrictHostKeyChecking=no -q] << "#{user}@#{hostname}" << remote_command)
|
65
|
-
cmd << " > /dev/null" unless output
|
66
|
-
EY.ui.debug(cmd)
|
67
|
-
unless ENV["NO_SSH"]
|
68
|
-
system cmd
|
69
|
-
else
|
70
|
-
true
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
def invoke(action)
|
75
|
-
action.call do |cmd|
|
76
|
-
puts cmd if action.verbose
|
77
|
-
ssh cmd
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def instances_data
|
82
|
-
environment.instances.select { |inst| inst.has_app_code? }.map do |i|
|
83
|
-
{
|
84
|
-
:hostname => i.engineyard_serverside_hostname,
|
85
|
-
:roles => [i.role],
|
86
|
-
:name => i.name,
|
87
|
-
}
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
def app_master?
|
92
|
-
environment.app_master == self
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|