kuby-core 0.3.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -0
  3. data/README.md +3 -160
  4. data/kuby-core.gemspec +2 -1
  5. data/lib/kuby.rb +32 -17
  6. data/lib/kuby/definition.rb +20 -14
  7. data/lib/kuby/docker.rb +2 -1
  8. data/lib/kuby/docker/alpine.rb +0 -1
  9. data/lib/kuby/docker/assets_phase.rb +1 -1
  10. data/lib/kuby/docker/bundler_phase.rb +4 -2
  11. data/lib/kuby/docker/cli.rb +32 -0
  12. data/lib/kuby/docker/copy_phase.rb +1 -1
  13. data/lib/kuby/docker/errors.rb +1 -0
  14. data/lib/kuby/docker/inline_layer.rb +15 -0
  15. data/lib/kuby/docker/{phase.rb → layer.rb} +6 -5
  16. data/lib/kuby/docker/layer_stack.rb +30 -4
  17. data/lib/kuby/docker/metadata.rb +9 -1
  18. data/lib/kuby/docker/package_phase.rb +1 -1
  19. data/lib/kuby/docker/packages.rb +5 -4
  20. data/lib/kuby/docker/packages/simple_managed_package.rb +25 -0
  21. data/lib/kuby/docker/setup_phase.rb +1 -1
  22. data/lib/kuby/docker/spec.rb +4 -4
  23. data/lib/kuby/docker/timestamp_tag.rb +1 -1
  24. data/lib/kuby/docker/webserver_phase.rb +1 -1
  25. data/lib/kuby/docker/yarn_phase.rb +1 -1
  26. data/lib/kuby/environment.rb +22 -0
  27. data/lib/kuby/kubernetes.rb +1 -0
  28. data/lib/kuby/kubernetes/deploy_task.rb +33 -0
  29. data/lib/kuby/kubernetes/deployer.rb +1 -3
  30. data/lib/kuby/kubernetes/minikube_provider.rb +5 -5
  31. data/lib/kuby/kubernetes/plugins/nginx_ingress.rb +12 -0
  32. data/lib/kuby/kubernetes/plugins/rails_app/database.rb +30 -9
  33. data/lib/kuby/kubernetes/plugins/rails_app/generators/kuby.rb +83 -0
  34. data/lib/kuby/kubernetes/plugins/rails_app/mysql.rb +14 -4
  35. data/lib/kuby/kubernetes/plugins/rails_app/plugin.rb +15 -14
  36. data/lib/kuby/kubernetes/plugins/rails_app/postgres.rb +132 -0
  37. data/lib/kuby/kubernetes/plugins/rails_app/sqlite.rb +20 -0
  38. data/lib/kuby/kubernetes/plugins/rails_app/tasks.rake +9 -4
  39. data/lib/kuby/kubernetes/spec.rb +1 -1
  40. data/lib/kuby/railtie.rb +0 -4
  41. data/lib/kuby/tasks.rb +35 -0
  42. data/lib/kuby/tasks/kuby.rake +24 -17
  43. data/lib/kuby/version.rb +1 -1
  44. metadata +10 -5
@@ -1,62 +1,69 @@
1
+ require 'shellwords'
2
+
1
3
  namespace :kuby do
2
4
  def tasks
5
+ Kuby.load!
3
6
  @tasks ||= Kuby::Tasks.new(Kuby.definition)
4
7
  end
5
8
 
6
- task dockerfile: :environment do
9
+ task :dockerfile do
7
10
  tasks.print_dockerfile
8
11
  end
9
12
 
10
- task build: :environment do
13
+ task :build do
11
14
  tasks.build
12
15
  end
13
16
 
14
- task run: :environment do
17
+ task :run do
15
18
  tasks.run
16
19
  end
17
20
 
18
- task push: :environment do
21
+ task :push do
19
22
  tasks.push
20
23
  end
21
24
 
22
- task resources: :environment do
25
+ task :resources do
23
26
  tasks.print_resources
24
27
  end
25
28
 
26
- task deploy: :environment do
27
- Kuby.definition.kubernetes.deploy
29
+ task :kubectl, [:cmd] do |_, args|
30
+ tasks.kubectl(Shellwords.shellsplit(args[:cmd]))
31
+ end
32
+
33
+ task :deploy do
34
+ tasks.deploy
28
35
  end
29
36
 
30
- task rollback: :environment do
31
- Kuby.definition.kubernetes.rollback
37
+ task :rollback do
38
+ tasks.rollback
32
39
  end
33
40
 
34
- task kubeconfig: :environment do
41
+ task :kubeconfig do
35
42
  tasks.print_kubeconfig
36
43
  end
37
44
 
38
- task setup: :environment do
39
- Kuby.definition.kubernetes.setup
45
+ task :setup do
46
+ tasks.setup
40
47
  end
41
48
 
42
49
  namespace :remote do
43
- task logs: :environment do
50
+ task :logs do
44
51
  tasks.remote_logs
45
52
  end
46
53
 
47
- task status: :environment do
54
+ task :status do
48
55
  tasks.remote_status
49
56
  end
50
57
 
51
- task shell: :environment do
58
+ task :shell do
52
59
  tasks.remote_shell
53
60
  end
54
61
 
55
- task console: :environment do
62
+ task :console do
56
63
  tasks.remote_console
57
64
  end
58
65
 
59
- task dbconsole: :environment do
66
+ task :dbconsole do
60
67
  tasks.remote_dbconsole
61
68
  end
62
69
  end
@@ -1,3 +1,3 @@
1
1
  module Kuby
2
- VERSION = '0.3.0'
2
+ VERSION = '0.7.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-18 00:00:00.000000000 Z
11
+ date: 2020-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.1'
61
+ version: '0.2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.1'
68
+ version: '0.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: kube-dsl
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -164,6 +164,8 @@ files:
164
164
  - lib/kuby/docker/debian.rb
165
165
  - lib/kuby/docker/dockerfile.rb
166
166
  - lib/kuby/docker/errors.rb
167
+ - lib/kuby/docker/inline_layer.rb
168
+ - lib/kuby/docker/layer.rb
167
169
  - lib/kuby/docker/layer_stack.rb
168
170
  - lib/kuby/docker/local_tags.rb
169
171
  - lib/kuby/docker/metadata.rb
@@ -173,8 +175,8 @@ files:
173
175
  - lib/kuby/docker/packages/managed_package.rb
174
176
  - lib/kuby/docker/packages/nodejs.rb
175
177
  - lib/kuby/docker/packages/package.rb
178
+ - lib/kuby/docker/packages/simple_managed_package.rb
176
179
  - lib/kuby/docker/packages/yarn.rb
177
- - lib/kuby/docker/phase.rb
178
180
  - lib/kuby/docker/remote_tags.rb
179
181
  - lib/kuby/docker/setup_phase.rb
180
182
  - lib/kuby/docker/spec.rb
@@ -182,7 +184,9 @@ files:
182
184
  - lib/kuby/docker/timestamp_tag.rb
183
185
  - lib/kuby/docker/webserver_phase.rb
184
186
  - lib/kuby/docker/yarn_phase.rb
187
+ - lib/kuby/environment.rb
185
188
  - lib/kuby/kubernetes.rb
189
+ - lib/kuby/kubernetes/deploy_task.rb
186
190
  - lib/kuby/kubernetes/deployer.rb
187
191
  - lib/kuby/kubernetes/docker_config.rb
188
192
  - lib/kuby/kubernetes/errors.rb
@@ -193,6 +197,7 @@ files:
193
197
  - lib/kuby/kubernetes/plugins/nginx_ingress.rb
194
198
  - lib/kuby/kubernetes/plugins/rails_app.rb
195
199
  - lib/kuby/kubernetes/plugins/rails_app/database.rb
200
+ - lib/kuby/kubernetes/plugins/rails_app/generators/kuby.rb
196
201
  - lib/kuby/kubernetes/plugins/rails_app/mysql.rb
197
202
  - lib/kuby/kubernetes/plugins/rails_app/plugin.rb
198
203
  - lib/kuby/kubernetes/plugins/rails_app/postgres.rb