vortrag geaddet
[stratum0-wiki.git] / Theodem.mw
index d5f7642..b974336 100644 (file)
@@ -1,5 +1,5 @@
 {{Hardware
-|kontakt=[[Benutzer:Kasalehlia|Kasalehlia]], [[Benutzer:Daniel Bohrer|Daniel Bohrer]]
+|kontakt=[[Benutzer:Kasalehlia|Kasalehlia]], [[Benutzer:Daniel Bohrer|Daniel Bohrer]], [[Benutzer:chrissi^|chrissi^]]
 |status=working
 |ort=[[endor]]
 |beschreibung=VM für [[Vorstand]]sfoo
 * Netzwerk intern, per DHCP
 
 * gitolite3 in <tt>/var/lib/gitolite3/</tt>, user <tt>git</tt>
-** Git-Hooks im Admin-Repo: siehe http://gitolite.com/gitolite/gitolite.html#hooks
-* (TODO:) SSH via [[gandolf]], Port 2222
-* nginx-webroot in <tt>/var/www/html</tt>
-** (TODO:) HTTP via [[gandolf]]
+* <tt>s0v-finanzen</tt>-Repo:
+** <s>Git-Hooks im Admin-Repo: siehe http://gitolite.com/gitolite/gitolite.html#hooks</s>
+** s0v-finanzen-Hook-Scripte sind in <tt>/var/lib/gitolite3/scripts</tt>
+** Hook ist manuell im Repository angelegt
+** TODO: Nightly-Tests integrieren
+* SSH via Port-Forwarding von [[gandolf]], Port 2222
+* Alle Dateien in <tt>/var/www/html</tt> werden auf [[regolas]] gesynct, sobald die Datei <tt>/var/www/html/.dirty</tt> angelegt wird (z.B. durch Ausführen von <tt>/usr/local/bin/regolas-rsync</tt>, was auch stündlich als Cronjob geschieht). Die Dateien sind damit unter https://data.stratum0.org erreichbar.
+
+=== Skripte etc ===
+/home/regolas-rsync/bin/regolas-rsync:
+ #!/bin/sh
+ rsync \
+   --recursive --delete --stats \
+   --chmod=D2755,F644 \
+   --exclude='.*' \
+   /var/www/html/ theodem-rsync@regolas:/var/www/data.stratum0.org/ | \ 
+   sed 's/^/regolas-rsync: /'  
+
+/etc/systemd/system/regolas-rsync.service:
+ [Unit]
+ Description=rsync everything from /var/www/html to regolas
+ Requires=network.target
+ [Service]
+ User=regolas-rsync
+ Group=www-data
+ ExecStart=/bin/sh -c '                            \
+   while true; do                                  \
+     if [ -r /var/www/html/.dirty ]; then          \
+       /home/regolas-rsync/bin/regolas-rsync;      \
+       rm -f /var/www/html/.dirty;                 \
+     fi;                                           \
+     sleep 1;                                      \                                                    
+   done'
+ Restart=always
+ [Install]
+ WantedBy=multi-user.target
+
+
 
 [[Kategorie:Virtuelle Maschine]]
 [[Kategorie:Infrastruktur]]
This page took 0.032722 seconds and 4 git commands to generate.