Configuration de la VM ispconfig

De Wiki LDN
Sauter à la navigation Sauter à la recherche

Introduction

Les recettes Puppet disponibles dans le dépôt LDN, qui sont appliquées selon le nom du conteneur, configurent tout ce qui est nécessaire pour qu'ils assurent leurs fonctionnalités. Pour chaque conteneur, il est également indispensable de lancer l'installeur ISPConfig en renseignant les réponses indiquées dans cette documentation. Seul le conteneur web dispose d'une particularité « gênante » : la compilation du paquet Debian pour Jailkit et son installation, qui se fait facilement en copiant-collant la liste des commandes.

Pour l'ensemble des actions, il suffit de suivre à la lettre et pas-à-pas la présente documentation. Les recettes comme la documentation sont directement inspirées de la partie multi-serveurs de la documentation officielle (payante à 5€ et achetée par Luc) de ISPConfig, avec comme plus grosse adaptation l'utilisation du mysql de panel comme MySQL centralisé pour les configurations et la séparation de panel et web.

Si le DNS n'est pas encore en place, il est nécessaire de renseigner les adresses IPv6 du conteneur panel dans le /etc/hosts de chacun des conteneurs avant l'exécution du script ISPConfig, et de renseigner l'ensemble des adresses IPv6 des conteneurs dans le conteneur panel.

Un accès au dépôt GIT hiera est indispensable pour consulter les mots de passe à renseigner.

Vocabulaire :

  • machine : Machine physique
  • VM : Machine virtuelle KVM (dans une machine)
  • conteneur : Conteneur LXC (dans une VM)

Configuration de la VM ispconfig

TODO: À faire.

Installation des conteneurs

ispconfig-panel

Depuis la VM ispconfig :

lxc-create.sh -n ispconfig-panel -g ispconfig -I 89.234.141.88/32 -J 2a00:5881:8100:10fc::2/64 -h 5

Depuis le conteneur ispconfig-panel :

hostname ispconfig-panel.ldn-fai.net
echo '2a00:5881:8100:10fc::2 ispconfig-panel.ldn-fai.net' >> /etc/hosts
apt-get update;apt-get install -y wget
cd /tmp;wget http://pub.sebian.fr/pub/bootstrap.sh;sh bootstrap.sh -p false -v 3.2.4
puppet agent --server puppet.ldn-fai.net --pluginsync true --test

Depuis la VM puppet :

puppet cert sign ispconfig-panel.ldn-fai.net

Depuis le conteneur ispconfig-panel :

puppet agent --server puppet.ldn-fai.net --pluginsync true --test
cd /tmp;wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xf ISPConfig-3-stable.tar.gz
php -q ispconfig3_install/install/install.php

Si le serveur DNS ne sait pas résoudre les FQDN des containers qui sont créés par la suite, le fichier /etc/hosts doit tous les contenirs. Et si le serveur DNS est utilisé, il faut s'assurer que les reverses sont configurés et correspondent bien aux FQDN.

Réponses aux questions de l'installeur (les réponses HIERA sont dans hiera/ldn.yaml) :

Select language (en,de) [en]: en
Installation mode (standard,expert) [standard]: expert
Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [ispconfig-panel.ldn-fai.net]: 

MySQL server hostname [localhost]: 
MySQL root username [root]: 
MySQL root password []: HIERA->ispconfig-mysql-panel-root-pwd
MySQL database to create [dbispconfig]: ic_panel
MySQL charset [utf8]: 

ISPConfig mysql database username [ispconfig]: ic_panel
ISPConfig mysql database password [05dfd0d3b3960d8c62bba72a569b0204]: HIERA->ispconfig-mysql-panel-panel-pwd

Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: n
 
Configure Mail (y,n) [y]: n
Configure Jailkit (y,n) [y]: n
Configure FTP Server (y,n) [y]: n
Configure DNS Server (y,n) [y]: n
Configure Apache Server (y,n) [y]: 
Configuring Apache
Configuring Vlogger
Configuring Apps vhost
Configure Firewall Server (y,n) [y]: n

