ey-core 3.6.1 → 3.6.3
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/ey-core/cli/deploy.rb +10 -7
- data/lib/ey-core/cli/helpers/chef.rb +1 -1
- data/lib/ey-core/cli/helpers/core.rb +3 -3
- data/lib/ey-core/cli/helpers/server_sieve.rb +7 -0
- data/lib/ey-core/cli/ssh.rb +6 -0
- data/lib/ey-core/models/deployment.rb +1 -0
- data/lib/ey-core/requests/deploy_environment_application.rb +1 -0
- data/lib/ey-core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 301123fdb0da2d489face06c5ff98f5a7468c87567931d6bf3a7a9c5487d7d76
|
4
|
+
data.tar.gz: cf368989a95109d155d2e6594a52dc4e49f4c8791fbc8a1a63cd6e749cbf8c1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddaf5291676659eb5f0dc2cac60ff76320c3af82eb1fd3bc40cac4ec01ceb18ba8b549da610be189ef69110d010b9c3ec5d1d3f7d4728d9f1dc20ee3eb4bc37a
|
7
|
+
data.tar.gz: 01c05f180816f015752983109e27ac01e9b9e3f9826a29524754fb728b1b85ebf2099e1cd757600b35ae22129d1b9000ebb44ca39a44275548caa317254fddc7
|
data/Gemfile
CHANGED
data/lib/ey-core/cli/deploy.rb
CHANGED
@@ -32,6 +32,11 @@ module Ey
|
|
32
32
|
long: "migrate",
|
33
33
|
description: "The migration command to run. This option has a 50 character limit.",
|
34
34
|
argument: "migrate"
|
35
|
+
option :serverside_version,
|
36
|
+
short: "S",
|
37
|
+
long: "serverside_version",
|
38
|
+
description: "Override the default version of engineyard-serverside. The version must match a released version. Use with care.",
|
39
|
+
argument: "serverside_version"
|
35
40
|
|
36
41
|
option :app,
|
37
42
|
short: "a",
|
@@ -43,11 +48,6 @@ module Ey
|
|
43
48
|
long: "no-wait",
|
44
49
|
description: "Don't wait for deploy to finish, exit after deploy is started"
|
45
50
|
|
46
|
-
switch :verbose,
|
47
|
-
short: "v",
|
48
|
-
long: "verbose",
|
49
|
-
description: "Deploy with verbose output"
|
50
|
-
|
51
51
|
switch :verbose,
|
52
52
|
short: "v",
|
53
53
|
long: "verbose",
|
@@ -63,7 +63,7 @@ module Ey
|
|
63
63
|
abort <<-EOF
|
64
64
|
Found account #{operator.name} but requested account #{option(:account)}.
|
65
65
|
Use the ID of the account instead of the name.
|
66
|
-
This can be retrieved by running "ey accounts".
|
66
|
+
This can be retrieved by running "ey-core accounts".
|
67
67
|
EOF
|
68
68
|
.red unless operator.name == option(:account) || operator.id == option(:account)
|
69
69
|
end
|
@@ -78,8 +78,11 @@ EOF
|
|
78
78
|
|
79
79
|
app = core_application_for(environment, self.options)
|
80
80
|
|
81
|
-
deploy_options = {verbose:
|
81
|
+
deploy_options = {verbose: switch_active?(:verbose), cli_args: ARGV}
|
82
82
|
latest_deploy = nil
|
83
|
+
if options[:serverside_version]
|
84
|
+
deploy_options.merge!(serverside_version: option(:serverside_version))
|
85
|
+
end
|
83
86
|
if options[:ref]
|
84
87
|
deploy_options.merge!(ref: option(:ref))
|
85
88
|
else
|
@@ -28,7 +28,7 @@ module Ey
|
|
28
28
|
puts "#{type.capitalize} chef run failed".red
|
29
29
|
ap request
|
30
30
|
if server = environment.servers.first
|
31
|
-
puts "For logs try `ey logs --server #{server.provisioned_id}` --environment #{environment.name}"
|
31
|
+
puts "For logs try `ey-core logs --server #{server.provisioned_id}` --environment #{environment.name}"
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -45,7 +45,7 @@ module Ey
|
|
45
45
|
|
46
46
|
def core_operator_and_environment_for(options={})
|
47
47
|
unless options[:environment]
|
48
|
-
raise "--environment is required (for a list of environments, try `ey environments`)"
|
48
|
+
raise "--environment is required (for a list of environments, try `ey-core environments`)"
|
49
49
|
end
|
50
50
|
operator = operator(options)
|
51
51
|
environment = nil
|
@@ -61,7 +61,7 @@ module Ey
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
unless environment
|
64
|
-
raise "environment '#{options[:environment]}' not found (for a list of environments, try `ey environments`)"
|
64
|
+
raise "environment '#{options[:environment]}' not found (for a list of environments, try `ey-core environments`)"
|
65
65
|
end
|
66
66
|
[operator, environment]
|
67
67
|
end
|
@@ -131,7 +131,7 @@ module Ey
|
|
131
131
|
write_core_yaml(legacy_token)
|
132
132
|
retry
|
133
133
|
elsif e.message.match(/missing token/i)
|
134
|
-
abort "Missing credentials: Run 'ey login' to retrieve your Engine Yard Cloud API token.".yellow
|
134
|
+
abort "Missing credentials: Run 'ey-core login' to retrieve your Engine Yard Cloud API token.".yellow
|
135
135
|
else
|
136
136
|
raise e
|
137
137
|
end
|
@@ -6,6 +6,7 @@ module Ey
|
|
6
6
|
ROLES = [
|
7
7
|
:app_servers,
|
8
8
|
:db_servers,
|
9
|
+
:app_master,
|
9
10
|
:db_master,
|
10
11
|
:utilities
|
11
12
|
]
|
@@ -56,6 +57,12 @@ module Ey
|
|
56
57
|
def db_servers
|
57
58
|
db_master + servers_api.all(role: 'db_slave').to_a
|
58
59
|
end
|
60
|
+
|
61
|
+
def app_master
|
62
|
+
['app_master', 'solo'].
|
63
|
+
map {|role| servers_api.all(role:role).to_a}.
|
64
|
+
flatten
|
65
|
+
end
|
59
66
|
|
60
67
|
def db_master
|
61
68
|
['db_master', 'solo'].
|
data/lib/ey-core/cli/ssh.rb
CHANGED
@@ -54,6 +54,10 @@ module Ey
|
|
54
54
|
long: "app_servers",
|
55
55
|
description: "Run command on all application servers"
|
56
56
|
|
57
|
+
switch :app_master,
|
58
|
+
long: "app_master",
|
59
|
+
description: "Run command on app master"
|
60
|
+
|
57
61
|
switch :db_servers,
|
58
62
|
long: "db_servers",
|
59
63
|
description: "Run command on all database servers"
|
@@ -97,6 +101,7 @@ module Ey
|
|
97
101
|
environment.servers,
|
98
102
|
all: switch_active?(:all),
|
99
103
|
app_servers: switch_active?(:app_servers),
|
104
|
+
app_master: switch_active?(:app_master),
|
100
105
|
db_servers: switch_active?(:db_servers),
|
101
106
|
db_master: switch_active?(:db_master),
|
102
107
|
utilities: option(:utilities)
|
@@ -113,6 +118,7 @@ module Ey
|
|
113
118
|
environment.servers,
|
114
119
|
all: switch_active?(:all),
|
115
120
|
app_servers: switch_active?(:app_servers),
|
121
|
+
app_master: switch_active?(:app_master),
|
116
122
|
db_servers: switch_active?(:db_servers),
|
117
123
|
db_master: switch_active?(:db_master),
|
118
124
|
utilities: option(:utilities)
|
@@ -30,6 +30,7 @@ class Ey::Core::Client
|
|
30
30
|
"migrate_command" => options["deploy"]["migrate"] ? (options["deploy"]["migrate_command"] || "rake db:migrate") : nil,
|
31
31
|
"migrate" => options["deploy"]["migrate"] || false,
|
32
32
|
"resolved_ref" => options["deploy"]["ref"],
|
33
|
+
"serverside_version" => options["deploy"]["serverside_version"],
|
33
34
|
"started_at" => Time.now,
|
34
35
|
"successful" => true
|
35
36
|
}
|
data/lib/ey-core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ey-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Engine Yard Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -954,7 +954,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
954
954
|
- !ruby/object:Gem::Version
|
955
955
|
version: '0'
|
956
956
|
requirements: []
|
957
|
-
rubygems_version: 3.
|
957
|
+
rubygems_version: 3.1.2
|
958
958
|
signing_key:
|
959
959
|
specification_version: 4
|
960
960
|
summary: Client library providing real and mock functionality for accessing Engine
|