tmuxinator-bosh-console 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ac0145c5921ef309202a382403b408a6753243d
4
- data.tar.gz: 8a440cf9a4ee22fad3dea29c878ffed5af9ef028
3
+ metadata.gz: d17c7d707598215c08242d1535df7035a581ba0d
4
+ data.tar.gz: 2ec3b78d6e5a9adb0d55b734ce9a4c96c5576808
5
5
  SHA512:
6
- metadata.gz: 7407bbe34c539642f0aba90a0877eca0947d2c6d48501b6efa54724ec5ae42d5e60db7cec82b46448b07f264925620c8239ddf39797fd77f8b8d11f53c8e0f2a
7
- data.tar.gz: ddaaa82f89fbbe81f68d39ac002eb24475391c74b651610724525ad1c620f0e39ce227f9d8d8bf5dda663103b7fb2a06c0454cd696f04fe454a52f252b800aeb
6
+ metadata.gz: a4dd249ab1b26ef346bde6dc293c08d4c5de0740e90b41f8649c73c850d2208cc982f868bd4f711420ee77a22461c6136f2803f46f2c0797aeb1745a427d1503
7
+ data.tar.gz: 30797c3d5fc72781c2c409041a761337a99ec803aac00a9460015b1208bd3bf19300a67063443dd1d475cbb1dacf375f855072bf1992a8d7694cfe578a6078b7
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
1
  .rake_t_cache
2
2
  /.bundle/
3
3
  /.envrc/
4
- /Gemfile.lock
5
4
  /pkg/
6
5
  /spec/reports/
7
6
  /tmp/
@@ -3,6 +3,8 @@ language: ruby
3
3
  rvm:
4
4
  - 2.3.1
5
5
  - 2.4.0
6
- before_install: gem install bundler
6
+ before_install:
7
+ - gem update --system --no-doc
8
+ - gem install bundler
7
9
  script:
8
10
  - bundle exec rake spec:ci
@@ -0,0 +1,150 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ tmuxinator-bosh-console (0.3.0)
5
+ bosh_cli
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.3.0)
11
+ aws-sdk-core (2.2.0)
12
+ jmespath (~> 1.0)
13
+ aws-sdk-resources (2.2.0)
14
+ aws-sdk-core (= 2.2.0)
15
+ blobstore_client (1.3262.24.0)
16
+ aws-sdk-resources (= 2.2.0)
17
+ bosh_common (~> 1.3262.24.0)
18
+ httpclient (= 2.7.1)
19
+ multi_json (~> 1.1)
20
+ bosh-template (1.3262.24.0)
21
+ semi_semantic (~> 1.2.0)
22
+ bosh_cli (1.3262.24.0)
23
+ blobstore_client (~> 1.3262.24.0)
24
+ bosh-template (~> 1.3262.24.0)
25
+ bosh_common (~> 1.3262.24.0)
26
+ cf-uaa-lib (~> 3.2.1)
27
+ highline (~> 1.6.2)
28
+ httpclient (= 2.7.1)
29
+ json_pure (~> 1.7)
30
+ minitar (~> 0.5.4)
31
+ net-scp (~> 1.1.0)
32
+ net-ssh (= 2.9.2)
33
+ net-ssh-gateway (~> 1.2.0)
34
+ netaddr (~> 1.5.0)
35
+ progressbar (~> 0.9.0)
36
+ sshkey (~> 1.7.0)
37
+ terminal-table (~> 1.4.3)
38
+ bosh_common (1.3262.24.0)
39
+ logging (~> 1.8.2)
40
+ semi_semantic (~> 1.2.0)
41
+ cf-uaa-lib (3.2.5)
42
+ multi_json
43
+ coderay (1.1.1)
44
+ diff-lcs (1.3)
45
+ ffi (1.9.17)
46
+ formatador (0.2.5)
47
+ guard (2.14.0)
48
+ formatador (>= 0.2.4)
49
+ listen (>= 2.7, < 4.0)
50
+ lumberjack (~> 1.0)
51
+ nenv (~> 0.1)
52
+ notiffany (~> 0.0)
53
+ pry (>= 0.9.12)
54
+ shellany (~> 0.0)
55
+ thor (>= 0.18.1)
56
+ guard-bundler (2.1.0)
57
+ bundler (~> 1.0)
58
+ guard (~> 2.2)
59
+ guard-compat (~> 1.1)
60
+ guard-compat (1.2.1)
61
+ guard-rspec (4.7.3)
62
+ guard (~> 2.1)
63
+ guard-compat (~> 1.1)
64
+ rspec (>= 2.99.0, < 4.0)
65
+ highline (1.6.21)
66
+ httpclient (2.7.1)
67
+ jmespath (1.3.1)
68
+ json_pure (1.8.6)
69
+ listen (3.1.5)
70
+ rb-fsevent (~> 0.9, >= 0.9.4)
71
+ rb-inotify (~> 0.9, >= 0.9.7)
72
+ ruby_dep (~> 1.2)
73
+ little-plugger (1.1.4)
74
+ logging (1.8.2)
75
+ little-plugger (>= 1.1.3)
76
+ multi_json (>= 1.8.4)
77
+ lumberjack (1.0.11)
78
+ method_source (0.8.2)
79
+ minitar (0.5.4)
80
+ multi_json (1.12.1)
81
+ nenv (0.3.0)
82
+ net-scp (1.1.2)
83
+ net-ssh (>= 2.6.5)
84
+ net-ssh (2.9.2)
85
+ net-ssh-gateway (1.2.0)
86
+ net-ssh (>= 2.6.5)
87
+ netaddr (1.5.1)
88
+ notiffany (0.1.1)
89
+ nenv (~> 0.1)
90
+ shellany (~> 0.0)
91
+ parser (2.3.3.1)
92
+ ast (~> 2.2)
93
+ powerpack (0.1.1)
94
+ progressbar (0.9.2)
95
+ pry (0.10.4)
96
+ coderay (~> 1.1.0)
97
+ method_source (~> 0.8.1)
98
+ slop (~> 3.4)
99
+ rainbow (2.2.1)
100
+ rake (12.0.0)
101
+ rb-fsevent (0.9.8)
102
+ rb-inotify (0.9.8)
103
+ ffi (>= 0.5.0)
104
+ rb-readline (0.5.3)
105
+ rspec (3.5.0)
106
+ rspec-core (~> 3.5.0)
107
+ rspec-expectations (~> 3.5.0)
108
+ rspec-mocks (~> 3.5.0)
109
+ rspec-core (3.5.4)
110
+ rspec-support (~> 3.5.0)
111
+ rspec-expectations (3.5.0)
112
+ diff-lcs (>= 1.2.0, < 2.0)
113
+ rspec-support (~> 3.5.0)
114
+ rspec-mocks (3.5.0)
115
+ diff-lcs (>= 1.2.0, < 2.0)
116
+ rspec-support (~> 3.5.0)
117
+ rspec-support (3.5.0)
118
+ rubocop (0.47.1)
119
+ parser (>= 2.3.3.1, < 3.0)
120
+ powerpack (~> 0.1)
121
+ rainbow (>= 1.99.1, < 3.0)
122
+ ruby-progressbar (~> 1.7)
123
+ unicode-display_width (~> 1.0, >= 1.0.1)
124
+ ruby-progressbar (1.8.1)
125
+ ruby_dep (1.5.0)
126
+ semi_semantic (1.2.0)
127
+ shellany (0.0.1)
128
+ slop (3.6.0)
129
+ sshkey (1.7.0)
130
+ terminal-table (1.4.5)
131
+ thor (0.19.4)
132
+ unicode-display_width (1.1.3)
133
+
134
+ PLATFORMS
135
+ ruby
136
+
137
+ DEPENDENCIES
138
+ bundler
139
+ guard
140
+ guard-bundler
141
+ guard-rspec
142
+ pry
143
+ rake
144
+ rb-readline
145
+ rspec
146
+ rubocop
147
+ tmuxinator-bosh-console!
148
+
149
+ BUNDLED WITH
150
+ 1.13.7
@@ -6,13 +6,20 @@
6
6
 
7
7
  ```bash
8
8
  $ tmuxinator-bosh-console cf-warden
9
- $ tmuxinator cf-warden
10
9
  ```