Install ISPConfig Web Interface (y,n) [y]: y
ISPConfig Port [8080]: 443
Enable SSL for the ISPConfig web interface (y,n) [y]: y

Generating RSA private key, 4096 bit long modulus
-----
Country Name (2 letter code) [AU]:FR
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Lorraine Data Network
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:ispconfig-panel.ldn-fai.net
Email Address []:
A challenge password []:
An optional company name []:

ispconfig-mail

Depuis la VM ispconfig :

lxc-create.sh -n ispconfig-mail -g ispconfig -I 89.234.141.87/32 -J 2a00:5881:8100:10fc::3/64 -h 100

Depuis le conteneur ispconfig-mail :

hostname ispconfig-mail.ldn-fai.net
echo '2a00:5881:8100:10fc::3 ispconfig-mail.ldn-fai.net' >> /etc/hosts
apt-get update;apt-get install -y wget
cd /tmp;wget http://pub.sebian.fr/pub/bootstrap.sh;sh bootstrap.sh -p false -v 3.2.4
puppet agent --server puppet.ldn-fai.net --pluginsync true --test

Depuis la VM puppet :

puppet cert sign ispconfig-mail.ldn-fai.net

Depuis le conteneur ispconfig-mail :

puppet agent --server puppet.ldn-fai.net --pluginsync true --test
cd /tmp;wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xf ISPConfig-3-stable.tar.gz
php -q ispconfig3_install/install/install.php

Réponses aux questions de l'installeur (les réponses HIERA sont dans hiera/ldn.yaml) :

Select language (en,de) [en]: en
Installation mode (standard,expert) [standard]: expert
Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [ispconfig-mail.ldn-fai.net]: 

MySQL server hostname [localhost]: ispconfig-panel.ldn-fai.net
MySQL root username [root]: ic_su_mail
MySQL root password []: HIERA->ispconfig-mysql-panel-su-mail-pwd
MySQL database to create [dbispconfig]: ic_mail
MySQL charset [utf8]: 

ISPConfig mysql database username [ispconfig]: ic_mail
ISPConfig mysql database password [c7fc50f1e204d63628642f05d9527ca6]: HIERA->ispconfig-mysql-panel-mail-pwd
 
Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: y

MySQL master server hostname []: ispconfig-panel.ldn-fai.net
MySQL master server root username [root]: ic_su_mail
MySQL master server root password []: HIERA->ispconfig-mysql-panel-su-mail-pwd
MySQL master server database name [dbispconfig]: ic_panel
 
Configure Mail (y,n) [y]: y
Generating a 4096 bit RSA private key
-----
Country Name (2 letter code) [AU]:FR
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Lorraine Data Network
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:ispconfig-mail.ldn-fai.net
Email Address []:
 
Configure Jailkit (y,n) [y]: n
Configure FTP Server (y,n) [y]: n
Configure DNS Server (y,n) [y]: n
Configure Firewall Server (y,n) [y]: n
Install ISPConfig Web Interface (y,n) [n]: n

ispconfig-db

Depuis la VM ispconfig :

lxc-create.sh -n ispconfig-db -g ispconfig -J 2a00:5881:8100:10fc::4/64 -h 20

