ec2-clusterssh 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/bin/cluster +11 -3
- data/lib/ec2/clusterssh/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: e6372df3f909d807cbe50f7b27b9047b55cbf0bf
|
4
|
+
data.tar.gz: 4a0275ecadbc4f08dfbc9a1220b57590c7dcd2d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 237dbca77daceee9390cac5c4922b94398a20070be58c742d0c1ecd74fa444abee900b4f177c5ca51b981b6c88dc4765e48a81e40cb8f1c80661c3bfa17e9534
|
7
|
+
data.tar.gz: 32fe08161bc6371c46ee5169794a9b4248c3ada71d82039706a4056b0e1dacaf69bea4594cce7dba3bf0a050e3a30085dff3cafaa44ece577fa349f0f355525d
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Use instance tags to launch a ClusterSSH session to multiple EC2 instances.
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
$ gem install ec2-clusterssh
|
8
|
-
|
8
|
+
|
9
9
|
Note: Mac users with the latest version of XCode may run into a compilation error installing the json gem dependency. If you see the following error during the gem installation, see this [page](https://langui.sh/2014/03/10/wunused-command-line-argument-hard-error-in-future-is-a-harsh-mistress/) for a workaround
|
10
10
|
|
11
11
|
> clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
|
@@ -27,11 +27,17 @@ Note: Mac users with the latest version of XCode may run into a compilation err
|
|
27
27
|
-l, --login [USER] Log in with this user (default: ec2-user
|
28
28
|
-t, --tags [TAGS] a 'space' sparated key value pair of tags and values (i.e. role=web,database environment=dev)
|
29
29
|
-r, --region [REGION] AWS region
|
30
|
-
-p, --use-
|
30
|
+
-p, --use-public-ip Use public IP (default false)
|
31
31
|
|
32
32
|
$cluster -l ec2-user -t Name=web,database #Connects to all web and database servers
|
33
33
|
$cluster -l ec2-user -t role=web,database environment=dev #Connects to all web and database servers in the dev environment
|
34
34
|
|
35
|
+
## Notes
|
36
|
+
|
37
|
+
If you use a bastion jumphost, you'll want to configure your ssh config
|
38
|
+
file to route the relavant IP ranges through your bastion. (i.e.
|
39
|
+
192.168.*)
|
40
|
+
|
35
41
|
## Contributing
|
36
42
|
|
37
43
|
1. Fork it
|
data/bin/cluster
CHANGED
@@ -5,7 +5,6 @@ require 'rubygems'
|
|
5
5
|
require 'aws-sdk'
|
6
6
|
|
7
7
|
options = {
|
8
|
-
'user' => 'ec2-user',
|
9
8
|
'use_public_ip' => false,
|
10
9
|
'region' => 'us-west-2'
|
11
10
|
}
|
@@ -13,7 +12,7 @@ options = {
|
|
13
12
|
OptionParser.new do |opts|
|
14
13
|
opts.banner = "Usage: cluster [-t TAGS] [-l USER] [-k KEY -s SECRET] [-r region]"
|
15
14
|
|
16
|
-
opts.on("-l", "--login [USER]", "Log in with this user
|
15
|
+
opts.on("-l", "--login [USER]", "Log in with this user") do |opt|
|
17
16
|
options['user'] = opt
|
18
17
|
end
|
19
18
|
|
@@ -25,9 +24,14 @@ OptionParser.new do |opts|
|
|
25
24
|
options['region'] = opt
|
26
25
|
end
|
27
26
|
|
27
|
+
opts.on("-s", "--screen [SCREEN]", "What screen to use for clustering windows (form multiple displays)") do |opt|
|
28
|
+
options['screen'] = opt
|
29
|
+
end
|
30
|
+
|
28
31
|
opts.on("-p", "--use-public-ip", "Use public IP (default #{options['use_public_ip']})") do
|
29
32
|
options['use_public_ip'] = true
|
30
33
|
end
|
34
|
+
|
31
35
|
end.parse!
|
32
36
|
|
33
37
|
Aws.config.update({:region => options['region']})
|
@@ -72,7 +76,11 @@ end
|
|
72
76
|
|
73
77
|
cssh = (/darwin/ =~ RUBY_PLATFORM) ? 'csshX' : 'cssh'
|
74
78
|
|
75
|
-
cmd = "#{cssh}
|
79
|
+
cmd = "#{cssh}"
|
80
|
+
cmd = cmd + " -l #{options['user']}" unless options['user'].nil?
|
81
|
+
cmd = cmd + " -screen #{options['screen']}" unless options['screen'].nil?
|
82
|
+
cmd = cmd + " #{dns.join ' '}"
|
83
|
+
|
76
84
|
puts "Connecting to #{dns.length} instances"
|
77
85
|
puts cmd
|
78
86
|
exec cmd
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ec2-clusterssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glenn Poston
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|