{%- set _workers = ("__CONTROLLER_MAX_WORKERS__" or grains['num_cpus']*2)|int %}
{%- set max_workers = [_workers, 8]|max %}
{%- set max_reqs = ("__CONTROLLER_MAX_QUEUED_REQUESTS__" or 128)|int %}
+{%- set database_host = ("__DATABASE_EXTERNAL_SERVICE_HOST_OR_IP__" or "__DATABASE_INT_IP__") %}
# The variables commented out are the default values that the formula uses.
# The uncommented values are REQUIRED values. If you don't set them, running
# max concurrent connections per arvados server daemon
# connection_pool_max: 32
name: __CLUSTER___arvados
- host: __DATABASE_INT_IP__
+ host: {{ database_host }}
password: "__DATABASE_PASSWORD__"
user: __CLUSTER___arvados
encoding: en_US.utf8
instance: arvados-dispatch-cloud.__CLUSTER__
cluster: __CLUSTER__
+ {%- if "__DATABASE_INT_IP__" != "" %}
# Database
- job_name: postgresql
static_configs:
labels:
instance: database.__CLUSTER__
cluster: __CLUSTER__
+ {%- endif %}
# Nodes
{%- set node_list = "__NODELIST__".split(',') %}
{%- set tpldir = curr_tpldir %}
#CRUDE, but functional
+
+{%- if "__DATABASE_INT_IP__" != "" %}
extra_extra_hosts_entries_etc_hosts_database_host_present:
host.present:
- ip: __DATABASE_INT_IP__
- names:
- db.{{ arvados.cluster.name }}.{{ arvados.cluster.domain }}
- database.{{ arvados.cluster.name }}.{{ arvados.cluster.domain }}
+{%- endif %}
extra_extra_hosts_entries_etc_hosts_api_host_present:
host.present:
KEEPSTORE0_INT_IP=10.1.2.13
SHELL_INT_IP=10.1.2.17
+# Set this if using an external PostgreSQL service.
+#DATABASE_EXTERNAL_SERVICE_HOST_OR_IP=
+
# Performance tuning parameters. If these are not set, workers
# defaults on the number of cpus and queued requests defaults to 128.
#CONTROLLER_MAX_WORKERS=
s#__SHELL_INT_IP__#${SHELL_INT_IP}#g;
s#__WORKBENCH1_INT_IP__#${WORKBENCH1_INT_IP}#g;
s#__WORKBENCH2_INT_IP__#${WORKBENCH2_INT_IP}#g;
- s#__DATABASE_INT_IP__#${DATABASE_INT_IP}#g;
+ s#__DATABASE_INT_IP__#${DATABASE_INT_IP:-}#g;
+ s#__DATABASE_EXTERNAL_SERVICE_HOST_OR_IP__#${DATABASE_EXTERNAL_SERVICE_HOST_OR_IP:-}#g;
s#__WORKBENCH_SECRET_KEY__#${WORKBENCH_SECRET_KEY}#g;
s#__SSL_KEY_ENCRYPTED__#${SSL_KEY_ENCRYPTED}#g;
s#__SSL_KEY_AWS_REGION__#${SSL_KEY_AWS_REGION:-}#g;