kuber_kit 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -1
  3. data/README.md +16 -3
  4. data/TODO.md +1 -3
  5. data/example/configurations/review.rb +2 -1
  6. data/example/images/app_sources/Dockerfile +1 -1
  7. data/example/images/ruby_app/image.rb +4 -4
  8. data/example/infrastructure/build_servers.rb +8 -0
  9. data/kuber_kit.gemspec +1 -0
  10. data/lib/kuber_kit.rb +36 -19
  11. data/lib/kuber_kit/actions/configuration_loader.rb +3 -0
  12. data/lib/kuber_kit/actions/env_file_reader.rb +3 -0
  13. data/lib/kuber_kit/actions/image_compiler.rb +14 -10
  14. data/lib/kuber_kit/actions/kubectl_applier.rb +4 -1
  15. data/lib/kuber_kit/actions/service_deployer.rb +4 -0
  16. data/lib/kuber_kit/actions/service_reader.rb +4 -0
  17. data/lib/kuber_kit/actions/template_reader.rb +3 -0
  18. data/lib/kuber_kit/cli.rb +12 -6
  19. data/lib/kuber_kit/configs.rb +24 -22
  20. data/lib/kuber_kit/container.rb +17 -13
  21. data/lib/kuber_kit/core/artifacts/artifact_store.rb +9 -28
  22. data/lib/kuber_kit/core/build_servers/abstract_build_server.rb +21 -0
  23. data/lib/kuber_kit/core/build_servers/build_server.rb +24 -0
  24. data/lib/kuber_kit/core/build_servers/build_server_store.rb +18 -0
  25. data/lib/kuber_kit/core/configuration.rb +7 -3
  26. data/lib/kuber_kit/core/configuration_definition.rb +10 -0
  27. data/lib/kuber_kit/core/configuration_factory.rb +10 -1
  28. data/lib/kuber_kit/core/configuration_store.rb +14 -24
  29. data/lib/kuber_kit/core/env_files/env_file_store.rb +8 -23
  30. data/lib/kuber_kit/core/image_store.rb +8 -18
  31. data/lib/kuber_kit/core/registries/registry_store.rb +8 -23
  32. data/lib/kuber_kit/core/service_store.rb +13 -23
  33. data/lib/kuber_kit/core/store.rb +48 -0
  34. data/lib/kuber_kit/core/templates/template_store.rb +9 -28
  35. data/lib/kuber_kit/image_compiler/build_server_pool.rb +30 -0
  36. data/lib/kuber_kit/image_compiler/build_server_pool_factory.rb +13 -0
  37. data/lib/kuber_kit/image_compiler/image_build_dir_creator.rb +13 -7
  38. data/lib/kuber_kit/image_compiler/image_dependency_resolver.rb +25 -5
  39. data/lib/kuber_kit/preprocessing/file_preprocessor.rb +5 -4
  40. data/lib/kuber_kit/shell/abstract_shell.rb +4 -0
  41. data/lib/kuber_kit/shell/{bash_commands.rb → commands/bash_commands.rb} +1 -1
  42. data/lib/kuber_kit/shell/{docker_commands.rb → commands/docker_commands.rb} +1 -1
  43. data/lib/kuber_kit/shell/{git_commands.rb → commands/git_commands.rb} +1 -1
  44. data/lib/kuber_kit/shell/{kubectl_commands.rb → commands/kubectl_commands.rb} +1 -1
  45. data/lib/kuber_kit/shell/{rsync_commands.rb → commands/rsync_commands.rb} +9 -3
  46. data/lib/kuber_kit/shell/local_shell.rb +24 -5
  47. data/lib/kuber_kit/shell/ssh_session.rb +60 -0
  48. data/lib/kuber_kit/shell/ssh_shell.rb +77 -0
  49. data/lib/kuber_kit/tools/file_presence_checker.rb +6 -2
  50. data/lib/kuber_kit/version.rb +1 -1
  51. metadata +30 -9
  52. data/lib/kuber_kit/preprocessing/dir_preprocessor.rb +0 -19
  53. data/lib/kuber_kit/tools/files_sync.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37500e0f3feb9e241251e04ae72ed0cc618d5dadf3e1c660a05658a0e5fefa15
4
- data.tar.gz: 82d7c67f5f421fed5cbb94f14ad153dcb6f6f2f068817ffd518f6c0ea7cfe3f8
3
+ metadata.gz: b7fcc957995bcc680107ef41f95ef77d5ee20dda2c0063d31e21bf339ccdae2d
4
+ data.tar.gz: 80561e6e2562b9f195e6725c9dfcd785d36d741b4cf1779c7ccf1d071193c5ec
5
5
  SHA512:
6
- metadata.gz: 63c544b4ee93bf01f7d36720effff85052643583b008d68327c10bcbceb5711bce976856da1e6c56c9f877720eb2735447574e534f9f97a966777156ee01bda3
7
- data.tar.gz: d388233a8636e884ee033971bf8365f3b5e753dc43a22b5e03702dda764e0632003dc80448fd7a9f3378e98539e06bc25f8163dcd6c85fdd67afddba2f141c80
6
+ metadata.gz: bd95c6391e1880cbe6e92eb43fc13278da1cef2bcf47c0bd0e2aab66932c640bf8c709dae8df5b36961baf19d41acd6c846907f27cab237a7d37113642d6b8ee
7
+ data.tar.gz: 433d47c04f1a8f61e55e6dd664ab0818c0e687769cd29e9985acd74886abd2e5f4a2dacede60839c85797d71fa887e1196c61076837f6813c4fb55ac00fc25c2
@@ -1,10 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kuber_kit (0.1.8)
4
+ kuber_kit (0.1.9)
5
5
  cli-ui
6
6
  contracts-lite
7
7
  dry-auto_inject
8
+ net-ssh
8
9
  thor
9
10
 
10
11
  GEM
@@ -29,6 +30,7 @@ GEM
29
30
  concurrent-ruby (~> 1.0)
30
31
  dry-equalizer (0.3.0)
31
32
  method_source (1.0.0)
33
+ net-ssh (6.1.0)
32
34
  pry (0.13.1)
33
35
  coderay (~> 1.1)
34
36
  method_source (~> 1.0)
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # Docker Kit
1
+ # KuberKit
2
+
3
+ [![Codeship Status for ArtStation/kuber_kit](https://app.codeship.com/projects/1286f0a6-3f90-4c1b-b426-721ed8a6571b/status?branch=master)](https://app.codeship.com/projects/417264)
4
+
5
+ Solution for building & deploying applications on Kubernetes, written in Ruby.
2
6
 
3
7
  ## Installation
4
8
 
@@ -8,12 +12,21 @@ Add this line to your application's Gemfile:
8
12
  gem 'kuber_kit'
9
13
  ```
10
14
 
11
- ## Launch compilation for example images
15
+ ## Development
16
+
17
+ ### Launch compilation
18
+
19
+ ```
20
+ bin/kit compile ruby_app,ruby_app2 --path=./example
21
+ ```
22
+
23
+ ### Launch deployment
12
24
 
13
25
  ```
14
- bin/kit compile ruby_app,ruby_app2 --path=./example -C review
26
+ bin/kit compile -s ruby_app,ruby_app2 --path=./example
15
27
  ```
16
28
 
29
+
17
30
  ## License
18
31
 
19
32
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/TODO.md CHANGED
@@ -1,6 +1,4 @@
1
- - limit amount of simultaneous image builds
2
1
  - list services and require confirmation before deployment
3
- - service factory should make sure that template exists
4
- - add build servers support
5
2
  - add build vars support (use images instead of containers)
3
+ - template should be able to set default attributes
6
4
  - template should be able to depend on image?
@@ -1,4 +1,5 @@
1
1
  KuberKit
2
2
  .define_configuration(:review)
3
3
  .use_registry(:review_default, as: :default)
4
- .use_artifact(:kuber_kit_repo, as: :kuber_kit_repo)
4
+ .use_artifact(:kuber_kit_repo, as: :kuber_kit_repo)
5
+ .use_build_server(:remote_bs)
@@ -1,4 +1,4 @@
1
- FROM default/ruby
1
+ FROM <%= image_url(:ruby) %>
2
2
 
3
3
  RUN mkdir -p /app
4
4
  WORKDIR /app
@@ -3,13 +3,13 @@ KuberKit
3
3
  .registry(:default)
4
4
  .depends_on(:ruby, :app_sources)
5
5
  .before_build do |context_helper, build_dir|
6
- # copy file local artifact
6
+ # copy file: local artifact
7
7
  source_path = context_helper.artifact_path(:kuber_kit_example_data, "test.txt")
8
8
  target_path = File.join(build_dir, "test.txt")
9
- context_helper.shell.exec!("cp #{source_path} #{target_path}")
9
+ context_helper.shell.sync(source_path, target_path)
10
10
 
11
- # copy file local artifact
11
+ # copy file: remote artifact
12
12
  source_path = context_helper.artifact_path(:kuber_kit_repo, "README.md")
13
13
  target_path = File.join(build_dir, "README.md")
14
- context_helper.shell.exec!("cp #{source_path} #{target_path}")
14
+ context_helper.shell.sync(source_path, target_path)
15
15
  end
@@ -0,0 +1,8 @@
1
+ ENV['SSH_TEST_HOST'] ||= "indocker.artstn.ninja"
2
+ ENV['SSH_TEST_USER'] ||= "kuber_kit"
3
+
4
+ KuberKit.add_build_server(
5
+ KuberKit::Core::BuildServers::BuildServer
6
+ .new(:remote_bs)
7
+ .setup(host: ENV['SSH_TEST_HOST'], user: ENV['SSH_TEST_USER'], port: 22)
8
+ )
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "dry-auto_inject"
28
28
  spec.add_dependency "thor"
29
29
  spec.add_dependency "cli-ui"
30
+ spec.add_dependency "net-ssh"
30
31
 
31
32
  spec.add_development_dependency "bundler", "~> 1.17"
32
33
  spec.add_development_dependency "rake", "~> 10.0"
@@ -31,18 +31,7 @@ module KuberKit
31
31
  autoload :ConfigurationFactory, 'core/configuration_factory'
32
32
  autoload :Configuration, 'core/configuration'
33
33
 
34
- module ContextHelper
35
- autoload :BaseHelper, 'core/context_helper/base_helper'
36
- autoload :ImageHelper, 'core/context_helper/image_helper'
37
- autoload :ServiceHelper, 'core/context_helper/service_helper'
38
- autoload :ContextHelperFactory, 'core/context_helper/context_helper_factory'
39
- end
40
-
41
- module Registries
42
- autoload :AbstractRegistry, 'core/registries/abstract_registry'
43
- autoload :RegistryStore, 'core/registries/registry_store'
44
- autoload :Registry, 'core/registries/registry'
45
- end
34
+ autoload :Store, 'core/store'
46
35
 
47
36
  module Artifacts
48
37
  autoload :AbstractArtifact, 'core/artifacts/abstract_artifact'
@@ -51,12 +40,31 @@ module KuberKit
51
40
  autoload :Local, 'core/artifacts/local'
52
41
  end
53
42
 
43
+ module BuildServers
44
+ autoload :AbstractBuildServer, 'core/build_servers/abstract_build_server'
45
+ autoload :BuildServerStore, 'core/build_servers/build_server_store'
46
+ autoload :BuildServer, 'core/build_servers/build_server'
47
+ end
48
+
54
49
  module EnvFiles
55
50
  autoload :EnvFileStore, 'core/env_files/env_file_store'
56
51
  autoload :AbstractEnvFile, 'core/env_files/abstract_env_file'
57
52
  autoload :ArtifactFile, 'core/env_files/artifact_file'
58
53
  end
59
54
 
55
+ module ContextHelper
56
+ autoload :BaseHelper, 'core/context_helper/base_helper'
57
+ autoload :ImageHelper, 'core/context_helper/image_helper'
58
+ autoload :ServiceHelper, 'core/context_helper/service_helper'
59
+ autoload :ContextHelperFactory, 'core/context_helper/context_helper_factory'
60
+ end
61
+
62
+ module Registries
63
+ autoload :AbstractRegistry, 'core/registries/abstract_registry'
64
+ autoload :RegistryStore, 'core/registries/registry_store'
65
+ autoload :Registry, 'core/registries/registry'
66
+ end
67
+
60
68
  module Templates
61
69
  autoload :TemplateStore, 'core/templates/template_store'
62
70
  autoload :AbstractTemplate, 'core/templates/abstract_template'
@@ -67,22 +75,28 @@ module KuberKit
67
75
  module Tools
68
76
  autoload :FilePresenceChecker, 'tools/file_presence_checker'
69
77
  autoload :LoggerFactory, 'tools/logger_factory'
70
- autoload :FilesSync, 'tools/files_sync'
71
78
  end
72
79
 
73
80
  module Shell
74
81
  autoload :AbstractShell, 'shell/abstract_shell'
75
82
  autoload :LocalShell, 'shell/local_shell'
83
+ autoload :SshShell, 'shell/ssh_shell'
84
+ autoload :SshSession, 'shell/ssh_session'
76
85
  autoload :CommandCounter, 'shell/command_counter'
77
- autoload :BashCommands, 'shell/bash_commands'
78
- autoload :DockerCommands, 'shell/docker_commands'
79
- autoload :GitCommands, 'shell/git_commands'
80
- autoload :RsyncCommands, 'shell/rsync_commands'
81
- autoload :KubectlCommands, 'shell/kubectl_commands'
86
+
87
+ module Commands
88
+ autoload :BashCommands, 'shell/commands/bash_commands'
89
+ autoload :DockerCommands, 'shell/commands/docker_commands'
90
+ autoload :GitCommands, 'shell/commands/git_commands'
91
+ autoload :RsyncCommands, 'shell/commands/rsync_commands'
92
+ autoload :KubectlCommands, 'shell/commands/kubectl_commands'
93
+ end
82
94
  end
83
95
 
84
96
  module ImageCompiler
85
97
  autoload :ActionHandler, 'image_compiler/action_handler'
98
+ autoload :BuildServerPool, 'image_compiler/build_server_pool'
99
+ autoload :BuildServerPoolFactory, 'image_compiler/build_server_pool_factory'
86
100
  autoload :Compiler, 'image_compiler/compiler'
87
101
  autoload :ImageBuilder, 'image_compiler/image_builder'
88
102
  autoload :ImageBuildDirCreator, 'image_compiler/image_build_dir_creator'
@@ -93,7 +107,6 @@ module KuberKit
93
107
  module Preprocessing
94
108
  autoload :TextPreprocessor, 'preprocessing/text_preprocessor'
95
109
  autoload :FilePreprocessor, 'preprocessing/file_preprocessor'
96
- autoload :DirPreprocessor, 'preprocessing/dir_preprocessor'
97
110
  end
98
111
 
99
112
  module ArtifactsSync
@@ -212,6 +225,10 @@ module KuberKit
212
225
  Container["core.template_store"].add(template)
213
226
  end
214
227
 
228
+ def add_build_server(build_server)
229
+ Container["core.build_server_store"].add(build_server)
230
+ end
231
+
215
232
  def build_helper(&proc)
216
233
  KuberKit::Core::ContextHelper::BaseHelper.class_exec(&proc)
217
234
  end
@@ -50,8 +50,11 @@ class KuberKit::Actions::ConfigurationLoader
50
50
  files = service_store.load_definitions(services_path)
51
51
  task.update_title("Loaded #{files.count} service definitions")
52
52
  end
53
+
54
+ true
53
55
  rescue KuberKit::Error => e
54
56
  ui.print_error("Error", e.message)
57
+ false
55
58
  end
56
59
 
57
60
  def load_configurations(configurations_path, configuration_name)
@@ -11,7 +11,10 @@ class KuberKit::Actions::EnvFileReader
11
11
  def call(env_file_name, options)
12
12
  result = env_file_reader.call(local_shell, env_file_name)
13
13
  ui.print_info(env_file_name.to_s, JSON.pretty_generate(result))
14
+
15
+ true
14
16
  rescue KuberKit::Error => e
15
17
  ui.print_error("Error", e.message)
18
+ false
16
19
  end
17
20
  end
@@ -1,6 +1,7 @@
1
1
  class KuberKit::Actions::ImageCompiler
2
2
  include KuberKit::Import[
3
3
  "image_compiler.image_dependency_resolver",
4
+ "image_compiler.build_server_pool_factory",
4
5
  "shell.local_shell",
5
6
  "tools.logger",
6
7
  "ui",
@@ -10,29 +11,32 @@ class KuberKit::Actions::ImageCompiler
10
11
  Contract ArrayOf[Symbol], Hash => Any
11
12
  def call(image_names, options)
12
13
  build_id = generate_build_id
14
+ build_server_pool = build_server_pool_factory.create()
13
15
 
14
- resolved_dependencies = []
15
- dependencies = image_dependency_resolver.get_next(image_names)
16
-
17
- while (dependencies - resolved_dependencies).any?
18
- compile_simultaneously(dependencies, build_id)
19
- resolved_dependencies += dependencies
20
- dependencies = image_dependency_resolver.get_next(image_names, resolved: resolved_dependencies)
16
+ image_dependency_resolver.each_with_deps(image_names) do |dep_image_names|
17
+ result = compile_simultaneously(dep_image_names, build_id, build_server_pool)
18
+ abort unless result
21
19
  end
22
20
 
23
- compile_simultaneously(image_names - resolved_dependencies, build_id)
21
+ build_server_pool.disconnect_all
22
+
23
+ true
24
24
  rescue KuberKit::Error => e
25
25
  ui.print_error("Error", e.message)
26
+
27
+ false
26
28
  end
27
29
 
28
30
  private
29
- def compile_simultaneously(image_names, build_id)
31
+ def compile_simultaneously(image_names, build_id, build_server_pool)
30
32
  task_group = ui.create_task_group
31
33
  image_names.map do |image_name|
32
34
 
33
35
  logger.info("Started compiling: #{image_name.to_s.green}")
34
36
  task_group.add("Compiling #{image_name.to_s.yellow}") do |task|
35
- image_compiler.call(local_shell, image_name, build_id)
37
+ shell = build_server_pool.get_shell
38
+
39
+ image_compiler.call(shell, image_name, build_id)
36
40
 
37
41
  task.update_title("Compiled #{image_name.to_s.green}")
38
42
  logger.info("Finished compiling: #{image_name.to_s.green}")
@@ -12,8 +12,11 @@ class KuberKit::Actions::KubectlApplier
12
12
  kubectl_commands.apply_file(local_shell, file_path, kubeconfig_path: kubeconfig_path)
13
13
  task.update_title("Applied file: #{file_path}")
14
14
  end
15
- nil
15
+
16
+ true
16
17
  rescue KuberKit::Error => e
17
18
  ui.print_error("Error", e.message)
19
+
20
+ false
18
21
  end
19
22
  end
@@ -31,8 +31,12 @@ class KuberKit::Actions::ServiceDeployer
31
31
 
32
32
  compile_images(images_names)
33
33
  deploy_services(service_names)
34
+
35
+ true
34
36
  rescue KuberKit::Error => e
35
37
  ui.print_error("Error", e.message)
38
+
39
+ false
36
40
  end
37
41
 
38
42
  def deploy_services(service_names)
@@ -10,7 +10,11 @@ class KuberKit::Actions::ServiceReader
10
10
  result = service_reader.call(local_shell, service_name)
11
11
 
12
12
  ui.print_info(service_name.to_s, result)
13
+
14
+ true
13
15
  rescue KuberKit::Error => e
14
16
  ui.print_error("Error", e.message)
17
+
18
+ false
15
19
  end
16
20
  end
@@ -13,7 +13,10 @@ class KuberKit::Actions::TemplateReader
13
13
  result = reader.read(local_shell, template)
14
14
 
15
15
  ui.print_info(template_name.to_s, result)
16
+
17
+ true
16
18
  rescue KuberKit::Error => e
17
19
  ui.print_error("Error", e.message)
20
+ false
18
21
  end
19
22
  end
@@ -15,12 +15,18 @@ class KuberKit::CLI < Thor
15
15
  image_names = image_names_str.split(",").map(&:strip).map(&:to_sym)
16
16
 
17
17
  KuberKit::Container['actions.configuration_loader'].call(options)
18
- KuberKit::Container['actions.image_compiler'].call(image_names, options)
19
-
20
- logger = KuberKit::Container['tools.logger']
21
- logger.info("---------------------------")
22
- logger.info("Image compilation finished!")
23
- logger.info("---------------------------")
18
+ result = KuberKit::Container['actions.image_compiler'].call(image_names, options)
19
+
20
+ if result
21
+ logger = KuberKit::Container['tools.logger']
22
+ logger.info("---------------------------")
23
+ logger.info("Image compilation finished!")
24
+ logger.info("---------------------------")
25
+ else
26
+ logger.info("-------------------------".red)
27
+ logger.info("Image compilation failed!".red)
28
+ logger.info("-------------------------".red)
29
+ end
24
30
  end
25
31
 
26
32
  desc "env ENV_FILE_NAME", "Return content of Env File ENV_FILE_NAME"
@@ -14,33 +14,35 @@ class KuberKit::Configs
14
14
  'tmp',
15
15
  'logs'
16
16
  ]
17
- KUBER_KIT_DIRNAME = "kuber_kit".freeze
18
- IMAGES_DIRNAME = "images".freeze
19
- SERVICES_DIRNAME = "services".freeze
20
- INFRA_DIRNAME = "infrastructure".freeze
21
- CONFIGURATIONS_DIRNAME = "configurations".freeze
22
- ARTIFACT_CLONE_DIR = "/tmp/kuber_kit/artifacts"
23
- SERVICE_CONFIG_DIR = "/tmp/kuber_kit/services"
24
- DEPLOY_STRATEGY = :kubernetes
17
+ KUBER_KIT_DIRNAME = "kuber_kit".freeze
18
+ IMAGES_DIRNAME = "images".freeze
19
+ SERVICES_DIRNAME = "services".freeze
20
+ INFRA_DIRNAME = "infrastructure".freeze
21
+ CONFIGURATIONS_DIRNAME = "configurations".freeze
22
+ ARTIFACT_CLONE_DIR = "/tmp/kuber_kit/artifacts"
23
+ SERVICE_CONFIG_DIR = "/tmp/kuber_kit/services"
24
+ DEPLOY_STRATEGY = :kubernetes
25
+ COMPILE_SIMULTANEOUS_LIMIT = 5
25
26
 
26
27
  attr_accessor :image_dockerfile_name, :image_build_context_dir, :image_tag,
27
28
  :docker_ignore_list, :image_compile_dir,
28
29
  :kuber_kit_dirname, :images_dirname, :services_dirname, :infra_dirname, :configurations_dirname,
29
- :artifact_clone_dir, :service_config_dir, :deploy_strategy
30
+ :artifact_clone_dir, :service_config_dir, :deploy_strategy, :compile_simultaneous_limit
30
31
 
31
32
  def initialize
32
- @image_dockerfile_name = IMAGE_DOCKERFILE_NAME
33
- @image_build_context_dir = IMAGE_BUILD_CONTEXT_DIR
34
- @image_tag = IMAGE_TAG
35
- @image_compile_dir = IMAGE_COMPILE_DIR
36
- @docker_ignore_list = DOCKER_IGNORE_LIST
37
- @kuber_kit_dirname = KUBER_KIT_DIRNAME
38
- @images_dirname = IMAGES_DIRNAME
39
- @services_dirname = SERVICES_DIRNAME
40
- @infra_dirname = INFRA_DIRNAME
41
- @configurations_dirname = CONFIGURATIONS_DIRNAME
42
- @artifact_clone_dir = ARTIFACT_CLONE_DIR
43
- @service_config_dir = SERVICE_CONFIG_DIR
44
- @deploy_strategy = DEPLOY_STRATEGY
33
+ @image_dockerfile_name = IMAGE_DOCKERFILE_NAME
34
+ @image_build_context_dir = IMAGE_BUILD_CONTEXT_DIR
35
+ @image_tag = IMAGE_TAG
36
+ @image_compile_dir = IMAGE_COMPILE_DIR
37
+ @docker_ignore_list = DOCKER_IGNORE_LIST
38
+ @kuber_kit_dirname = KUBER_KIT_DIRNAME
39
+ @images_dirname = IMAGES_DIRNAME
40
+ @services_dirname = SERVICES_DIRNAME
41
+ @infra_dirname = INFRA_DIRNAME
42
+ @configurations_dirname = CONFIGURATIONS_DIRNAME
43
+ @artifact_clone_dir = ARTIFACT_CLONE_DIR
44
+ @service_config_dir = SERVICE_CONFIG_DIR
45
+ @deploy_strategy = DEPLOY_STRATEGY
46
+ @compile_simultaneous_limit = COMPILE_SIMULTANEOUS_LIMIT
45
47
  end
46
48
  end
@@ -69,18 +69,22 @@ class KuberKit::Container
69
69
  KuberKit::Core::ConfigurationStore.new
70
70
  end
71
71
 
72
- register "core.registry_store" do
73
- KuberKit::Core::Registries::RegistryStore.new
74
- end
75
-
76
72
  register "core.artifact_store" do
77
73
  KuberKit::Core::Artifacts::ArtifactStore.new
78
74
  end
79
75
 
76
+ register "core.build_server_store" do
77
+ KuberKit::Core::BuildServers::BuildServerStore.new
78
+ end
79
+
80
80
  register "core.env_file_store" do
81
81
  KuberKit::Core::EnvFiles::EnvFileStore.new
82
82
  end
83
83
 
84
+ register "core.registry_store" do
85
+ KuberKit::Core::Registries::RegistryStore.new
86
+ end
87
+
84
88
  register "core.template_store" do
85
89
  KuberKit::Core::Templates::TemplateStore.new
86
90
  end
@@ -102,23 +106,23 @@ class KuberKit::Container
102
106
  end
103
107
 
104
108
  register "shell.bash_commands" do
105
- KuberKit::Shell::BashCommands.new
109
+ KuberKit::Shell::Commands::BashCommands.new
106
110
  end
107
111
 
108
112
  register "shell.docker_commands" do
109
- KuberKit::Shell::DockerCommands.new
113
+ KuberKit::Shell::Commands::DockerCommands.new
110
114
  end
111
115
 
112
116
  register "shell.git_commands" do
113
- KuberKit::Shell::GitCommands.new
117
+ KuberKit::Shell::Commands::GitCommands.new
114
118
  end
115
119
 
116
120
  register "shell.rsync_commands" do
117
- KuberKit::Shell::RsyncCommands.new
121
+ KuberKit::Shell::Commands::RsyncCommands.new
118
122
  end
119
123
 
120
124
  register "shell.kubectl_commands" do
121
- KuberKit::Shell::KubectlCommands.new
125
+ KuberKit::Shell::Commands::KubectlCommands.new
122
126
  end
123
127
 
124
128
  register "shell.local_shell" do
@@ -137,14 +141,14 @@ class KuberKit::Container
137
141
  KuberKit::Preprocessing::FilePreprocessor.new
138
142
  end
139
143
 
140
- register "preprocessing.dir_preprocessor" do
141
- KuberKit::Preprocessing::DirPreprocessor.new
142
- end
143
-
144
144
  register "image_compiler.action_handler" do
145
145
  KuberKit::ImageCompiler::ActionHandler.new
146
146
  end
147
147
 
148
+ register "image_compiler.build_server_pool_factory" do
149
+ KuberKit::ImageCompiler::BuildServerPoolFactory.new
150
+ end
151
+
148
152
  register "image_compiler.compiler" do
149
153
  KuberKit::ImageCompiler::Compiler.new
150
154
  end