ec2-clusterssh 0.4.2 → 0.4.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
  SHA1:
3
- metadata.gz: c74dd88d642351a19eb487a390e82274b747e387
4
- data.tar.gz: b89e5951f98b0248596d6d84ec20dde465a3ee74
3
+ metadata.gz: e6372df3f909d807cbe50f7b27b9047b55cbf0bf
4
+ data.tar.gz: 4a0275ecadbc4f08dfbc9a1220b57590c7dcd2d8
5
5
  SHA512:
6
- metadata.gz: 944f261efa54b09d5b04bc56e4cd2d5c3536f162216cab9609305673a92a3d1bd6ca76e7767d6842320658b374224eeff0c0536fcb6b869aa15939190fb0af04
7
- data.tar.gz: 8e9898937e00ee414330d49ebef4a590b63962c16107aa9c9b9dc2c3055e384a1ee22717076e69226c85f33e241ee9eb66aa12388f47daf0bdb13c67091ce4d2
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-private-ip Use private IP (default false)
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 (default: #{options['user']}") do |opt|
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} -l #{options['user']} #{dns.join ' '}"
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
@@ -1,5 +1,5 @@
1
1
  module Ec2
2
2
  module Clusterssh
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
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.2
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-06-04 00:00:00.000000000 Z
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler