Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F8321922
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/pillar/devserver/datacubes.sls b/pillar/devserver/datacubes.sls
index db353d8..3cc9a40 100644
--- a/pillar/devserver/datacubes.sls
+++ b/pillar/devserver/datacubes.sls
@@ -1,26 +1,41 @@
# -------------------------------------------------------------
# Salt configuration for Nasqueron servers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
# -------------------------------------------------------------
# Datacubes
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
datacubes:
bak: &default {}
git: *default
t: *default
dereckson_bak: &dck
user: dereckson
zfs_user: dereckson
zfs_auto_snapshot: True
xcombelle:
user: xcombelle
zfs_user: xcombelle
zfs_auto_snapshot: True
+
+# -------------------------------------------------------------
+# Other directories needed by development work
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+devserver_directories:
+ /var/dataroot:
+ user: root
+ group: ops
+ mode: 775
+
+ /var/dataroot/mediawiki.dereckson.be:
+ user: web-be-dereckson-mw
+ group: dereckson
+ mode: 771
diff --git a/roles/devserver/datacube/init.sls b/roles/devserver/datacube/init.sls
index e9d51c6..b2ccb62 100644
--- a/roles/devserver/datacube/init.sls
+++ b/roles/devserver/datacube/init.sls
@@ -1,65 +1,82 @@
# -------------------------------------------------------------
# Salt — Provision dev software
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
# -------------------------------------------------------------
# Directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/datacube:
file.directory:
- mode: 711
# -------------------------------------------------------------
# ZFS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if salt['node.has']('zfs:pool') %}
{% set tank = salt['node.get']("zfs:pool") %}
{{ tank }}/datacube:
zfs.filesystem_present:
- properties:
mountpoint: /datacube
compression: zstd
{% for subdir, args in pillar.get("datacubes", {}).items() %}
{% set datacube_dataset = tank + "/datacube/" + subdir %}
{% if "user" in args %}
/datacube/{{ subdir }}:
file.directory:
- mode: 711
- user: {{ args["user"] }}
{% endif %}
{{ datacube_dataset }}:
zfs.filesystem_present:
- properties:
mountpoint: /datacube/{{ subdir }}
compression: zstd
{% if "zfs_auto_snapshot" in args %}
"com.sun:auto-snapshot": "true"
{% endif %}
{% if "zfs_user" in args %}
zfs_permissions_datacube_{{ subdir }}:
cmd.run:
- name: zfs allow -lu {{ args["zfs_user"] }} @local {{ datacube_dataset }}
- onchanges:
- zfs: {{ datacube_dataset }}
zfs_permissions_datacube_descendent_{{ subdir }}:
cmd.run:
- name: zfs allow -du {{ args["zfs_user"] }} @descendent {{ datacube_dataset }}
- onchanges:
- zfs: {{ datacube_dataset }}
{% endif %}
{% endfor %}
{% endif %}
+
+# -------------------------------------------------------------
+# Misc directories
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% for dir, args in pillar.get("devserver_directories", {}).items() %}
+
+{{ dir }}:
+ file.directory:
+ - makedirs: True
+ {% for key in ["user", "group", "mode"] %}
+ {% if key in args %}
+ - {{ key }}: {{ args[key] }}
+ {% endif %}
+ {% endfor %}
+
+{% endfor %}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, May 13, 16:55 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2650752
Default Alt Text
(3 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment