From e9ca2be305fc1ba56cfe6e06b9ba325937cc6e85 Mon Sep 17 00:00:00 2001 From: Adham Helal Date: Wed, 1 Jun 2016 19:48:37 +0200 Subject: [PATCH 1/4] update task --- tasks/install.yml | 12 ------------ tasks/web.yml | 6 ++++++ tasks/worker.yml | 8 +++++++- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index bebf9d1..f46fcac 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -19,15 +19,3 @@ src="{{ concourseci_bin_dir }}/{{ concourseci_binary_file }}" dest="{{ concourseci_bin_dir }}/concourse" state="link" - -- name: Install | Concourse web start script - template: - src="concourse-web.j2" - dest="{{ concourseci_bin_dir }}/concourse-web" - mode=0755 - -- name: Install | Concourse worker start script - template: - src="concourse-worker.j2" - dest="{{ concourseci_bin_dir }}/concourse-worker" - mode=0755 \ No newline at end of file diff --git a/tasks/web.yml b/tasks/web.yml index 455b985..3ff12b0 100644 --- a/tasks/web.yml +++ b/tasks/web.yml @@ -1,5 +1,11 @@ --- +- name: web | Concourse web start script + template: + src="concourse-web.j2" + dest="{{ concourseci_bin_dir }}/concourse-web" + mode=0755 + - name: web | Copy session public key copy: content="{{ concourseci_key_session_public }}" diff --git a/tasks/worker.yml b/tasks/worker.yml index 52de20a..6e9c02b 100644 --- a/tasks/worker.yml +++ b/tasks/worker.yml @@ -1,5 +1,11 @@ --- +- name: worker | Concourse worker start script + template: + src="concourse-worker.j2" + dest="{{ concourseci_bin_dir }}/concourse-worker" + mode=0755 + - name: worker | Copy session public key copy: content="{{ concourseci_key_session_public }}" @@ -28,7 +34,7 @@ owner="{{ concourseci_user }}" group="{{ concourseci_group }}" -- name: web | Copy worker private key +- name: worker | Copy worker private key copy: content="{{ concourseci_key_worker_private }}" dest="{{ concourseci_key_worker_path }}" From b5f9712e338527f01a4461a3424ba999aee0865f Mon Sep 17 00:00:00 2001 From: Adham Helal Date: Wed, 1 Jun 2016 19:48:47 +0200 Subject: [PATCH 2/4] use exec --- templates/concourse-web.j2 | 2 +- templates/concourse-worker.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/concourse-web.j2 b/templates/concourse-web.j2 index df4a2df..cd38ab7 100644 --- a/templates/concourse-web.j2 +++ b/templates/concourse-web.j2 @@ -4,7 +4,7 @@ {% if value != 'omit' %}--{{ option }}={{ value }}{% endif %} {% endmacro %} -{{ concourseci_bin_dir }}/concourse web \ +exec {{ concourseci_bin_dir }}/concourse web \ {# General config #} {{ build_option("external-url", concourseci_external_url) }}\ {{ build_option("oauth-base-url", concourseci_oauth_base_url | default("omit")) }}\ diff --git a/templates/concourse-worker.j2 b/templates/concourse-worker.j2 index 51fe41c..bf2b14f 100644 --- a/templates/concourse-worker.j2 +++ b/templates/concourse-worker.j2 @@ -4,7 +4,7 @@ {% if value != 'omit' %}--{{ option }}={{ value }}{% endif %} {% endmacro %} -{{ concourseci_bin_dir }}/concourse worker \ +exec {{ concourseci_bin_dir }}/concourse worker \ {# General config #} {{ build_option("name", concourseci_worker_name) }}\ {{ build_option("work-dir", concourseci_worker_dir) }}\ From 72f365bd16f23c4c2d32d0cb4de7df58f0a5678a Mon Sep 17 00:00:00 2001 From: Adham Helal Date: Wed, 1 Jun 2016 20:00:25 +0200 Subject: [PATCH 3/4] add peer ip and max containers --- templates/concourse-worker.j2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/concourse-worker.j2 b/templates/concourse-worker.j2 index bf2b14f..717b1ba 100644 --- a/templates/concourse-worker.j2 +++ b/templates/concourse-worker.j2 @@ -13,11 +13,13 @@ exec {{ concourseci_bin_dir }}/concourse worker \ {{ build_option("tsa-port", concourseci_tsa_bind_port ) }}\ {{ build_option("tsa-public-key", concourseci_key_tsa_path + ".pub" ) }}\ {{ build_option("tsa-worker-private-key", concourseci_key_worker_path ) }}\ + {{ build_option("peer_ip", concourseci_peer_ip | default("omit")) }}\ {# Garden config #} {{ build_option("garden-log-level", concourseci_garden_log_level) }}\ {{ build_option("garden-graph-cleanup-threshold-in-megabytes", concourseci_garden_graph_cleanup_threshold_in_megabytes| default("omit")) }}\ {# Garden Container Networking config #} {{ build_option("garden-network-pool", concourseci_garden_network_pool| default("omit")) }}\ + {{ build_option("garden-max-containers", concourseci_garden_max_containers| default("omit")) }}\ {# Redirect to logs #} &>> {{ concourseci_log_worker }} @@ -66,9 +68,6 @@ exec {{ concourseci_bin_dir }}/concourse worker \ # --garden-network-plugin= Path to network plugin binary. # --garden-network-plugin-extra-arg= Extra argument to pass to the network plugin. Can be specified multiple times. # -# Limits: -# --garden-max-containers= Maximum number of containers that can be created. (default: 0) -# # Metrics: # --garden-metrics-emission-interval= Interval on which to emit metrics. (default: 1m) # --garden-dropsonde-origin= Origin identifier for Dropsonde-emitted metrics. (default: garden-linux) From 4176da4a516033614cc3886bfd878395f88ac215 Mon Sep 17 00:00:00 2001 From: Adham Helal Date: Wed, 1 Jun 2016 20:03:01 +0200 Subject: [PATCH 4/4] update read --- defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4cc6c8b..26baa01 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -65,8 +65,9 @@ concourseci_worker_name : "{{ inventory_hostname }}" ## Concourse garden linux concourseci_garden_listen : "127.0.0.1:7777" concourseci_garden_log_level : "info" # [debug|info|error|fatal] -## Garden Container Networking +# concourseci_peer_ip # IP used to reach this worker from the ATC nodes. If omitted, the worker will be forwarded through the SSH connection to the TSA. # concourseci_garden_network_pool # Network range to use for dynamically allocated container subnets. (default: 10.254.0.0/22) +# concourseci_garden_max_containers # Maximum number of containers that can be created. (default: ) # concourseci_garden_graph_cleanup_threshold_in_megabytesDirectory # Disk usage of the graph dir at which cleanup should trigger, or -1 to disable graph cleanup. (default: -1) ## PostgreSQL