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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7cd69781a4eb3275ce1a1326c7ea79279dcff1c6de8a663d95e0276d318e36e
4
- data.tar.gz: e60e683abec4d85850bf11d7368c3ec501cd9c4d96af07ed5fc6613988fe4f69
3
+ metadata.gz: 301123fdb0da2d489face06c5ff98f5a7468c87567931d6bf3a7a9c5487d7d76
4
+ data.tar.gz: cf368989a95109d155d2e6594a52dc4e49f4c8791fbc8a1a63cd6e749cbf8c1d
5
5
  SHA512:
6
- metadata.gz: d8d9bf7f44d69e2de4a71d393aa29e6e88cc851ebd99177c091388975bbe006d2cf4f9ccde6ab7d291dc200cbac0c26aa57ec96ba7322a5386e83d49df76a567
7
- data.tar.gz: bbf84bfa83d24a4f293c14b928614b68846d988a30835d2973251f2a5caf6c85ad49703c1dc12b3e2e1478fec01003d9a14d8057f6a1f03ecf43e7ed93dc947f
6
+ metadata.gz: ddaf5291676659eb5f0dc2cac60ff76320c3af82eb1fd3bc40cac4ec01ceb18ba8b549da610be189ef69110d010b9c3ec5d1d3f7d4728d9f1dc20ee3eb4bc37a
7
+ data.tar.gz: 01c05f180816f015752983109e27ac01e9b9e3f9826a29524754fb728b1b85ebf2099e1cd757600b35ae22129d1b9000ebb44ca39a44275548caa317254fddc7
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in ey-core.gemspec
4
4
  gemspec
5
5
 
6
- gem "rack", "<= 2.0"
6
+ gem "rack", "<= 2.1.4"
7
7
 
8
8
  group :doc do
9
9
  gem 'yard'
@@ -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: options[:verbose], cli_args: ARGV}
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'].
@@ -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)
@@ -9,6 +9,7 @@ class Ey::Core::Client::Deployment < Ey::Core::Model
9
9
  attribute :migrate_command
10
10
  attribute :ref
11
11
  attribute :resolved_ref
12
+ attribute :serverside_version
12
13
  attribute :started_at, type: :time
13
14
  attribute :successful, type: :boolean
14
15
  attribute :verbose
@@ -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
  }
@@ -1,5 +1,5 @@
1
1
  module Ey
2
2
  module Core
3
- VERSION = "3.6.1"
3
+ VERSION = "3.6.3"
4
4
  end
5
5
  end
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.1
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: 2020-06-11 00:00:00.000000000 Z
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.0.8
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