From ddd2de5b6697bbc17041338ca33415c82d0d21b7 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 8 Jul 2022 10:13:24 +0200 Subject: [PATCH] Clarify usage of external URLs for Docker and Runner Management --- config/code_ocean.yml.example | 4 ++-- config/docker.yml.erb.example | 41 ++++++++--------------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/config/code_ocean.yml.example b/config/code_ocean.yml.example index df56be79..207038d5 100644 --- a/config/code_ocean.yml.example +++ b/config/code_ocean.yml.example @@ -40,10 +40,10 @@ default: &default enabled: false # The strategy to use. Possible values are: poseidon, docker_container_pool strategy: poseidon - # The root URL of the runner management to use + # The root URL of the runner management to use (include any API prefix if required) # If a hostname is specified and the target host is reachable via IPv6, the WebSocket # connection might not use the IPv6-to-IPv4 fallback but rather fail unexpectedly. - url: https://runners.example.org + url: https://runners.example.org/api/v1 # The root certificate authority to trust for TLS connections to the runner management (Poseidon only) ca_file: /example/certificates/ca.crt # The authorization token for connections to the runner management (Poseidon only) diff --git a/config/docker.yml.erb.example b/config/docker.yml.erb.example index 4ea13165..8fad3a8f 100644 --- a/config/docker.yml.erb.example +++ b/config/docker.yml.erb.example @@ -1,16 +1,12 @@ #Why erb? default: &default - connection_timeout: 3 - pool: - active: false - ports: !ruby/range 4500..4600 - -development: - <<: *default + # Specify the Docker host below, once for container management and once for output streaming. + # Always use the TCP socket (instead of a unix socket) and an IPv4 address for best compatibility. host: tcp://127.0.0.1:2376 ws_host: ws://127.0.0.1:2376 #url to connect rails server to docker host # Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user::rwx ` workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %> + connection_timeout: 3 pool: active: true refill: @@ -18,37 +14,18 @@ development: batch_size: 8 interval: 15 timeout: 60 + ports: !ruby/range 4500..4600 + +development: + <<: *default production: <<: *default - host: unix:///var/run/docker.sock - pool: - active: true - refill: - async: false - batch_size: 8 - interval: 15 - timeout: 60 - # Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user::rwx ` - workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %> - ws_host: ws://localhost:4243 #url to connect rails server to docker host staging: <<: *default - host: unix:///var/run/docker.sock - pool: - active: true - refill: - async: false - batch_size: 8 - interval: 15 - timeout: 60 - # Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user::rwx ` - workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %> - ws_host: ws://localhost:4243 #url to connect rails server to docker host test: <<: *default - host: tcp://127.0.0.1:2376 - # Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user::rwx ` - workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %> + pool: + active: false