Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12242694
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
13 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/saltmaster/zemke-rhyne/account.sls b/roles/saltmaster/zemke-rhyne/account.sls
new file mode 100644
index 0000000..3de7f3a
--- /dev/null
+++ b/roles/saltmaster/zemke-rhyne/account.sls
@@ -0,0 +1,25 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-04-28
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs with context %}
+{% set zr_home = "/home/zr" %}
+
+# -------------------------------------------------------------
+# Account
+#
+# This account is used by Jenkins jobs to deploy artifacts
+# after a build.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+zr_account:
+ user.present:
+ - name: zr
+ - fullname: Zemke-Rhyne
+ - uid: 8900
+ - gid: 9002
+ - home: {{ zr_home }}
diff --git a/roles/saltmaster/zemke-rhyne/data.sls b/roles/saltmaster/zemke-rhyne/data.sls
index 98f94c7..a91d6d0 100644
--- a/roles/saltmaster/zemke-rhyne/data.sls
+++ b/roles/saltmaster/zemke-rhyne/data.sls
@@ -1,16 +1,29 @@
# -------------------------------------------------------------
# Salt — Provision Docker engine
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-09-08
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
+{% set zr_home = "/home/zr" %}
+
# If we pass the JSON as contents, it will be converted into Python,
# so we've a template to call directly the method.
-/home/zr/data/servers.json:
+{{ zr_home }}/data/servers.json:
file.managed:
- source: salt://roles/saltmaster/zemke-rhyne/files/servers.json.jinja
- template: jinja
- user: zr
+
+zr_authorized_keys:
+ cmd.run:
+ - runas: zr
+ - cwd: {{ zr_home }}
+ - name: make clean all
+ - onchanges:
+ - file: {{ zr_home }}/data/servers.json
+ - require:
+ - user: zr_account
+ - file: {{ zr_home }}/Makefile
diff --git a/roles/webserver-legacy/zr/files/dot.arcrc.json b/roles/saltmaster/zemke-rhyne/files/dot.arcrc.json
similarity index 100%
rename from roles/webserver-legacy/zr/files/dot.arcrc.json
rename to roles/saltmaster/zemke-rhyne/files/dot.arcrc.json
diff --git a/roles/saltmaster/zemke-rhyne/init.sls b/roles/saltmaster/zemke-rhyne/init.sls
index 681623f..1e23c28 100644
--- a/roles/saltmaster/zemke-rhyne/init.sls
+++ b/roles/saltmaster/zemke-rhyne/init.sls
@@ -1,38 +1,40 @@
# -------------------------------------------------------------
# Salt — Provision Docker engine
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2018-09-08
+# Created: 2017-04-28
# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# But first, we interrupt your configuration for some ASCII art.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
-# ___ ___ ___ ___ ___
-# / /\ / /\ /__/\ /__/| / /\
-# / /::| / /:/_ | |::\ | |:| / /:/_
-# / /:/:| / /:/ /\ | |:|:\ | |:| / /:/ /\
-# / /:/|:|__ / /:/ /:/_ __|__|:|\:\ __| |:| / /:/ /:/_
-# /__/:/ |:| /\ /__/:/ /:/ /\ /__/::::| \:\ /__/\_|:|____ /__/:/ /:/ /\
-# \__\/ |:|/:/ \ \:\/:/ /:/ \ \:\~~\__\/ \ \:\/:::::/ \ \:\/:/ /:/
-# | |:/:/ \ \::/ /:/ \ \:\ \ \::/~~~~ \ \::/ /:/
-# | |::/ \ \:\/:/ \ \:\ \ \:\ \ \:\/:/
-# | |:/ \ \::/ \ \:\ \ \:\ \ \::/
-# |__|/ ___ \__\/ ___ \__\/ \__\/ ___ \__\/ ___
-# / /\ /__/\ ___ /__/\ / /\
-# / /::\ \ \:\ /__/| \ \:\ / /:/_
-# / /:/\:\ \__\:\ | |:| \ \:\ / /:/ /\
-# / /:/~/:/ ___ / /::\ | |:| _____\__\:\ / /:/ /:/_
-# /__/:/ /:/___ /__/\ /:/\:\ __|__|:| /__/::::::::\ /__/:/ /:/ /\
-# \ \:\/:::::/ \ \:\/:/__\/ /__/::::\ \ \:\~~\~~\/ \ \:\/:/ /:/
-# \ \::/~~~~ \ \::/ ~\~~\:\ \ \:\ ~~~ \ \::/ /:/
-# \ \:\ \ \:\ \ \:\ \ \:\ \ \:\/:/
-# \ \:\ \ \:\ \__\/ \ \:\ \ \::/
-# \__\/ \__\/ \__\/ \__\/
-#
-# Support tools for a Docker <--> Phabricator bridge.
#
-# Use the Zemke-Rhyne account to build Docker containers for
-# Nasqueron applications, fetching information from DevCentral.
+# ___ ___ ___ ___ ___
+# / /\ / /\ /__/\ /__/| / /\
+# / /::| / /:/_ | |::\ | |:| / /:/_
+# / /:/:| / /:/ /\ | |:|:\ | |:| / /:/ /\
+# / /:/|:|__ / /:/ /:/_ __|__|:|\:\ __| |:| / /:/ /:/_
+# /__/:/ |:| /\ /__/:/ /:/ /\ /__/::::| \:\ /__/\_|:|____ /__/:/ /:/ /\
+# \__\/ |:|/:/ \ \:\/:/ /:/ \ \:\~~\__\/ \ \:\/:::::/ \ \:\/:/ /:/
+# | |:/:/ \ \::/ /:/ \ \:\ \ \::/~~~~ \ \::/ /:/
+# | |::/ \ \:\/:/ \ \:\ \ \:\ \ \:\/:/
+# | |:/ \ \::/ \ \:\ \ \:\ \ \::/
+# |__|/ ___ \__\/ ___ \__\/ \__\/ ___ \__\/ ___
+# / /\ /__/\ ___ /__/\ / /\
+# / /::\ \ \:\ /__/| \ \:\ / /:/_
+# / /:/\:\ \__\:\ | |:| \ \:\ / /:/ /\
+# / /:/~/:/ ___ / /::\ | |:| _____\__\:\ / /:/ /:/_
+# /__/:/ /:/___ /__/\ /:/\:\ __|__|:| /__/::::::::\ /__/:/ /:/ /\
+# \ \:\/:::::/ \ \:\/:/__\/ /__/::::\ \ \:\~~\~~\/ \ \:\/:/ /:/
+# \ \::/~~~~ \ \::/ ~\~~\:\ \ \:\ ~~~ \ \::/ /:/
+# \ \:\ \ \:\ \ \:\ \ \:\ \ \:\/:/
+# \ \:\ \ \:\ \__\/ \ \:\ \ \::/
+# \__\/ \__\/ \__\/ \__\/
#
-# -------------------------------------------------------------
include:
+ - .account
+ - .software
- .data
diff --git a/roles/saltmaster/zemke-rhyne/software.sls b/roles/saltmaster/zemke-rhyne/software.sls
new file mode 100644
index 0000000..285f485
--- /dev/null
+++ b/roles/saltmaster/zemke-rhyne/software.sls
@@ -0,0 +1,69 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-04-28
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs with context %}
+{% set zr_home = "/home/zr" %}
+
+# -------------------------------------------------------------
+# Required dependencies
+#
+# :: jq
+# :: arc
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+zr_required_sofware:
+ pkg.installed:
+ - pkgs:
+ - jq
+
+ # Devserver role provides their own Git clone of Arcanist
+ # For other servers, we need the package.
+ {% if not salt['node.has_role']('devserver') %}
+ - arcanist
+ {% endif %}
+
+# -------------------------------------------------------------
+# Deploy files and directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% for dir in ['data', 'lib'] %}
+{{ zr_home }}/{{ dir }}:
+ file.recurse:
+ - source: salt://software/zemke-rhyne/{{ dir }}
+ - include_empty: True
+ - clean: False
+ - dir_mode: 755
+ - file_mode: 644
+ - user: 8900
+ - group: 9002
+{% endfor %}
+
+{{ zr_home }}/bin:
+ file.recurse:
+ - source: salt://software/zemke-rhyne/bin
+ - dir_mode: 755
+ - file_mode: 755
+ - user: 8900
+ - group: 9002
+
+{% for file in ['README', 'Makefile', '.arcconfig', '.arclint'] %}
+{{ zr_home }}/{{ file }}:
+ file.managed:
+ - source: salt://software/zemke-rhyne/{{ file }}
+ - mode: 644
+ - user: 8900
+ - group: 9002
+{% endfor %}
+
+{{ zr_home }}/.arcrc:
+ file.managed:
+ - source: salt://roles/webserver-legacy/zr/files/dot.arcrc.json
+ - replace: False
+ - mode: 600
+ - user: 8900
+ - group: 9002
diff --git a/roles/webserver-legacy/init.sls b/roles/webserver-legacy/init.sls
index 352610e..b64b570 100644
--- a/roles/webserver-legacy/init.sls
+++ b/roles/webserver-legacy/init.sls
@@ -1,17 +1,16 @@
# -------------------------------------------------------------
# Salt — Sites to provision on the legacy web server
#
# Currently, this is deployed to ysul.nasqueron.org
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- .account
- .directories
- - .zr
- .nginx
- .static-sites
- .php-sites
- .tweaks
diff --git a/roles/webserver-legacy/zr/init.sls b/roles/webserver-legacy/zr/init.sls
deleted file mode 100644
index 10c4e17..0000000
--- a/roles/webserver-legacy/zr/init.sls
+++ /dev/null
@@ -1,121 +0,0 @@
-# -------------------------------------------------------------
-# Salt — Sites to provision on the legacy web serves
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Project: Nasqueron
-# Created: 2017-04-28
-# License: Trivial work, not eligible to copyright
-# -------------------------------------------------------------
-
-{% from "map.jinja" import dirs with context %}
-{% set zr_home = "/home/zr" %}
-
-# -------------------------------------------------------------
-# But first, we interrupt your configuration for some ASCI art.
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-#
-#
-# ___ ___ ___ ___ ___
-# / /\ / /\ /__/\ /__/| / /\
-# / /::| / /:/_ | |::\ | |:| / /:/_
-# / /:/:| / /:/ /\ | |:|:\ | |:| / /:/ /\
-# / /:/|:|__ / /:/ /:/_ __|__|:|\:\ __| |:| / /:/ /:/_
-# /__/:/ |:| /\ /__/:/ /:/ /\ /__/::::| \:\ /__/\_|:|____ /__/:/ /:/ /\
-# \__\/ |:|/:/ \ \:\/:/ /:/ \ \:\~~\__\/ \ \:\/:::::/ \ \:\/:/ /:/
-# | |:/:/ \ \::/ /:/ \ \:\ \ \::/~~~~ \ \::/ /:/
-# | |::/ \ \:\/:/ \ \:\ \ \:\ \ \:\/:/
-# | |:/ \ \::/ \ \:\ \ \:\ \ \::/
-# |__|/ ___ \__\/ ___ \__\/ \__\/ ___ \__\/ ___
-# / /\ /__/\ ___ /__/\ / /\
-# / /::\ \ \:\ /__/| \ \:\ / /:/_
-# / /:/\:\ \__\:\ | |:| \ \:\ / /:/ /\
-# / /:/~/:/ ___ / /::\ | |:| _____\__\:\ / /:/ /:/_
-# /__/:/ /:/___ /__/\ /:/\:\ __|__|:| /__/::::::::\ /__/:/ /:/ /\
-# \ \:\/:::::/ \ \:\/:/__\/ /__/::::\ \ \:\~~\~~\/ \ \:\/:/ /:/
-# \ \::/~~~~ \ \::/ ~\~~\:\ \ \:\ ~~~ \ \::/ /:/
-# \ \:\ \ \:\ \ \:\ \ \:\ \ \:\/:/
-# \ \:\ \ \:\ \__\/ \ \:\ \ \::/
-# \__\/ \__\/ \__\/ \__\/
-#
-
-# -------------------------------------------------------------
-# Required software
-#
-# :: jq
-# :: arc
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-zr_required_sofware:
- pkg.installed:
- - pkgs:
- - jq
- # Devserver role provides their own Git clone of Arcanist
- # For other servers, we need the package.
- {% if not salt['node.has_role']('devserver') %}
- - arcanist
- {% endif %}
-
-# -------------------------------------------------------------
-# Account
-#
-# This account is used by Jenkins jobs to deploy artefacts
-# after a build.
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-zr_account:
- user.present:
- - name: zr
- - fullname: Zemke-Rhyne
- - uid: 8900
- - gid: 9002
- - home: {{ zr_home }}
-
-# -------------------------------------------------------------
-# Deploy files and directory
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{% for dir in ['data', 'lib'] %}
-{{ zr_home }}/{{ dir }}:
- file.recurse:
- - source: salt://software/zemke-rhyne/{{ dir }}
- - include_empty: True
- - clean: False
- - dir_mode: 755
- - file_mode: 644
- - user: 8900
- - group: 9002
-{% endfor %}
-
-{{ zr_home }}/bin:
- file.recurse:
- - source: salt://software/zemke-rhyne/bin
- - dir_mode: 755
- - file_mode: 755
- - user: 8900
- - group: 9002
-
-{% for file in ['README', 'Makefile', '.arcconfig', '.arclint'] %}
-{{ zr_home }}/{{ file }}:
- file.managed:
- - source: salt://software/zemke-rhyne/{{ file }}
- - mode: 644
- - user: 8900
- - group: 9002
-{% endfor %}
-
-{{ zr_home }}/.arcrc:
- file.managed:
- - source: salt://roles/webserver-legacy/zr/files/dot.arcrc.json
- - replace: False
- - mode: 600
- - user: 8900
- - group: 9002
-
-zr_make:
- cmd.run:
- - name: make
- - runas: zr
- - cwd: {{ zr_home }}
- - creates: {{ zr_home }}/.ssh/authorized_keys
- - require:
- - user: zr_account
- - file: {{ zr_home }}/Makefile
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Oct 12, 10:04 (8 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3065717
Default Alt Text
(13 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment