rmdd 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rmd/cli.rb +10 -1
- data/lib/rmd/deploy_service.rb +7 -0
- data/lib/rmd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebb8b29ac77890f161737dfe0326e4f9744d355c
|
4
|
+
data.tar.gz: d95326b688c1997088cd32bfb631442185db59a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4752d86739d37376f680588e68c249decbe21cac96f9b9facb8537d2e4103d2867c008429bf98cfcdb18286f8ac2ac30f84cff277dfd7c8e6dc0659cd93b8c1
|
7
|
+
data.tar.gz: 93083cae83c56ac2ba10dcbe684aab5756f15432af7d2996672d78bec6d62c653348d5f0380e85037295692167b74c7a2d93643627cd6a16dc3a0f261e3daeff
|
data/lib/rmd/cli.rb
CHANGED
@@ -26,7 +26,7 @@ module Rmd
|
|
26
26
|
$stdout.puts(e.message)
|
27
27
|
end
|
28
28
|
|
29
|
-
desc 'restart', 'Restart a server
|
29
|
+
desc 'restart', 'Restart a server'
|
30
30
|
method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
|
31
31
|
def restart
|
32
32
|
Cli.load_config
|
@@ -62,5 +62,14 @@ module Rmd
|
|
62
62
|
rescue Exception => e
|
63
63
|
$stdout.puts(e.message)
|
64
64
|
end
|
65
|
+
|
66
|
+
desc 'config', 'Config of servers. You are expected to be familiar with VIM to edit the config'
|
67
|
+
method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
|
68
|
+
def config
|
69
|
+
Cli.load_config
|
70
|
+
DeployService.config(options[:server])
|
71
|
+
rescue Exception => e
|
72
|
+
$stdout.puts(e.message)
|
73
|
+
end
|
65
74
|
end
|
66
75
|
end
|
data/lib/rmd/deploy_service.rb
CHANGED
@@ -36,6 +36,13 @@ module Rmd
|
|
36
36
|
system_cmd(command)
|
37
37
|
end
|
38
38
|
|
39
|
+
def self.config(server)
|
40
|
+
validate(server)
|
41
|
+
command = %{ssh -t #{master(server)} -p 2200 vim #{NAME}/.env}
|
42
|
+
system_cmd(command)
|
43
|
+
$stdout.puts('Please remember to restart the servers for the new config to take effect')
|
44
|
+
end
|
45
|
+
|
39
46
|
private
|
40
47
|
|
41
48
|
def self.validate(server)
|
data/lib/rmd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duc Le
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|