elastic_beans 0.12.0.alpha2 → 0.12.0.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/beans +2 -2
- data/lib/elastic_beans/command/configure.rb +11 -0
- data/lib/elastic_beans/command/create.rb +11 -0
- data/lib/elastic_beans/command/deploy.rb +11 -0
- data/lib/elastic_beans/command/restart.rb +11 -0
- data/lib/elastic_beans/command/scale.rb +22 -0
- data/lib/elastic_beans/command/set_env.rb +11 -0
- data/lib/elastic_beans/command/unset_env.rb +11 -0
- data/lib/elastic_beans/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e9279440583eb621e91ba0b232afd34f9e4419c
|
4
|
+
data.tar.gz: 578621f57dfa6d0beb263a83f22a48fe1e146144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
4
|
+
puts "\nInterrupting beans"
|
5
5
|
raise Interrupt
|
6
6
|
end
|
7
7
|
|
8
8
|
Signal.trap("TERM") do
|
9
|
-
puts "Terminating beans
|
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
|