elastic_beans 0.12.0.alpha2 → 0.12.0.alpha3

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
  SHA1:
3
- metadata.gz: 7ae6aa35f652ca0e53486f211218fedea2419d62
4
- data.tar.gz: 55e52f1bb58c11f5fa40934621ecca13e63b2408
3
+ metadata.gz: 9e9279440583eb621e91ba0b232afd34f9e4419c
4
+ data.tar.gz: 578621f57dfa6d0beb263a83f22a48fe1e146144
5
5
  SHA512:
6
- metadata.gz: abd30c1b53faac2caf2f0c38261d999d3a9d5863253ede34375a812b9e1617a9ed96e017cbd579bdeede82e012dcf5b9a31f95b54236526f3266c564a3435649
7
- data.tar.gz: f34694b8c6601115f442eee12a90195cf50af471ec90a52ea94d5d332a58d31b70c7c00e8aa923c9eea871a2051594f9438bab2a2f64319e6df914401631a611
6
+ metadata.gz: cc57df37016899de9ff2967d3c2ac8803a8d9655d75be8a04ebbf713f5ed85d7a5b5e7b28f1488804bbee3eb199528af3ebe3d81291ed82c785d76ae906b2045
7
+ data.tar.gz: b7561fbc15110e58c68cae383d067ba4a6ef1f25a32b634bae4e30fa0aa92197fd49375f2fa29c1cfe8040f8f797a79962d7d61258b5b317a291e6ba1eedbe15
data/exe/beans CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  Signal.trap("INT") do
4
- puts "\nInterrupting beans -- if an operation was in progress, it will still be running."
4
+ puts "\nInterrupting beans"
5
5
  raise Interrupt
6
6
  end
7
7
 
8
8
  Signal.trap("TERM") do
9
- puts "Terminating beans -- if an operation was in progress, it will still be running."
9
+ puts "Terminating beans"
10
10
  raise SignalException.new("TERM")
11
11
  end
12
12
 
@@ -50,6 +50,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
50
50
 
51
51
  threads = []
52
52
 
53
+ Signal.trap("INT") do
54
+ puts "\nInterrupting beans"
55
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
56
+ raise Interrupt
57
+ end
58
+ Signal.trap("TERM") do
59
+ puts "Terminating beans"
60
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
61
+ raise SignalException.new("TERM")
62
+ end
63
+
53
64
  config_templates = 4 + application.worker_queues.size
54
65
  progressbar = ProgressBar.create(title: "Configuring", total: config_templates, output: ui.stdout)
55
66
  progressbar.log("Updating configuration templates in #{application.name}...")
@@ -65,6 +65,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
65
65
  end
66
66
  end
67
67
 
68
+ Signal.trap("INT") do
69
+ puts "\nInterrupting beans"
70
+ puts "Create environment still in progress, follow it in the AWS console"
71
+ raise Interrupt
72
+ end
73
+ Signal.trap("TERM") do
74
+ puts "Terminating beans"
75
+ puts "Create environment still in progress, follow it in the AWS console"
76
+ raise SignalException.new("TERM")
77
+ end
78
+
68
79
  ui.info("Creating environment `#{environment.name}'...")
69
80
  progressbar = ProgressBar.create(title: "Creating", total: nil, output: ui.stdout)
70
81
  environment_thread = Thread.new do
@@ -48,6 +48,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
48
48
  end
49
49
  version_thread.join
50
50
 
51
+ Signal.trap("INT") do
52
+ puts "\nInterrupting beans"
53
+ puts "Deployment still in progress, follow it in the AWS console"
54
+ raise Interrupt
55
+ end
56
+ Signal.trap("TERM") do
57
+ puts "Terminating beans"
58
+ puts "Deployment still in progress, follow it in the AWS console"
59
+ raise SignalException.new("TERM")
60
+ end
61
+
51
62
  progressbar.log("Deploying version '#{version}' to #{application.name}...")
52
63
  progressbar.title = "Deploying"
53
64
  deploy_threads = environments.map { |environment|
@@ -49,6 +49,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
49
49
 
50
50
  progressbar = ProgressBar.create(title: "Restarting", total: nil, output: ui.stdout)
51
51
 
52
+ Signal.trap("INT") do
53
+ puts "\nInterrupting beans"
54
+ puts "Restart still in progress, follow it in the AWS console"
55
+ raise Interrupt
56
+ end
57
+ Signal.trap("TERM") do
58
+ puts "Terminating beans"
59
+ puts "Restart still in progress, follow it in the AWS console"
60
+ raise SignalException.new("TERM")
61
+ end
62
+
52
63
  threads = environments.map { |environment|
53
64
  progressbar.log("Restarting `#{environment.name}'...")
54
65
  thread = Thread.new do
@@ -36,6 +36,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
36
36
 
37
37
  progressbar = ProgressBar.create(title: "Configuring", total: nil, output: ui.stdout)
38
38
 
39
+ Signal.trap("INT") do
40
+ puts "\nInterrupting beans"
41
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
42
+ raise Interrupt
43
+ end
44
+ Signal.trap("TERM") do
45
+ puts "Terminating beans"
46
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
47
+ raise SignalException.new("TERM")
48
+ end
49
+
39
50
  thread = Thread.new do
40
51
  config = ElasticBeans::ConfigurationTemplate.new_by_type(
41
52
  environment_type,
@@ -55,6 +66,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
55
66
  end
56
67
  thread.join
57
68
 
69
+ Signal.trap("INT") do
70
+ puts "\nInterrupting beans"
71
+ puts "Scaling still in progress, follow it in the AWS console"
72
+ raise Interrupt
73
+ end
74
+ Signal.trap("TERM") do
75
+ puts "Terminating beans"
76
+ puts "Scaling still in progress, follow it in the AWS console"
77
+ raise SignalException.new("TERM")
78
+ end
79
+
58
80
  thread = Thread.new do
59
81
  progressbar.log("Updating `#{environment.name}'...")
60
82
  environment.scale(min_size: minimum, max_size: maximum)
@@ -32,6 +32,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
32
32
 
33
33
  progressbar = ProgressBar.create(title: "Updating", total: nil, output: ui.stdout)
34
34
 
35
+ Signal.trap("INT") do
36
+ puts "\nInterrupting beans"
37
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
38
+ raise Interrupt
39
+ end
40
+ Signal.trap("TERM") do
41
+ puts "Terminating beans"
42
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
43
+ raise SignalException.new("TERM")
44
+ end
45
+
35
46
  progressbar.log("Updating configuration in #{application.name}...")
36
47
  application.env_vars.upsert(env_vars)
37
48
  progressbar.increment
@@ -31,6 +31,17 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
31
31
 
32
32
  progressbar = ProgressBar.create(title: "Updating", total: nil, output: ui.stdout)
33
33
 
34
+ Signal.trap("INT") do
35
+ puts "\nInterrupting beans"
36
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
37
+ raise Interrupt
38
+ end
39
+ Signal.trap("TERM") do
40
+ puts "Terminating beans"
41
+ puts "WARNING: Configuration update is partially applied, you should run this command again"
42
+ raise SignalException.new("TERM")
43
+ end
44
+
34
45
  progressbar.log("Updating configuration in #{application.name}...")
35
46
  application.env_vars.del(env_keys)
36
47
  progressbar.increment
@@ -1,3 +1,3 @@
1
1
  module ElasticBeans
2
- VERSION = "0.12.0.alpha2"
2
+ VERSION = "0.12.0.alpha3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_beans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0.alpha2
4
+ version: 0.12.0.alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Stegman