Editing Admin-Toolkit

From Chaosdorf Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Project
[[File:Admin_Icinga.png]]
|name=Admin-Toolkit
 
|description=Debian / Arch Linux Admin Helpers
{{#set:
|project category=Software
| Has image=File:Admin_Icinga.png
|image=Admin_Icinga.png
| Has description=Debian / ArchLinux Admin Helpers
|status=stable
|people=derf, mxey
|source=https://github.com/chaosdorf/chaosdorf-admin-toolkit{{!}}chaosdorf-admin-toolkit
}}
}}
{{English version}}


Zur einfacheren Verwaltung der Chaosdorf-Server und weiterer Hosts existiert das Chaosdorf-Admin-Toolkit.
For easier management of Chaosdorf hosts.


Dieses ist ein in [http://git-scm.com/ git] getracktes Debian-Paket, welches einfach auf jedem von uns administrierten Host installiert wird und somit einen Teil der nötigen zusätzlichen Konfigurationsdateien, Skripte etc. bereitstellt. Im Vergleich zu manuellem Rumgefrickel in /usr/local senkt dies den Administrationsaufwand deutlich. Vor allem muss man sich nicht mehr darum sorgen, dass diese Dateien auf den verschiedenen Hosts auf dem gleichen Stand sind.
The admin toolkit is a [http://git-scm.com/ git] tracked Debian package, which is installed on any host administrated by us (like the chaosdorf.de servers and the space's router). It provides the hosts with most of the required scripts and configs, which saves a lot of fiddling around in /usr/local and especially ensures that all hosts are up-to-date.


[https://github.com/chaosdorf/chaosdorf-admin-toolkit Das Repository auf GitHub]
[http://github.com/chaosdorf/chaosdorf-admin-toolkit chaosdorf-admin-toolkit on github]


== Fabric ==
= Fabric =


Zum Ausrollen des neuesten Admin-Toolkit-Releases benutzen wir [http://fabfile.org/ fabric]. Die Software hat leider noch ein paar Macken,
We use [http://fabfile.org/ fabric] to roll out package updates. The software still got some problems, but "fab configs deploy:2011.09.07" is way more comfortable than running scp and ssh for every host.
aber insgesamt ist "fab configs deploy:2011.09.07" deutlich angenehmer zu tippen, als jedes mal die entsprechenden Befehle aus der Shell-History zu
fischen und anzupassen.


* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/fabfile.py fabfile.py]
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/fabfile.py fabfile.py]


== NSCA-Helfer ==
= NSCA helpers =


Unsere Nagios-Checks werden lokal per cron ausgeführt und dann per nsca-ng auf den Monitoringserver geschoben. Damit wir nicht die gemeinsamen Checks doppelt definiert haben, sind sie zentral konfiguriert und werden dann von einem weiteren kleinen Perlskript ausgeführt.
Our nagios checks run locally via cron, the results are transmitted via "send_nsca". They are configured for all hosts in one central file, which is parsed by a custom perl script.


* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-passive/passive_checks.cfg passive_checks.cfg]
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-passive/passive_checks.cfg passive_checks.cfg]
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-passive/submit_checks submit_checks]
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-passive/submit_checks submit_checks]


== Nagios Checkskripte ==
= Nagios checks =
 
Diverse nicht in Debian enthaltene und ein paar eigene. Zum Beispiel:
 
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/local/check_cert_expire check_cert_expire] erinnert uns rechtzeitig, unsere SSL-Zertifikate zu erneuern. Deutlich komfortabler als Kalendereinträge.
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/local/check_git_status check_git_status] überprüft, ob in "/etc" (etckeeper) oder "/usr/local" (normales git-repo) irgendwelche Änderungen liegen, die noch nicht commitet wurden.  Durch ausreichend hohe Check- und Retry-Intervalle in der Icinga-Config stört es auch nicht bei üblichen Adminarbeiten.
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/remote/check_websites check_websites] überprüft auf Basis einer [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/remote/chaosdorf_websites.ini Config],ob diverse URLs auf unseren diversen vhosts den richtigen Status liefern (401 Authorization required, 200 OK oder 301 Redirect auf spezifische andere URL).
 
== Icinga-Goodies ==
 
Wir haben einen Bot mit dem Namen icinga in #chaosdorf. Es ist ein simples,
an das Icinga angeschlossenes Perlskript, welches uns sofort mit irgendwelchen
Meldungen versorgt. Einerseits weiß dann sofort jeder Bescheid, und
andererseits entstehen dadurch so schöne Situationen wie diese:


20:59          <--  mete!~mete@shells.chaosdorf.de [Remote host closed the connection]
Custom or not shipped by Debian.
20:59          <--  penma_!~penma@shells.chaosdorf.de [Read error: Connection reset by peer]
20:59          <--  muzy!~muzy@shells.chaosdorf.de [Remote host closed the connection]
[ ... und noch ein paar mehr ... ]
21:09        icinga  PROBLEM host alert: shells.chaosdorf.de is DOWN


O'RLY? :-)
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/local/check_cert_expire check_cert_expire] reminds us when it's time to renew our SSL certificate. Much better than calendar entries.
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/local/check_git_status check_git_status] makes sure noone forgot to commit their changes in /etc (etckeeper) or /usr/local (plain git repo). The check intervals are pretty long, so it doesn't interfere with administrative work.
* [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/remote/check_websites check_websites] reads a little [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/nagios-checks/remote/chaosdorf_websites.ini config] to see if all URL / VHost combinations work or redirect as expected.


(for the record: Es war eine geplante Downtime, die wir nur nicht im Icinga eingetragen hatten)
= Icinga goodies =


== checkrestart-Hook ==
We have a bot called '''icinga''' in #chaosdorf. It's a simple perl script connected to Icinga, which immediately spams service alerts / recoveries into the channel. Handy if you check IRC more frequently than mail and if people wonder if something is b0rked or not.


Nach jedem Systemupdate wird über einen dpkg-Hook nachgeschaut, ob noch Daemons mit veralteten Libraryversionen laufen, so dass man diese ggf. neustarten kann.
= checkrestart hook =


== Backups ==
After every system upgrade, a dpkg hook runs checkrestart to find daemons running with outdated library versions.


Auch Backups werden über das Debianpaket geregelt. Sie werden von [https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/backup/backup_external backup_external] lokal generiert, komprimiert und verschlüsselt, anschließend per SFTP auf einen anderen Host übertragen.
= Backups =


Die Backups sind mit einem speziellen Adminkey verschlüsselt. Geplant ist, sie in Zukunft auf mehreren Hosts zu speichern. Das vorhandene Skript ist darauf bereits ausgelegt.
[https://github.com/chaosdorf/chaosdorf-admin-toolkit/blob/master/backup/backup_external backup_external] locally collects, compresses and encrypts important data and then transmits it to a remote host via SFTP. The backups are encrypted with a dedicated Admin key.


== Dependencies ==
= Dependencies =


Als Hilfe zum Aufsetzen neuer Systeme gibt's noch ein paar Dependencies auf
Like vim, etckeeper, git, zsh. So we don't need to install our standard software by hand (or maybe forget a package).
Debianpakete, u.a. etckeeper, git, vim und zsh.


[[Category:Projects]]
[[Category:Projects]]
Please note that all contributions to Chaosdorf Wiki are considered to be released under the Attribution 3.0 Unported (see Chaosdorf Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)