rhea 0.1.0 → 0.2.0

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -2
  3. data/Dockerfile +29 -0
  4. data/README.md +84 -41
  5. data/app/assets/stylesheets/rhea/layout.css.sass +3 -0
  6. data/app/controllers/rhea/commands_controller.rb +0 -1
  7. data/app/views/rhea/commands/_form.html.haml +7 -2
  8. data/app/views/rhea/commands/_table.html.haml +8 -7
  9. data/app/views/rhea/commands/index.html.haml +35 -28
  10. data/app/views/rhea/events/index.html.haml +3 -3
  11. data/app/views/rhea/nodes/index.html.haml +2 -2
  12. data/credentials/.gitkeep +0 -0
  13. data/examples/rhea-rails/.gitignore +13 -0
  14. data/examples/rhea-rails/Gemfile +4 -0
  15. data/examples/rhea-rails/README.rdoc +28 -0
  16. data/examples/rhea-rails/Rakefile +6 -0
  17. data/examples/rhea-rails/app/assets/images/.keep +0 -0
  18. data/examples/rhea-rails/app/assets/javascripts/application.js +1 -0
  19. data/examples/rhea-rails/app/assets/stylesheets/application.css +15 -0
  20. data/examples/rhea-rails/app/controllers/application_controller.rb +5 -0
  21. data/examples/rhea-rails/app/controllers/concerns/.keep +0 -0
  22. data/examples/rhea-rails/app/helpers/application_helper.rb +2 -0
  23. data/examples/rhea-rails/app/mailers/.keep +0 -0
  24. data/examples/rhea-rails/app/models/.keep +0 -0
  25. data/examples/rhea-rails/app/models/concerns/.keep +0 -0
  26. data/examples/rhea-rails/app/views/layouts/application.html.erb +14 -0
  27. data/examples/rhea-rails/bin/bundle +3 -0
  28. data/examples/rhea-rails/bin/rails +9 -0
  29. data/examples/rhea-rails/bin/rake +9 -0
  30. data/examples/rhea-rails/bin/setup +29 -0
  31. data/examples/rhea-rails/bin/spring +15 -0
  32. data/examples/rhea-rails/config.ru +4 -0
  33. data/examples/rhea-rails/config/application.rb +32 -0
  34. data/examples/rhea-rails/config/boot.rb +3 -0
  35. data/examples/rhea-rails/config/environment.rb +5 -0
  36. data/examples/rhea-rails/config/environments/development.rb +38 -0
  37. data/examples/rhea-rails/config/environments/production.rb +76 -0
  38. data/examples/rhea-rails/config/environments/test.rb +42 -0
  39. data/examples/rhea-rails/config/initializers/assets.rb +11 -0
  40. data/examples/rhea-rails/config/initializers/backtrace_silencers.rb +7 -0
  41. data/examples/rhea-rails/config/initializers/cookies_serializer.rb +3 -0
  42. data/examples/rhea-rails/config/initializers/filter_parameter_logging.rb +4 -0
  43. data/examples/rhea-rails/config/initializers/inflections.rb +16 -0
  44. data/examples/rhea-rails/config/initializers/mime_types.rb +4 -0
  45. data/examples/rhea-rails/config/initializers/session_store.rb +3 -0
  46. data/examples/rhea-rails/config/initializers/wrap_parameters.rb +9 -0
  47. data/examples/rhea-rails/config/locales/en.yml +23 -0
  48. data/examples/rhea-rails/config/routes.rb +3 -0
  49. data/examples/rhea-rails/config/secrets.yml +22 -0
  50. data/examples/rhea-rails/db/seeds.rb +7 -0
  51. data/examples/rhea-rails/lib/assets/.keep +0 -0
  52. data/examples/rhea-rails/lib/tasks/.keep +0 -0
  53. data/examples/rhea-rails/log/.keep +0 -0
  54. data/examples/rhea-rails/public/404.html +67 -0
  55. data/examples/rhea-rails/public/422.html +67 -0
  56. data/examples/rhea-rails/public/500.html +66 -0
  57. data/examples/rhea-rails/public/favicon.ico +0 -0
  58. data/examples/rhea-rails/public/robots.txt +5 -0
  59. data/examples/rhea-rails/vendor/assets/javascripts/.keep +0 -0
  60. data/examples/rhea-rails/vendor/assets/stylesheets/.keep +0 -0
  61. data/lib/rhea/command_type.rb +3 -1
  62. data/lib/rhea/version.rb +1 -1
  63. data/rhea.gemspec +1 -1
  64. data/rhea.rb.example +16 -0
  65. metadata +57 -5
  66. data/app/views/rhea/command_types/_list.html.haml +0 -5
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_rhea-tester_session'
@@ -0,0 +1,9 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+ mount Rhea::Engine => '/'
3
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: lol
15
+
16
+ test:
17
+ secret_key_base: lol
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
File without changes
File without changes
File without changes
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -29,7 +29,9 @@ module Rhea
29
29
  end
30
30
 
31
31
  def self.options_for_select
32
- all.map { |command_type| [command_type.name, command_type.key] }
32
+ all.map do |command_type|
33
+ [command_type.name, command_type.key, :'data-syntax' => command_type.displayed_format]
34
+ end
33
35
  end
34
36
  end
35
37
  end
@@ -1,3 +1,3 @@
1
1
  module Rhea
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.version = Rhea::VERSION
13
13
  s.license = 'MIT'
14
14
 
15
- s.add_dependency 'kubeclient', '~> 0.3.0'
15
+ s.add_dependency 'kubeclient', '~> 1.1.3'
16
16
  s.add_dependency 'haml', '~> 4.0'
17
17
  s.add_dependency 'kaminari', '~> 0.16'
18
18
  s.add_dependency 'sass-rails', '~> 5.0'
@@ -0,0 +1,16 @@
1
+ require 'rhea'
2
+
3
+ Rhea.configure do |config|
4
+ config.kube_api = {
5
+ options: {
6
+ ssl_options: {
7
+ client_key: OpenSSL::PKey::RSA.new(Rails.root.join('config', 'credentials', 'apiserver.key').read),
8
+ client_cert: OpenSSL::X509::Certificate.new(Rails.root.join('config', 'credentials', 'apiserver.crt').read),
9
+ ca_file: Rails.root.join('config', 'credentials', 'ca.crt').to_s,
10
+ verify_ssl: OpenSSL::SSL::VERIFY_PEER
11
+ }
12
+ },
13
+ url: 'https://kubernetes.example.com/api/'
14
+ }
15
+ config.default_image = 'docker.registry.com/myworker:latest'
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Benner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-09 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kubeclient
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.0
19
+ version: 1.1.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.0
26
+ version: 1.1.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: haml
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -130,6 +130,7 @@ extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
132
  - ".gitignore"
133
+ - Dockerfile
133
134
  - Gemfile
134
135
  - MIT-LICENSE
135
136
  - README.md
@@ -145,7 +146,6 @@ files:
145
146
  - app/controllers/rhea/nodes_controller.rb
146
147
  - app/controllers/rhea/system_services_controller.rb
147
148
  - app/helpers/rhea/helper.rb
148
- - app/views/rhea/command_types/_list.html.haml
149
149
  - app/views/rhea/commands/_form.html.haml
150
150
  - app/views/rhea/commands/_table.html.haml
151
151
  - app/views/rhea/commands/index.html.haml
@@ -155,11 +155,61 @@ files:
155
155
  - app/views/rhea/nodes/index.html.haml
156
156
  - app/views/rhea/system_services/index.html.haml
157
157
  - config/routes.rb
158
+ - credentials/.gitkeep
158
159
  - docs/commands.gif
159
160
  - docs/commands.mov
160
161
  - docs/events.png
161
162
  - docs/logo.png
162
163
  - docs/nodes.png
