Theodem

Aus Stratum 0
Wechseln zu:Navigation, Suche
Theodem
Beschreibung: VM für Vorstandsfoo
Ort: endor
Status: working (Was heißt das?)
Kontakt: Kasalehlia, Daniel Bohrer, chrissi^

SSH-Keys

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

$ for i in  /etc/ssh/ssh_host_*.pub; do ssh-keygen -lf $i; done
1024 ea:74:1e:22:63:7e:48:29:eb:60:c7:0c:2f:3c:56:60 /etc/ssh/ssh_host_dsa_key.pub (DSA)
256 ad:de:1a:1f:2b:8f:e4:5c:cb:72:0a:e2:f3:48:73:b1 /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
256 2e:f0:ac:eb:83:6d:5c:5a:20:8f:8f:16:7a:8a:e9:13 /etc/ssh/ssh_host_ed25519_key.pub (ED25519)
2048 a3:28:ca:9f:9a:f5:ee:b7:5e:13:7a:9d:35:db:94:ca /etc/ssh/ssh_host_rsa_key.pub (RSA)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXeHGPAAoJELJBPGbdLD/qO2QP/1ATa80NxMB5CHzpyWBq3tqV
zZYMAH2Hx1CQWZDQ/ATTfzt4duGL9REOVlkWIjsYlIEKgCSWT5vv9fuuDJIbKjfj
otPgB7SHZ5J9O4HtduneKNxWFb2VQvZiW7GD0Rrps2WD7PHtHmF2BjjkemWwkL1a
9AdpxxHfUB8Jr+06ciIe/z94mFlCPpr4phe1HW5WvPP/AlrIf+GYVCZL3J3FIcxh
HUGcykabjAoYhW6LDKL8ovVJkn8tf38D3LUJv7fePOGb9SFk/xf6JO30mveIRChz
pMUhyqPg6/qlZ4itxzFAzYs61hovK8PnD6eBk87PtJS2GE5jWnMmyO2y2xmQpGQH
c10Zq477R6useUDjc7xq/R6Ays5wM6extw8KA5UrQRikifA0yS0MdVnlqWbTufYj
9mlV0BBGPYN/zA55ui/mp2cDA9ph5/m+ZM5AC3mh8jxYMTWPEUBhCAK4UWfYjDy3
W6aX/WxV+hcQAivG1K97Skd3DIdSsokCVFoYrJMJ8SvVmI3kTTZL5AwcmW4A1s8A
fW5Oq2kIc5h6indDyy8tgN3dQodMWl5Nd5okEomCaIiT4YFMP65k5rZMLA8PE9Fv
JVYo/6IA7M+8qs5/hMVAbSNqZnm1CntgKNmSM2T8OWlyNyuxzb1AR2lM2CdIcrFf
tsFJqwX82h1NsOre6Lec
=OiC3
-----END PGP SIGNATURE-----

Doku

  • Debian jessie, systemd
  • 512 MB RAM
  • 6 GB Platte
  • 2 CPU-Kerne
  • Netzwerk intern, per DHCP
  • gitolite3 in /var/lib/gitolite3/, user git
  • s0v-finanzen-Repo:
  • SSH via Port-Forwarding von gandolf, Port 2222
  • Alle Dateien in /var/www/html werden auf regolas gesynct, sobald die Datei /var/www/html/.dirty angelegt wird (z.B. durch Ausführen von /usr/local/bin/regolas-rsync). 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