admin:services:agir.chapril.org
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
admin:services:agir.chapril.org [2020/01/08 16:07] – admin | admin:services:agir.chapril.org [2021/12/04 14:38] (Version actuelle) – Ajout génération de la clé d'API Redmine admin | ||
---|---|---|---|
Ligne 81: | Ligne 81: | ||
server { | server { | ||
- | ======= Service | + | listen 443 ssl; |
+ | listen [::]:443 ssl; | ||
+ | ssl on; | ||
+ | |||
+ | server_name | ||
- | Redirection vers le projet Chapril dans le Redmine de l' | + | access_log / |
+ | error_log / | ||
+ | # include / | ||
+ | ssl_certificate | ||
+ | ssl_certificate_key / | ||
- | ===== Déploiement ===== | + | include / |
+ | include / | ||
- | ==== DNS ==== | + | return 301 https:// |
- | Configuration | + | } |
+ | </ | ||
+ | |||
+ | Création | ||
< | < | ||
- | =(^-^)=root@dns: | + | mkdir /var/log/nginx/agir.chapril.org/ |
- | diff --git a/ | + | ln -sf /etc/nginx/sites-available/agir.chapril.org /etc/nginx/sites-enabled/ |
- | index a5368c5..cb20fcd 100644 | + | |
- | --- a/bind/zones/masters/ | + | |
- | +++ b/bind/zones/masters/chapril.org | + | |
- | @@ -3,7 +3,7 @@ | + | |
- | + | ||
- | $TTL 1h | + | |
- | | + | |
- | - | + | |
- | + | + | |
- | 4h ; Refresh | + | |
- | 1h ; Retry | + | |
- | 1w ; Expire | + | |
- | @@ -50,6 +50,10 @@ icinga2 CNAME galanga.april.org. | + | |
- | | + | |
- | | + | |
- | + | ||
- | +; redirections | + | |
- | +agir CNAME fip | + | |
- | +wiki CNAME fip | + | |
- | + | + | |
- | ; XMPP (old) | + | |
- | | + | |
- | | + | |
</ | </ | ||
Activation : | Activation : | ||
< | < | ||
- | rndc reload | + | nginx -t |
+ | systemctl | ||
</ | </ | ||
- | + | Création | |
- | ==== Bastion ==== | + | |
- | Configuration | + | |
< | < | ||
- | =(^-^)=root@bastion: | + | mkdir /var/log/nginx/agir.chapril.org/ |
- | diff --git a/dehydrated/domains.txt b/dehydrated/ | + | ln -sf /etc/nginx/sites-available/agir.chapril.org |
- | index b53ff9c..662eb8a 100644 | + | |
- | --- a/dehydrated/domains.txt | + | |
- | +++ b/dehydrated/domains.txt | + | |
- | @@ -15,3 +15,5 @@ pad.chapril.org | + | |
- | | + | |
- | | + | |
- | | + | |
- | +agir.chapril.org | + | |
- | +wiki.chapril.org | + | |
</ | </ | ||
Activation : | Activation : | ||
< | < | ||
- | dehydrated | + | nginx -t |
+ | systemctl reload nginx | ||
</ | </ | ||
- | Configuration du serveur web sur la vm bastion | + | ==== Supervision ==== |
+ | |||
+ | Monitoring ajouté | ||
< | < | ||
- | =(^-^)=root@bastion:/etc/nginx/sites-available# cat wiki.chapril.org | + | =(^-^)=root@admin:/etc/icinga2/zones.d/ |
- | server | + | diff --git a/ |
- | | + | index da31c6c..53127e4 100644 |
- | | + | --- a/ |
- | + | +++ b/ | |
- | | + | @@ -25,6 +25,20 @@ object Host " |
+ | disk_partitions = "/ | ||
+ | } | ||
+ | |||
+ | + vars.http_vhosts[" | ||
+ | + http_vhost = " | ||
+ | + http_ssl = true | ||
+ | + http_uri = "/" | ||
+ | + http_expect = " | ||
+ | + } | ||
- | access_log | + | /* Define notification mail attributes for notification apply rules in `notifications.conf`. */ |
- | | + | vars.notification[" |
+ | | ||
- | # include | + | </code> |
- | include / | + | |
- | include / | + | |
- | include / | + | |
- | } | + | |
- | server { | + | ===== Compte pour la création de note Redmine ===== |
- | listen 443 ssl; | + | |
- | listen [::]:443 ssl; | + | |
- | ssl on; | + | |
- | + | ||
- | server_name wiki.chapril.org; | + | |
- | access_log / | + | Dans le Redmine : |
- | | + | * un compte '' |
+ | * un rôle '' | ||
+ | * le compte '' | ||
+ | * Une clé d'API Redmine a été générée : se connecter sur https://agir.april.org avec le compte chagirbot puis cliquer sur « Mon compte » et aller dans « Clé d' | ||
- | # include | + | Sur les vm, la clé est disponible dans le fichier '' |
- | ssl_certificate | + | |
- | ssl_certificate_key / | + | |
- | include / | ||
- | include / | ||
- | return 301 https://wiki.april.org/w/Chapril; | + | ===== Chagirbot (Redminebot) ===== |
- | } | + | |
- | </ | + | Redminebot (agirbot sur le réseau Freenode) est un bot qui analyse régulièrement les fichiers Atom de '' |
+ | |||
+ | À l' | ||
+ | |||
+ | Il a été écrit en python après grosse réécriture du script redmine IRC bot. | ||
+ | |||
+ | Agirbot possède un dépôt Git sur Agir : https://agir.april.org/projects/admins/ | ||
+ | |||
+ | ==== Déploiement ==== | ||
+ | Sur Freenode IRC, déclarer (register) le nickname '' | ||
- | Création du dossier de logs : | ||
< | < | ||
- | mkdir / | + | 08:17 -NickServ(NickServ@services.)- |
- | ln -sf / | + | 08:18 < |
+ | 08:18 -NickServ(NickServ@services.)- An email containing nickname activation instructions has been sent to chagirbot@chapril.org. | ||
+ | 08:18 -NickServ(NickServ@services.)- If you do not complete registration within one day, your nickname will expire. | ||
+ | 08:18 -NickServ(NickServ@services.)- chagirbot is now registered to chagirbot@chapril.org, with the password JxQwAKjwC3HFWTfzwiq7. | ||
+ | 08:18 -NickServ(NickServ@services.)- | ||
+ | 08:18 -NickServ(NickServ@services.)- For frequently-asked questions about the network, please see the | ||
+ | 08:18 -NickServ(NickServ@services.)- Knowledge Base page (http://freenode.net/kb/all). Should you need more | ||
+ | 08:18 -NickServ(NickServ@services.)- help you can /join #freenode to find network staff. | ||
</ | </ | ||
- | Activation | + | Créer un utilisateur '' |
- | < | + | < |
- | nginx -t | + | adduser |
- | systemctl reload nginx | + | |
</ | </ | ||
- | Création du dossier | + | Installation des dépendances |
- | < | + | < |
- | mkdir / | + | apt-get install python-iso8601 python-twisted python-dateutil python-feedparser |
- | ln -sf / | + | |
</ | </ | ||
- | Activation | + | Clonage : |
+ | <code bash> | ||
+ | cd / | ||
+ | git clone april@agir.cluster.april.org:/ | ||
+ | </ | ||
+ | |||
+ | Définition de l' | ||
+ | <code bash> | ||
+ | cd / | ||
+ | mkdir bin | ||
+ | cd bin | ||
+ | ln -s ../ | ||
+ | </ | ||
+ | |||
+ | Déploiement du fichier de configuration : | ||
+ | <code bash> | ||
+ | cp / | ||
+ | cd / | ||
+ | mkdir conf | ||
+ | cd conf | ||
+ | ln -s / | ||
+ | </ | ||
+ | |||
+ | Adapter le fichier ''/ | ||
+ | * mettre le mot de passe IRC du nickname bot ; | ||
+ | * définir projet '' | ||
+ | |||
+ | Définir le service dans systemd : | ||
+ | <code bash> | ||
+ | cp / | ||
+ | ln -s / | ||
+ | </ | ||
+ | |||
+ | Adapter le fichier ''/ | ||
+ | * le bon chemin ; | ||
+ | * le bon compte ; | ||
+ | * le bon groupe ; | ||
+ | * le chemin du fichier de configuration passé en paramètre ExecStart. | ||
+ | |||
+ | Configurer le lancement du service au boot : | ||
+ | <code bash> | ||
+ | (April) root@bots: | ||
+ | Created symlink / | ||
+ | </ | ||
+ | |||
+ | Ajouter une sonde dans Icinga2 (''/ | ||
< | < | ||
- | nginx -t | + | vars.process[" |
- | systemctl reload nginx | + | |
+ | procs_argument = " | ||
+ | procs_critical = " | ||
+ | } | ||
</ | </ | ||
+ | |||
+ | ==== Logs ==== | ||
+ | Des logs sont consultables via SystemD : | ||
+ | <code bash> | ||
+ | journalctl -f -u chagirbot | ||
+ | </ | ||
+ | |||
+ | |||
admin/services/agir.chapril.org.1578499654.txt.gz · Dernière modification : 2020/01/08 16:07 de admin