11
10
 
12
11
  will create a new tmuxinator project 'cf-warden'. Each instance (VM) will get its own tmux window with some panes, according to the provided template.
13
12
 
14
13
  The list of instances is generated by executing `bosh instances` and therefore lists only the VMs of the current deployment.
15
14
 
15
+ Once created, tmuxinator can be used as usual to launch the project:
16
+
17
+ ```bash
18
+ $ tmuxinator cf-warden
19
+ ```
20
+
21
+ Anything appearing after a single `--` argument is appended to `bosh ssh`, e.g. `--gateway-host` etc.
22
+
16
23
  ## Installation
17
24
 
18
25
  ```bash
@@ -21,10 +28,8 @@ $ gem install tmuxinator-bosh-console
21
28
 
22
29
  ## Prerequisites
23
30
 
24
- `bosh instances` must return a zero or more instances.
31
+ `bosh instances` must return zero or more instances.
25
32
 
26
33
  ## TODO
27
34
 
28
- * repeated `--include`s
29
- * `--exclude` this VM (blacklisting); may be repeated
30
- * `--custom` bosh ssh command, e.g. gateway-host
35
+ * repeated `--include`s and `--exclude`s will make less complex regexes
@@ -14,6 +14,7 @@ def die(msg)
14
14
  end
15
15
 
16
16
  filter = {}
17
+ force = false
17
18
 
18
19
  OptionParser.new do |opts|
19
20
  opts.banner = "Generates a tmuxinator configuration for the VMs of a BOSH deployment\n\n" + opts.banner
@@ -26,12 +27,18 @@ OptionParser.new do |opts|
26
27
  opts.on('-XFILTER', '--exclude=FILTER', 'exclude jobs with a name matching FILTER') do |f|
27
28
  filter[:exclude] = Regexp.new(f)
28
29
  end
30
+
31
+ opts.on('-F', '--force', 'force overriding of the project file') do
32
+ force = true
33
+ end
29
34
  end.parse!
30
35
 
31
- project_name = ARGV.first || die('Missing argument for the tmuxinator project name')
36
+ project_name = ARGV.shift || die('Missing argument for the tmuxinator project name')
37
+ additional_args = ARGV
38
+
32
39
  project_file = Pathname("~/.tmuxinator/#{project_name}.yml").expand_path
33
40
 
34
- if project_file.exist?
41
+ if project_file.exist? && !force
35
42
  die("Not overriding tmuxinator project file #{project_file}")
36
43
  end
37
44
 
@@ -2,7 +2,7 @@
2
2
  module Tmuxinator
3
3
  module BOSH
4
4
  module Console
5
- VERSION = '0.2.1'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
8
8
  end
@@ -1,20 +1,17 @@
1
1
  # ~/.tmuxinator/<%= project_name %>.yml
2
2
 
3
3
  name: <%= project_name %>
4
-
5
4
  windows:
6
5
  <% instances.each do |vm| %>
7
6
  - <%= vm.name %>/<%= vm.index %>:
8
7
  layout: main-vertical
8
+ pre: bosh ssh <%= vm.name %>/<%= vm.index %> <%= additional_args.join(' ') %>
9
9
  panes:
10
10
  - shell:
11
- - bosh ssh <%= vm.name %>/<%= vm.index %>
12
11
  - sudo su -
13
12
  - cd /var/vcap
14
13
  - monit:
15
- - bosh ssh <%= vm.name %>/<%= vm.index %>
16
14
  - sudo watch -n 1 /var/vcap/bosh/bin/monit summary
17
15
  - logs:
18
- - bosh ssh <%= vm.name %>/<%= vm.index %>
19
16
  - tail -f /var/vcap/sys/log/*/*
20
17
  <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmuxinator-bosh-console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steffen Uhlig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-18 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_cli
@@ -166,6 +166,7 @@ files:
166
166
  - ".ruby-version"
167
167
  - ".travis.yml"
168
168
  - Gemfile
169
+ - Gemfile.lock
169
170
  - Guardfile
170
171
  - LICENSE.txt
171
172
  - README.markdown