refactor(provision): use uniform database parameters across examples
authorJavier Bértoli <jbertoli@curii.com>
Fri, 16 Apr 2021 19:01:52 +0000 (16:01 -0300)
committerJavier Bértoli <jbertoli@curii.com>
Fri, 16 Apr 2021 22:09:32 +0000 (19:09 -0300)
refs #17246
Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli@curii.com>

tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/arvados.sls
tools/salt-install/config_examples/single_host/multiple_hostnames/states/host_entries.sls [new file with mode: 0644]

index de9cd9648dca0467982d05792d1af897fbfef873..23e007650480ab28414b5bbbd4251cd655e75f3b 100644 (file)
@@ -63,10 +63,10 @@ arvados:
     database:
       # max concurrent connections per arvados server daemon
       # connection_pool_max: 32
-      name: arvados
+      name: __CLUSTER___arvados
       host: 127.0.0.1
-      password: changeme_arvados
-      user: arvados
+      password: "__DATABASE_PASSWORD__"
+      user: __CLUSTER___arvados
       encoding: en_US.utf8
       client_encoding: UTF8
 
diff --git a/tools/salt-install/config_examples/single_host/multiple_hostnames/states/host_entries.sls b/tools/salt-install/config_examples/single_host/multiple_hostnames/states/host_entries.sls
new file mode 100644 (file)
index 0000000..53a9148
--- /dev/null
@@ -0,0 +1,36 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+{%- set curr_tpldir = tpldir %}
+{%- set tpldir = 'arvados' %}
+{%- from "arvados/map.jinja" import arvados with context %}
+{%- set tpldir = curr_tpldir %}
+
+arvados_test_salt_states_examples_single_host_etc_hosts_host_present:
+  host.present:
+    - ip: 127.0.1.1
+    - names:
+      - {{ arvados.cluster.name }}.{{ arvados.cluster.domain }}
+      # FIXME! This just works for our testings.
+      # Won't work if the cluster name != host name
+      {%- for entry in [
+          'api',
+          'collections',
+          'controller',
+          'download',
+          'keep',
+          'keepweb',
+          'keep0',
+          'shell',
+          'workbench',
+          'workbench2',
+          'ws',
+        ]
+      %}
+      - {{ entry }}
+      - {{ entry }}.{{ arvados.cluster.name }}.{{ arvados.cluster.domain }}
+      {%- endfor %}
+    - require_in:
+      - file: nginx_config
+      - service: nginx_service