164
+ - examples/rhea-rails/.gitignore
165
+ - examples/rhea-rails/Gemfile
166
+ - examples/rhea-rails/Gemfile.lock
167
+ - examples/rhea-rails/README.rdoc
168
+ - examples/rhea-rails/Rakefile
169
+ - examples/rhea-rails/app/assets/images/.keep
170
+ - examples/rhea-rails/app/assets/javascripts/application.js
171
+ - examples/rhea-rails/app/assets/stylesheets/application.css
172
+ - examples/rhea-rails/app/controllers/application_controller.rb
173
+ - examples/rhea-rails/app/controllers/concerns/.keep
174
+ - examples/rhea-rails/app/helpers/application_helper.rb
175
+ - examples/rhea-rails/app/mailers/.keep
176
+ - examples/rhea-rails/app/models/.keep
177
+ - examples/rhea-rails/app/models/concerns/.keep
178
+ - examples/rhea-rails/app/views/layouts/application.html.erb
179
+ - examples/rhea-rails/bin/bundle
180
+ - examples/rhea-rails/bin/rails
181
+ - examples/rhea-rails/bin/rake
182
+ - examples/rhea-rails/bin/setup
183
+ - examples/rhea-rails/bin/spring
184
+ - examples/rhea-rails/config.ru
185
+ - examples/rhea-rails/config/application.rb
186
+ - examples/rhea-rails/config/boot.rb
187
+ - examples/rhea-rails/config/environment.rb
188
+ - examples/rhea-rails/config/environments/development.rb
189
+ - examples/rhea-rails/config/environments/production.rb
190
+ - examples/rhea-rails/config/environments/test.rb
191
+ - examples/rhea-rails/config/initializers/assets.rb
192
+ - examples/rhea-rails/config/initializers/backtrace_silencers.rb
193
+ - examples/rhea-rails/config/initializers/cookies_serializer.rb
194
+ - examples/rhea-rails/config/initializers/filter_parameter_logging.rb
195
+ - examples/rhea-rails/config/initializers/inflections.rb
196
+ - examples/rhea-rails/config/initializers/mime_types.rb
197
+ - examples/rhea-rails/config/initializers/session_store.rb
198
+ - examples/rhea-rails/config/initializers/wrap_parameters.rb
199
+ - examples/rhea-rails/config/locales/en.yml
200
+ - examples/rhea-rails/config/routes.rb
201
+ - examples/rhea-rails/config/secrets.yml
202
+ - examples/rhea-rails/db/seeds.rb
203
+ - examples/rhea-rails/lib/assets/.keep
204
+ - examples/rhea-rails/lib/tasks/.keep
205
+ - examples/rhea-rails/log/.keep
206
+ - examples/rhea-rails/public/404.html
207
+ - examples/rhea-rails/public/422.html
208
+ - examples/rhea-rails/public/500.html
209
+ - examples/rhea-rails/public/favicon.ico
210
+ - examples/rhea-rails/public/robots.txt
211
+ - examples/rhea-rails/vendor/assets/javascripts/.keep
212
+ - examples/rhea-rails/vendor/assets/stylesheets/.keep
163
213
  - fixtures/vcr_cassettes/Rhea_Kubernetes_Commands_All/_perform/an_existing_rc/returns_the_rc.yml
164
214
  - fixtures/vcr_cassettes/Rhea_Kubernetes_Commands_Delete/_perform/an_existing_rc/deletes_the_rc.yml
165
215
  - fixtures/vcr_cassettes/Rhea_Kubernetes_Commands_Export/_perform/an_existing_rc/returns_the_data.yml
@@ -189,6 +239,7 @@ files:
189
239
  - lib/rhea/kubernetes/system_services.rb
190
240
  - lib/rhea/version.rb
191
241
  - rhea.gemspec
242
+ - rhea.rb.example
192
243
  - spec/lib/rhea/kubernetes/commands/all_spec.rb
193
244
  - spec/lib/rhea/kubernetes/commands/delete_spec.rb
194
245
  - spec/lib/rhea/kubernetes/commands/export_spec.rb
@@ -225,3 +276,4 @@ signing_key:
225
276
  specification_version: 4
226
277
  summary: A web UI for managing a Kubernetes cluster
227
278
  test_files: []
279
+ has_rdoc: