implemented pooling for Docker containers

This commit is contained in:
Hauke Klement
2015-02-06 15:59:51 +01:00
parent a22a5af711
commit 5f0815b140
20 changed files with 453 additions and 208 deletions

View File

@ -1,5 +1,8 @@
default: &default
connection_timeout: 3
pool:
active: false
interval: 60
ports: !ruby/range 4500..4600
development:
@ -9,6 +12,8 @@ development:
production:
<<: *default
pool:
active: true
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
test:

View File

@ -0,0 +1,3 @@
DockerClient.initialize_environment
DockerContainerPool.start_refill_task if DockerContainerPool.config[:active]
at_exit { DockerContainerPool.clean_up } unless Rails.env.test?

View File

@ -13,6 +13,7 @@ de:
help: Hilfetext
name: Name
permitted_execution_time: Erlaubte Ausführungszeit (in Sekunden)
pool_size: Docker-Container-Pool-Größe
run_command: Ausführungsbefehl
test_command: Testbefehl
testing_framework: Testing-Framework

View File

@ -13,6 +13,7 @@ en:
help: Help Text
name: Name
permitted_execution_time: Permitted Execution Time (in Seconds)
pool_size: Docker Container Pool Size
run_command: Run Command
test_command: Test Command
testing_framework: Testing Framework