Page MenuHomeDevCentral

D1122.id2890.diff
No OneTemporary

D1122.id2890.diff

diff --git a/map.jinja b/map.jinja
--- a/map.jinja
+++ b/map.jinja
@@ -130,7 +130,7 @@
'cppunit': 'cppunit',
'emacs': 'emacs-nox11',
'exiftool': 'p5-Image-ExifTool-devel',
- 'mariadb': 'mariadb101-server',
+ 'mariadb': 'mariadb102-server',
'node': 'node',
'pear': 'pear',
'phpcs': 'pear-PHP_CodeSniffer',
diff --git a/pillar/nodes/nodes.sls b/pillar/nodes/nodes.sls
--- a/pillar/nodes/nodes.sls
+++ b/pillar/nodes/nodes.sls
@@ -32,6 +32,8 @@
roles:
- devserver
- saltmaster
+ zfs:
+ pool: arcology
network:
ipv4_interface: igb0
ipv4_address: 163.172.49.16
diff --git a/roles/dbserver-mysql/init.sls b/roles/dbserver-mysql/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/dbserver-mysql/init.sls
@@ -0,0 +1,10 @@
+# -------------------------------------------------------------
+# Salt — Database server — MySQL
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-10-27
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+include:
+ - .mysql-server
diff --git a/roles/dbserver-mysql/mysql-server/cnf.sls b/roles/dbserver-mysql/mysql-server/cnf.sls
new file mode 100644
--- /dev/null
+++ b/roles/dbserver-mysql/mysql-server/cnf.sls
@@ -0,0 +1,24 @@
+# -------------------------------------------------------------
+# Salt — Database server — MySQL
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-10-27
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs with context %}
+
+# -------------------------------------------------------------
+# Main my.cnf
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% set use_zfs = salt['node.has']()['zfs:pool'] %}
+{% set tank = salt['pillar.get']("nodes:" + grains['id'] + ":zfs:pool", '') %}
+
+{{ dirs.etc }}/my.cnf:
+ file.managed:
+ - source: salt://roles/dbserver-mysql/mysql-server/files/my.cnf
+ - template: jinja
+ - context:
+ use_zfs: {{ use_zfs }}
+ zfs_tank: {{ tank }}
diff --git a/roles/dbserver-mysql/mysql-server/files/my.cnf b/roles/dbserver-mysql/mysql-server/files/my.cnf
new file mode 100644
diff --git a/roles/dbserver-mysql/mysql-server/init.sls b/roles/dbserver-mysql/mysql-server/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/dbserver-mysql/mysql-server/init.sls
@@ -0,0 +1,11 @@
+# -------------------------------------------------------------
+# Salt — Database server — MySQL
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-10-27
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+include:
+ - .software
+ - .cnf
diff --git a/roles/dbserver-mysql/mysql-server/software.sls b/roles/dbserver-mysql/mysql-server/software.sls
new file mode 100644
--- /dev/null
+++ b/roles/dbserver-mysql/mysql-server/software.sls
@@ -0,0 +1,18 @@
+# -------------------------------------------------------------
+# Salt — Database server — MySQL
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-10-27
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import packages with context %}
+
+# -------------------------------------------------------------
+# MySQL server
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+mysql_server_software:
+ pkg.installed:
+ - pkgs:
+ - {{ packages.mariadb }}
diff --git a/top.sls b/top.sls
--- a/top.sls
+++ b/top.sls
@@ -19,6 +19,7 @@
- roles/saltmaster
'ysul':
- roles/paas-jails
+ - roles/dbserver-mysql
- roles/webserver-core
- roles/webserver-legacy
- roles/webserver-varnish

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 13:52 (17 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2309536
Default Alt Text
D1122.id2890.diff (4 KB)

Event Timeline