Page MenuHomeDevCentral

D2998.diff
No OneTemporary

D2998.diff

diff --git a/pillar/services/table.sls b/pillar/services/table.sls
new file mode 100644
--- /dev/null
+++ b/pillar/services/table.sls
@@ -0,0 +1,23 @@
+# -------------------------------------------------------------
+# Salt configuration for Nasqueron servers
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Description: Table of the services to use in configuration
+# -------------------------------------------------------------
+
+nasqueron_services:
+ # Complector services
+ salt_primary: 172.27.27.7
+ vault: 172.27.27.7
+ vault_url: https://172.27.27.7:8200
+
+ # PaaS Docker
+ docker:
+ api: 172.27.27.5
+ cd: 172.27.27.5
+ notifications: 172.27.27.5
+
+ # Databases
+ db-A: 172.27.27.8
+ db-B: 172.27.27.9
diff --git a/pillar/top.sls b/pillar/top.sls
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -16,6 +16,7 @@
- nodes.forests
- hotfixes.roles
- services.monitoring-reporting
+ - services.table
- webserver.sites
cloudhugger:
diff --git a/roles/devserver/userland-software/files/notifications.conf b/roles/devserver/userland-software/files/notifications.conf
--- a/roles/devserver/userland-software/files/notifications.conf
+++ b/roles/devserver/userland-software/files/notifications.conf
@@ -15,7 +15,7 @@
# </auto-generated>
[Broker]
-Host=172.27.27.5
+Host={{ host }}
User=notifications-{{ grains['id'] }}
Password={{ password }}
diff --git a/roles/devserver/userland-software/notifications.sls b/roles/devserver/userland-software/notifications.sls
--- a/roles/devserver/userland-software/notifications.sls
+++ b/roles/devserver/userland-software/notifications.sls
@@ -39,4 +39,5 @@
- mode: 640
- template: jinja
- context:
+ host: {{ pillar["nasqueron_services"]["docker"]["notifications"] }}
password: {{ salt['credentials.get_password']("nasqueron/notifications/notifications-cli/" + grains["id"]) }}
diff --git a/roles/paas-docker/containers/sentry.sls b/roles/paas-docker/containers/sentry.sls
--- a/roles/paas-docker/containers/sentry.sls
+++ b/roles/paas-docker/containers/sentry.sls
@@ -43,7 +43,7 @@
args: {{ realm_args }}
vault:
approle: {{ salt["credentials.read_secret"](realm_args["credentials"]["vault"]) }}
- addr: https://172.27.27.7:8200
+ addr: {{ pillar{"nasqueron_services"]["vault_url"] }}
sentry_{{ realm }}_vault_certificate:
file.managed:
diff --git a/roles/viperserv/eggdrop/config.sls b/roles/viperserv/eggdrop/config.sls
--- a/roles/viperserv/eggdrop/config.sls
+++ b/roles/viperserv/eggdrop/config.sls
@@ -62,11 +62,11 @@
- context:
# Database is on cluster B
db:
- host: 172.27.27.9
+ host: {{ pillar["nasqueron_services"]["db-B"] }}
database: Nasqueron
vault:
approle: {{ salt['credentials.read_secret']('nasqueron.viperserv.vault') }}
- addr: https://172.27.27.7:8200
+ addr: {{ pillar["nasqueron_services"]["vault_url"] }}
{% for botname, bot in pillar['viperserv_bots'].items() %}
diff --git a/roles/webserver-legacy/nginx/config.sls b/roles/webserver-legacy/nginx/config.sls
--- a/roles/webserver-legacy/nginx/config.sls
+++ b/roles/webserver-legacy/nginx/config.sls
@@ -29,3 +29,6 @@
- source: salt://roles/webserver-legacy/nginx/files/vhosts
- dir_mode: 755
- file_mode: 644
+ - template: jinja
+ - context:
+ services: {{ pillar["nasqueron_services"] }}
diff --git a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
--- a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
+++ b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
@@ -19,15 +19,15 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
upstream docker-prod-datasources {
- server 172.27.27.5:19080;
+ server {{ services["docker"]["api"] }}:19080;
}
upstream docker-prod-registry {
- server 172.27.27.5:20080;
+ server {{ services["docker"]["api"] }}:20080;
}
upstream vault {
- server 172.27.27.7:8200;
+ server {{ services["vault"] }}:8200;
# 2 servers should be added for HA, with a quorum for a Raft consensus
}
diff --git a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/infra.conf b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/infra.conf
--- a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/infra.conf
+++ b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/infra.conf
@@ -15,7 +15,7 @@
# </auto-generated>
upstream tommy_cd {
- server 172.27.27.5:24180;
+ server {{ services["docker"]["cd"] }}:24180;
}
server {

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 5, 06:58 (19 m, 33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2229525
Default Alt Text
D2998.diff (4 KB)

Event Timeline