Depuis le conteneur ispconfig-db (se démmerder avec l'absence d'IPv4 si le script est toujours sur le serveur d'un autre âge de sebian) :

hostname ispconfig-db.ldn-fai.net
echo '2a00:5881:8100:10fc::4 ispconfig-db.ldn-fai.net' >> /etc/hosts
apt-get update;apt-get install -y wget
cd /tmp;wget http://pub.sebian.fr/pub/bootstrap.sh;sh bootstrap.sh -p false -v 3.2.4
puppet agent --server puppet.ldn-fai.net --pluginsync true --test

Depuis la VM puppet :

puppet cert sign ispconfig-db.ldn-fai.net

Depuis le conteneur ispconfig-db (se démmerder avec l'absence d'IPv4 si le tarball est toujours sur un serveur d'un autre âge pas de sebian) :

puppet agent --server puppet.ldn-fai.net --pluginsync true --test
cd /tmp;wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xf ISPConfig-3-stable.tar.gz
php -q ispconfig3_install/install/install.php

Réponses aux questions de l'installeur (les réponses HIERA sont dans hiera/ldn.yaml) :

Select language (en,de) [en]: en
Installation mode (standard,expert) [standard]: expert
Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [ispconfig-db.ldn-fai.net]: 

MySQL server hostname [localhost]: 
MySQL root username [root]: 
MySQL root password []: HIERA->ispconfig-mysql-db-root-pwd
MySQL database to create [dbispconfig]: ic_db
MySQL charset [utf8]: 

ISPConfig mysql database username [ispconfig]: ic_db
ISPConfig mysql database password [ae91147d6e26432386ce90c35bc4b855]: HIERA->ispconfig-mysql-db-db-pwd

Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: y

MySQL master server hostname []: ispconfig-panel.ldn-fai.net
MySQL master server root username [root]: ic_su_db
MySQL master server root password []: HIERA->ispconfig-mysql-panel-su-db-pwd
MySQL master server database name [dbispconfig]: ic_panel

Configure Mail (y,n) [y]: n
Configure Jailkit (y,n) [y]: n
Configure FTP Server (y,n) [y]: n
Configure DNS Server (y,n) [y]: n
Configure Apache Server (y,n) [y]: n
Configure Firewall Server (y,n) [y]: n
Install ISPConfig Web Interface (y,n) [n]: n

ispconfig-dns

Depuis la VM ispconfig :

lxc-create.sh -n ispconfig-dns -g ispconfig -I 89.234.141.86/32 -J 2a00:5881:8100:10fc::5/64 -h 5

Depuis le conteneur ispconfig-dns :

hostname ispconfig-dns.ldn-fai.net
echo '2a00:5881:8100:10fc::5 ispconfig-dns.ldn-fai.net' >> /etc/hosts
apt-get update;apt-get install -y wget
cd /tmp;wget http://pub.sebian.fr/pub/bootstrap.sh;sh bootstrap.sh -p false -v 3.2.4
puppet agent --server puppet.ldn-fai.net --pluginsync true --test

Depuis la VM puppet :

puppet cert sign ispconfig-dns.ldn-fai.net

Depuis le conteneur ispconfig-dns :

puppet agent --server puppet.ldn-fai.net --pluginsync true --test
cd /tmp;wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xf ISPConfig-3-stable.tar.gz
php -q ispconfig3_install/install/install.php

Réponses aux questions de l'installeur (les réponses HIERA sont dans hiera/ldn.yaml) :

Select language (en,de) [en]: en
Installation mode (standard,expert) [standard]: expert
Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [ispconfig-dns.ldn-fai.n

MySQL server hostname [localhost]: ispconfig-panel.ldn-fai.net
MySQL root username [root]: ic_su_dns
MySQL root password []: HIERA->ispconfig-mysql-panel-su-dns-pwd
MySQL database to create [dbispconfig]: ic_dns
MySQL charset [utf8]: 

ISPConfig mysql database username [ispconfig]: ic_dns
ISPConfig mysql database password [4126e1d65372075ee8aa842053806f0a]: HIERA->ispconfig-mysql-panel-dns-pwd

Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: y

MySQL master server hostname []: ispconfig-panel.ldn-fai.net
MySQL master server root username [root]: ic_su_dns
MySQL master server root password []: HIERA->ispconfig-mysql-panel-su-dns-pwd
MySQL master server database name [dbispconfig]: ic_panel

Configure Mail (y,n) [y]: n
Configure Jailkit (y,n) [y]: n
Configure FTP Server (y,n) [y]: n
Configure DNS Server (y,n) [y]: y
Configure Apache Server (y,n) [y]: n
Configure Firewall Server (y,n) [y]: n
Install ISPConfig Web Interface (y,n) [n]: n

ispconfig-web

Depuis la VM ispconfig :

lxc-create.sh -b -n ispconfig-web -g ispconfig -I 89.234.141.85/32 -J 2a00:5881:8100:10fc::6/64 -h 200

Compilation et installation de Jailkit, depuis le conteneur ispconfig-web :

apt-get install -y --no-install-recommends build-essential autoconf automake1.9 libtool flex bison debhelper
cd /tmp;wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
tar xvfz jailkit-2.14.tar.gz
cd jailkit-2.14;./debian/rules binary
dpkg -i ../jailkit_2.14-1_*.deb
apt-get autoremove --purge -y build-essential autoconf automake1.9 libtool flex bison debhelper
apt-get autoremove -y --purge

Depuis le conteneur ispconfig-web :

hostname ispconfig-web.ldn-fai.net
echo '2a00:5881:8100:10fc::6 ispconfig-web.ldn-fai.net' >> /etc/hosts
apt-get update;apt-get install -y wget
cd /tmp;wget http://pub.sebian.fr/pub/bootstrap.sh;sh bootstrap.sh -p false -v 3.2.4
puppet agent --server puppet.ldn-fai.net --pluginsync true --test

Depuis la VM puppet :

puppet cert sign ispconfig-web.ldn-fai.net

Depuis le conteneur ispconfig-web :

puppet agent --server puppet.ldn-fai.net --pluginsync true --test
cd /tmp;wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xf ISPConfig-3-stable.tar.gz
php -q ispconfig3_install/install/install.php

Réponses aux questions de l'installeur (les réponses HIERA sont dans hiera/ldn.yaml) :

Select language (en,de) [en]: en
Installation mode (standard,expert) [standard]: expert
Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [ispconfig-web.ldn-fai.net]: 

MySQL server hostname [localhost]: ispconfig-panel.ldn-fai.net
MySQL root username [root]: ic_su_web
MySQL root password []: HIERA->ispconfig-mysql-panel-su-web-pwd
MySQL database to create [dbispconfig]: ic_web
MySQL charset [utf8]: 

ISPConfig mysql database username [ispconfig]: ic_web
ISPConfig mysql database password [ff47e4a200d302b4b18160326fa607c5]: HIERA->ispconfig-mysql-panel-web-pwd

Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: y

MySQL master server hostname []: ispconfig-panel.ldn-fai.net
MySQL master server root username [root]: ic_su_web
MySQL master server root password []: HIERA->ispconfig-mysql-panel-su-web-pwd
MySQL master server database name [dbispconfig]: ic_panel

Configure Mail (y,n) [y]: n
Configure Jailkit (y,n) [y]: y
Configure FTP Server (y,n) [y]: y
Configure DNS Server (y,n) [y]: n
Configure Apache Server (y,n) [y]: y
Configure Firewall Server (y,n) [y]: n
Install ISPConfig Web Interface (y,n) [n]: n

webmail

Ce conteneur ne fait pas partie du projet ispconfig mais il trouve sa place dans la VM en tant que service destiné directement aux adhérents.

Depuis la VM ispconfig :

lxc-create.sh -b -n webmail -g ispconfig -I 89.234.141.84/32 -J 2a00:5881:8100:10fc::7/64 -h 5

Depuis le conteneur webmail :

hostname webmail.ldn-fai.net
echo '2a00:5881:8100:10fc::7 webmail.ldn-fai.net' >> /etc/hosts
apt-get update;apt-get install -y wget
cd /tmp;wget http://pub.sebian.fr/pub/bootstrap.sh;sh bootstrap.sh -p false -v 3.2.4
puppet agent --server puppet.ldn-fai.net --pluginsync true --test

Depuis la VM puppet :

puppet cert sign webmail.ldn-fai.net

Depuis le conteneur webmail :

puppet agent --server puppet.ldn-fai.net --pluginsync true --test

Installation de Roundcube et ses plugins :

  • Supprimer ce que contient /var/www/webmail/ (généré par Puppet).
  • Restaurer le répertoire /var/www/webmail/ depuis les sauvegardes.
  • Depuis le conteneur webmail :
puppet agent -t

Configuration initiale de ISPConfig

Attributions

Se connecter au panel (admin/admin) :

   https://ispconfig-panel.ldn-fai.net

Dans System > Server Services, arranger les fonctionnalités comme ceci :

Ispconfig1.png

Mot de passe admin

Changer le mot de passe admin dans Tools > Password and languages (consulter le password-store LDN pour connaître le mot de passe à utiliser).

Restauration des sauvegardes

TODO: À faire.