Fin de la semaine 3
This commit is contained in:
531
Semaine_03/Esteban-Gauvain-Floren.md
Normal file
531
Semaine_03/Esteban-Gauvain-Floren.md
Normal file
@@ -0,0 +1,531 @@
|
||||
*Esteban, Floren, Gauvain*
|
||||
|
||||
# Projet 1
|
||||
|
||||
## Génèse
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/01/01967ebf4084a1992b8cb524d00bc243f2601c69c8615881" data-crypto-key="cryptpad:PhVMSz9E3GYukXUfxxVlGcaIA0HBYtDQPC06m3+uP4A="></media-tag>
|
||||
|
||||
### 1. Préparation du projet
|
||||
|
||||
- Floren : l'architecte
|
||||
- Esteban : le soutien moral
|
||||
- Gauvain : la petite secrétaire
|
||||
|
||||
#### Notes
|
||||
|
||||
Il se peut que les lignes de code affichées dans les captures d'écran ne soient pas 100% conformes avec les blocs de code tapés au-dessus. C'est normal : nous expérimentons au fur et à mesure, et quand la capture d'écran est faite, il se peut que nous ne nous apercevions d'une coquille ou d'un oubli que bien plus tard. Et qu'un paquet installé (genre NMAP) soit désinstallé plus tard, faute d'usage. Règle du **"moins de paquet = moins de surface d'attaque"**.
|
||||
|
||||
Le résultat est normalement affiché en capture d'écran, mais en cas de discordance, les blocs de code commentés font foi.
|
||||
|
||||
### 2. Définir l'architecture
|
||||
|
||||
#### A. Les Machines Virtuelles
|
||||
|
||||
[ROCKY_LINUX - Installation](https://docs.rockylinux.org/9/guides/9_6_installation/)
|
||||
|
||||
- Rocky Linux sur Hyperviseur
|
||||
- Deux connexions réseau : en Accès par Pont ou Réseau NAT
|
||||
- Pas de GUI
|
||||
|
||||
Nous avons décidé d'utiliser :
|
||||
- 3 VMs Rocky Linux 9.7 (version Boot), les infos sur la version 10 faisant état d'une version peu stabilisée
|
||||
- sur VirtualBox (par simplicité)
|
||||
- En réseau NAT (pour avoir une plage réseau vraiment isolée)
|
||||
- Pas de GUI
|
||||
|
||||
```
|
||||
sudo dnf update -y
|
||||
sudo dnf install -y firewalld nano curl wget
|
||||
|
||||
sudo systemctl enable --now firewalld
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/b0/b0e3f7b2c5672bcc99c1663edcf15c117a3f17174327a5cf" data-crypto-key="cryptpad:W8ya4WJHC8JFuL91qShLtU5NlcOqTtAY5NhRnDa28Ww="></media-tag>
|
||||
|
||||
Synchronisation des serveurs avec `chrony` :
|
||||
*Sur MON/MR*
|
||||
```
|
||||
nano /etc/chrony.conf
|
||||
|
||||
allow 10.0.10.0/24
|
||||
```
|
||||
|
||||
*Sur OSD1*
|
||||
```
|
||||
nano /etc/chrony.conf
|
||||
|
||||
server 10.0.10.11 iburst
|
||||
peer 10.0.10.13 iburst
|
||||
```
|
||||
|
||||
*Sur OSD2*
|
||||
```
|
||||
nano /etc/chrony.conf
|
||||
|
||||
server 10.0.10.11 iburst
|
||||
peer 10.0.10.12 iburst
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/b7/b7e033a10900c45e580f68f01397eb757d842eec7d93f382" data-crypto-key="cryptpad:bG9old1RTNdNOsmzGAg+COvQIxTE3SfkufJLR4P76ks="></media-tag>
|
||||
|
||||
Et on change les noms des machines :
|
||||
```
|
||||
sudo hostnamectl set-hostname ['monmgr', 'osd1', 'osd2']
|
||||
```
|
||||
|
||||
#### B. Configuration du **bonding**
|
||||
|
||||
[REDHAT - Configure Network Bonding](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/networking_guide/ch-configure_network_bonding)
|
||||
|
||||
[Bonding in Rocky Linux](https://www.server-world.info/en/note?os=Rocky_Linux_10&p=bonding)
|
||||
|
||||
- Mode [*active-backup*](https://www.ibm.com/docs/en/linux-on-systems?topic=recommendations-bonding-modes)
|
||||
- Bridge dédié au **bond** *active-backup* dans le Ceph
|
||||
|
||||
Ajouter le bond :
|
||||
```
|
||||
sudo nmcli connection add type bond con-name bond0 ifname bond0 mode active-backup
|
||||
|
||||
sudo nmcli connection add type ethernet ifname enp0s3 master bond0
|
||||
sudo nmcli connection add type ethernet ifname enp0s8 master bond0
|
||||
|
||||
sudo nmcli connection modify bond0 \
|
||||
ipv4.method manual \
|
||||
ipv4.addresses 10.0.10.[11,12,13]/24 \
|
||||
ipv4.gateway 10.0.10.1 \
|
||||
ipv4.dns 1.1.1.1
|
||||
|
||||
sudo nmcli connection up bond0
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/52/5279bfcf999a38ee607e1541ddd33f28e66496900d734aec" data-crypto-key="cryptpad:BTUFNaWv3J08TA3JXDprbwITT99IgroCiZHP9jQ2G8k="></media-tag>
|
||||
|
||||
Vérifications :
|
||||
```
|
||||
cat /proc/net/bonding/bond0
|
||||
|
||||
sudo nmcli device
|
||||
sudo nmcli connection
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/2e/2edba240650f6d1e7590f8c9158507e48065fbd90795b6bc" data-crypto-key="cryptpad:6/8X/hK2S2XkS5fa4Ciwg0rBI98BbGaDwxE4FJcjrcs="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/79/791e0bbb425373c202dcf441deb5d8547725b96207a7d000" data-crypto-key="cryptpad:uljqcx6jWwLfyqWPg6ES6ud/LOySsY+Ct4NB9Yv0csw="></media-tag>
|
||||
|
||||
Vérification de la redondance en débranchant une NIC dans la VM :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/6f/6ffc89e214d2459839bcc46048e0c279bf02f00cca18a1ef" data-crypto-key="cryptpad:C3mIRrhfg0sBPfjiW9tlGHm9QOG2dJaJyexnPz7RMTk="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/4c/4c99131e6dddbe858c608688f6e2cf252f991e2f878986e0" data-crypto-key="cryptpad:Wkw6FmyqY69XxN1p0S18P6Xz1OdABF057EBDdyNjwxQ="></media-tag>
|
||||
|
||||
#### C. Réglages du pare-feu
|
||||
|
||||
[REDHAT - Using and configurind firewalld](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_firewalls_and_packet_filters/using-and-configuring-firewalld_firewall-packet-filters)
|
||||
|
||||
- Zone personnalisée : `ceph-mcs2025`
|
||||
- Associée à l'interface du **bond0**
|
||||
- [Autorisation des ports nécessaires à CEPH](https://docs.redhat.com/fr/documentation/red_hat_ceph_storage/5/html/configuration_guide/ceph-firewall-ports_conf) et associés
|
||||
|
||||
```
|
||||
sudo firewall-cmd --permanent --new-zone=ceph-mcs2025
|
||||
|
||||
# Pour vérifier
|
||||
sudo firewall-cmd --reload
|
||||
sudo firewall-cmd --get-zones
|
||||
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-interface=bond0
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-service=ssh
|
||||
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=80/tcp
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=443/tcp
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=3300-3303/tcp
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=6789/tcp
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=6800-7300/tcp
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=7480/tcp
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=8443/tcp
|
||||
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=123/udp
|
||||
sudo firewall-cmd --permanent --zone=ceph-mcs2025 --add-port=6800-7300/udp
|
||||
|
||||
sudo firewall-cmd --reload
|
||||
```
|
||||
|
||||
Et on vérifie :
|
||||
```
|
||||
sudo firewall-cmd --info-zone=ceph-mcs2025
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/a2/a2ac2b8a91755f1e2f5b8a18bbe32dcc87104db8c402d26f" data-crypto-key="cryptpad:uS+oAUopcYI7IMTpuFEuv5+ZaAQHQPI26N+xYSiROKQ="></media-tag>
|
||||
|
||||
### 3. Installer et configurer Ceph
|
||||
|
||||
#### A. Choix du Ceph
|
||||
|
||||
On a décidé d'utiliser RGW pour diverses raisons :
|
||||
1. c'est celui que nous connaissons le moins (raison éducative)
|
||||
2. c'est un système basé sur une technologie qui devient un standard nuagique (avec AWS S3 repris même par les concurrents)
|
||||
3. parce que pourquoi pas
|
||||
|
||||
#### B. Préparation des noeuds
|
||||
|
||||
[CEPH - cephadm](https://docs.ceph.com/en/squid/cephadm/) | [CEPH - Host Management](https://docs.ceph.com/en/squid/cephadm/host-management/)
|
||||
|
||||
- Installer `cephadm` version **`squid`** (*les deux dernières, `latest` et `tentacles` étant non stabilisées*)
|
||||
- Déployer le moniteur **MON** et gestionnaire **MGR** sur le premier noeud, ajout des deux autres comme **OSD**
|
||||
|
||||
Sur les trois noeuds :
|
||||
```
|
||||
sudo dnf install -y centos-release-ceph-squid
|
||||
sudo dnf install -y cephadm
|
||||
|
||||
# Pour les dépendances liées au déploiement de configurations
|
||||
sudo dnf install -y python3-yaml python3-jinja2
|
||||
```
|
||||
|
||||
Sur les deux noeuds OSD :
|
||||
```
|
||||
sudo cephadm add-repo --release squid
|
||||
sudo cephadm install ceph-common
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/04/04bfeb6849b12b28965abf54e6cc91ddf9125915416f9c25" data-crypto-key="cryptpad:Wjy8vSEIcoiBF0pMfanPIn3XDIHjeMCzKg3xo5akk10="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/66/66c00f924c77439a0dd943f61fad5eda03026d620212dd01" data-crypto-key="cryptpad:z+le7TirXV8Bw8ErK4rzqX2c2RzlRRR6mm3IXRCm+es="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/ae/aed1ef80f77a90b5755d1afac29278c7437b40fcdfeb538c" data-crypto-key="cryptpad:7KlTiZrmMyCgXEXivmt1csEL347pQvnwVkav3OpxVkQ="></media-tag>
|
||||
|
||||
Bootstrap du cluster sur le noeud principal :
|
||||
```
|
||||
sudo cephadm bootstrap \
|
||||
--mon-ip 10.0.10.11 \
|
||||
--allow-fqdn-hostname \
|
||||
--initial-dashboard-user admin \
|
||||
--initial-dashboard-password 'Dashboard123!'
|
||||
|
||||
# Copie de la clef publique du MON/MGR sur les OSD
|
||||
ssh-copy-id -f -i /etc/ceph/ceph.pub root@10.0.10.12
|
||||
ssh-copy-id -f -i /etc/ceph/ceph.pub root@10.0.10.13
|
||||
|
||||
# Vérification
|
||||
sudo ceph orch host ls
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/37/3753d7159bcb3e4a806ed81440e9b68a5153ed77c1dd3178" data-crypto-key="cryptpad:cwb1S464Sg2YC5IlOx1GLuWSyhEjFAKYLwDn02LeiJM="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/05/051b3bf8bc97c29ced6e2cc28505a196a4596b12ce6b2a9c" data-crypto-key="cryptpad:xsWlXVU0+hRImJI3iOr+BzMGnMQFZvq5FzTaj4Zy/eE="></media-tag>
|
||||
|
||||
Copie de la configuration du MON/MGR sur les OSD :
|
||||
```
|
||||
scp /etc/ceph/ceph.conf root@10.0.10.12:/etc/ceph/
|
||||
scp /etc/ceph/ceph.conf root@10.0.10.13:/etc/ceph/
|
||||
scp /etc/ceph/ceph.client.admin.keyring root@10.0.10.12:/etc/ceph/
|
||||
scp /etc/ceph/ceph.client.admin.keyring root@10.0.10.13:/etc/ceph/
|
||||
ssh root@10.0.10.12 "chmod 600 /etc/ceph/*.keyring && chmod 644 /etc/ceph/ceph.conf"
|
||||
ssh root@10.0.10.13 "chmod 600 /etc/ceph/*.keyring && chmod 644 /etc/ceph/ceph.conf"
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/b6/b69984ee1490f1eb4385c1ea4f069680665ae6224ae54d8f" data-crypto-key="cryptpad:420QFw4Et9opABYI8n+pWGVTdcF7OwbvW4ckzJ3i0Jk="></media-tag>
|
||||
|
||||
Ajout des hôtes dans le cluster **Ceph** :
|
||||
```
|
||||
sudo ceph orch host add osd1 10.0.10.12
|
||||
sudo ceph orch host add osd2 10.0.10.13
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/2a/2a21e37f16b7c508b955b0023363e9a113206221b717ac84" data-crypto-key="cryptpad:Xe+iyeh5eB3HySd2PUUjIEWK5TDbX8mf9wls3igXNxI="></media-tag>
|
||||
|
||||
[Ajout des **OSD** dans le cluster :](https://docs.ceph.com/en/squid/cephadm/services/osd/)
|
||||
```
|
||||
sudo ceph orch device ls
|
||||
|
||||
# Si on veut tout asservir sans distinction
|
||||
sudo ceph orch apply osd --all-available-devices
|
||||
|
||||
# Si on veut asservir un panel précis de volumes
|
||||
sudo ceph orch daemon add osd monmgr:/dev/sdb
|
||||
sudo ceph orch daemon add osd osd1:/dev/sdb
|
||||
sudo ceph orch daemon add osd osd2:/dev/sdb
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/43/438c9972b4f3cfbcf1e1ea817e3349feb26db85a85316599" data-crypto-key="cryptpad:BqGJbSrjy4PjKLFx4VoNswvY3yDo0Ed6KSAzkFD0vHU="></media-tag>
|
||||
|
||||
#### C. Déployer le service RGW
|
||||
|
||||
https://docs.ceph.com/en/squid/radosgw/
|
||||
https://docs.ceph.com/en/squid/radosgw/s3/
|
||||
|
||||
- Créer un *daemon* RGW avec `ceph orch apply rgw`
|
||||
- Configurer le domaine S3, clefs d'accès et politiques des seaux
|
||||
|
||||
[Déploiement du service RGW :](https://docs.ceph.com/en/latest/cephadm/services/rgw/)
|
||||
```
|
||||
sudo ceph orch apply rgw rgw-mcs \
|
||||
--realm=realm-mcs \
|
||||
--zone=zone-mcs \
|
||||
--placement="2 osd1 osd2"
|
||||
|
||||
# Ou en version "triviale"
|
||||
sudo ceph orch apply rgw rgw-mcs
|
||||
```
|
||||
|
||||
Vérifier l'intégrité du cluster RGW :
|
||||
```
|
||||
sudo ceph orch ps --daemon_type rgw
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/9d/9d1aadd4922a53bb5121747b354cb4c8d305e1ce91813289" data-crypto-key="cryptpad:kp2Y514w4Q5euJSkYzERMRkhHRlF24G08IudZA597w0="></media-tag>
|
||||
|
||||
[Créer un admin S3 :](https://docs.ceph.com/en/squid/man/8/radosgw-admin/)
|
||||
```
|
||||
sudo dnf install -y epel-release
|
||||
sudo dnf install -y ceph-radosgw
|
||||
|
||||
sudo radosgw-admin user create --uid=egf2025 --display-name="EstGauFlo 2025"
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/d7/d71d32e03c04b6092da7a8a1f282f6f3a5344478806ff089" data-crypto-key="cryptpad:PuJEHV5LYY0an9GXKK2OOi5zF2Kd4IswUW1QXoSg7PQ="></media-tag>
|
||||
|
||||
Modifier le ceph.conf :
|
||||
```
|
||||
sudo nano /etc/ceph/ceph.conf
|
||||
[client.radosgw.gateway]
|
||||
host = [monmgr, osd1, osd2]
|
||||
keyring = /etc/ceph/ceph.client.radosgw.gateway.keyring
|
||||
rgw_frontends = "beast port=7480"
|
||||
|
||||
sudo systemctl start ceph-radosgw@rgw.gateway
|
||||
|
||||
sudo nano /etc/ceph/ceph.client.radosgw.keyring
|
||||
[client.admin]
|
||||
key = *******
|
||||
caps mds = "allow *"
|
||||
caps mgr = "allow *"
|
||||
caps mon = "allow *"
|
||||
caps osd = "allow *"
|
||||
```
|
||||
|
||||
Vérifier la santé du cluster Ceph :
|
||||
```
|
||||
sudo ceph -s
|
||||
sudo ceph health detail
|
||||
```
|
||||
<media-tag src="https://files.cryptpad.fr/blob/00/008175712685740833165d4189973388037dece6e97ca258" data-crypto-key="cryptpad:ETLbKix9PaqPO1JmCAV61rgOmEoKNVpp1ZsH9KZSFoo="></media-tag>
|
||||
|
||||
Configurer l'accès S3 :
|
||||
```
|
||||
sudo dnf install -y awscli
|
||||
|
||||
aws configure set aws_access_key_id XXOKHTFX8OUAW4YEFBVT
|
||||
aws configure set aws_secret_access_key b3Cn2vYARkbnGWlPVdCg16ZYUZ3IczXC4SvtBBMy
|
||||
aws s3 ls --endpoint-url http://10.0.10.11:7480
|
||||
```
|
||||
|
||||
##### Notes sur le précédent bloc
|
||||
Ca ne sert à rien de copier le couple ID-Clef, ce sont des utilisateurs locaux, mais ce sont bien des vraies. On sait ce qu'on fait présentement, mais il est évident qu'on ne fait jamais ça en production.
|
||||
|
||||
La solution de niveau 1 c'est d'utiliser une variable d'environnement temporaire (`AWS_ID="XXOKHTFX8OUAW4YEFBVT"` et ensuite appeler avec un `$AWS_ID` dans le shell pour une expiration à déconnexion), et la solution de niveau 2 serait de déployer un serveur Consul/Vault sur le réseau pour gérer des secrets.
|
||||
|
||||
Vérifications :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/f5/f57c10f5f901f528d6161d4d4068212ad93682ca281af5c7" data-crypto-key="cryptpad:YBGemuMRbe+2XHP9QCHhpOQkhVytwDubUkZI3SR2E5o="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/a4/a4fc092b1f622e66df15a15038578d0baa96519918acd3f0" data-crypto-key="cryptpad:vUWHK4CoxoVNirRj6IrZwIuuegv0UlciycL+B8Y8Qk0="></media-tag>
|
||||
|
||||
Et ensuite faire un test de téléversement dans un seau S3 avec la [documentation officielle](https://docs.aws.amazon.com/cli/latest/reference/s3/)
|
||||
|
||||
```
|
||||
aws s3 cp ./fichier s3://bucket/ --endpoint-url http://10.0.10.11:7480
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/aa/aa5dbaeb6794883b7e00b8d66d35f76512f605cc5deb26b2" data-crypto-key="cryptpad:1kSGzofa2tLeZC8F7U/f+6eXyN7U9ypJmZ7Ves5rleU="></media-tag>
|
||||
|
||||
#### D. (Bonus) Vérifier sur le Dashboard
|
||||
|
||||
Nous avons rajouté dans le réseau NAT (mais pas le Ceph) une machine tierce avec interface graphique, Rocky Linux ou Debian pour se connecter sur le dashboard :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/15/15ff2edb30fde6ac61678c0a12459ce0a1e73ec6c03b2df9" data-crypto-key="cryptpad:TfjK9Mvvdxl2s0EnNbmA4o5i+HWP5qRipw2qv/MeJIk="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/73/7349a2e0f870321fc439f01406a04fec1e2153761419e757" data-crypto-key="cryptpad:Lz8yvNg+wuSZHY2+z2ffd0aw3R9equWXoLai67IChnA="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/18/18483faba0aa6472152e2e25004209389f95fb03aa6b79e3" data-crypto-key="cryptpad:wQhByOE8wrLo9VaRw8zGBQF9QKCi6gud35MpIlqmaTs="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/46/46360ecf4ee7840bf56ba19b7c07fdd1c8320d7e8887df93" data-crypto-key="cryptpad:FSxbRr2sEJt5GqipjMVW99t/9BwsrU65HkTOYpiZoEk="></media-tag>
|
||||
|
||||
### 4. Cisco Packet Tracer
|
||||
|
||||
#### A. Créer la topologie en GUI
|
||||
|
||||
- VLAN unique pour les 3
|
||||
- Switchs Layer 2 (un ou plusieurs)
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/f4/f48ef893820e0e9f0e2e0d6d2cd73d82308f65e4eb7b9598" data-crypto-key="cryptpad:a/qRxMjOGyuDXlxG2mmFWi3dkbXG6JrT3KSQ3RqquTI="></media-tag>
|
||||
|
||||
#### B. Créer la topologie en CLI
|
||||
|
||||
Création des LAGs :
|
||||
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range fa0/[1-7]-[3-9]
|
||||
channel-group [1,2,3] mode active
|
||||
no shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/6a/6a2509b4f6e2a366356a13e288b33f91adec0b78a8ceb857" data-crypto-key="cryptpad:WKXQB4Poov7EL8/82WjJLs235J/qzfAWJIaoXAGi2/I="></media-tag>
|
||||
|
||||
Créer les VLAN :
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
vlan 10
|
||||
name CephCluster
|
||||
exit
|
||||
interface fa0/24
|
||||
switchport mode access
|
||||
switchport access vlan 10
|
||||
no shutdown
|
||||
exit
|
||||
interface port-channel [1,2,3]
|
||||
switchport mode trunk
|
||||
switchport trunk native vlan 1
|
||||
switchport trunk allowed vlan 1,10
|
||||
no shutdown
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/4e/4ebbd4130db94e2c9051ce3f63dedbe02c0d0c96f3874b60" data-crypto-key="cryptpad:ZMyW0x6++/MqFWxH57+l+YJi3L8ORaHU3rhZdzRUGIM="></media-tag>
|
||||
|
||||
[Créer la passerelle HSRP sur les routeurs :](https://routeur.clemanet.com/hsrp-cisco.php)
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
ip routing
|
||||
interface Gig0/0/1.10
|
||||
encapsulation dot1q 10
|
||||
ip address 10.0.10.[2,3] 255.255.255.0
|
||||
standby 1 ip 10.0.10.1
|
||||
standby 1 priority [100, 150]
|
||||
standby 1 preempt
|
||||
no shutdown
|
||||
end
|
||||
show standby
|
||||
write memory
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/c1/c1b0fc95b8db907a0d8b16cf9baab1a88a85807eb1e82f21" data-crypto-key="cryptpad:GW5Jz8ObOkwJRZFeJeQyawDCZzdw2ROwaVZM6SXB77U="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/68/68898c849a7ced544cd2a612db570ab61ef0b8b6da7a0185" data-crypto-key="cryptpad:gNGAPg+atpRGsPz7O2vsAaOHrhAnVIRaRXMcM1P1jzE="></media-tag>
|
||||
|
||||
Et on vérifie par un PING d'un OSD à un autre :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/2c/2cc0b941a4e1e3fdce2c9475ff3c7e02eb1e172656fec99c" data-crypto-key="cryptpad:vjbMi/mYJ9kYxJb7+1M5g79yTdepCQkA0/sPd8iXaVk="></media-tag>
|
||||
|
||||
Et on teste avec un routeur éteint :
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/7a/7ada1d6e9098e316cf4406bf3a7bc5fe44b91457c7de19f8" data-crypto-key="cryptpad:Rzu93JyAnvomJsPvRxnCX7ixzTlWYl9k/P+6+xuReps="></media-tag>
|
||||
|
||||
#### C. Sécurisation
|
||||
|
||||
https://www.cisco.com/c/deleteme/sec/b_1710_sec_9300_cg/port_security.html
|
||||
|
||||
- Limiter le *MAC-address learning*
|
||||
- Activer *port-security* en mettant 1 dresse MAC maximum
|
||||
- Configurer les ports d'administration (console/VTY) avec authentification locale
|
||||
- Activer le SSH sur les switchs avec restriction aux adresses du VLAN
|
||||
- Autoriser le trafic Ceph, IMCP et SNMP uniquement depuis les adresses de gestion
|
||||
|
||||
Sécurité des ports :
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
interface range fa0/#-# // ports non utilisés
|
||||
shutdown
|
||||
exit
|
||||
interface range fa0/#-# // ports en usage
|
||||
switchport port-security
|
||||
switchport port-security maximum 1
|
||||
switchport port-security violation restrict
|
||||
switchport port-security mac-address sticky
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/19/19fd8194668ad082d5178f227c62b35b07bebbdd8dfa63d3" data-crypto-key="cryptpad:A6jmhR4OuaxQHMm+KbU31knsTnGw2MRaj755o8T51zw="></media-tag>
|
||||
|
||||
Activer le SSH :
|
||||
```
|
||||
ip domain-name mcs2025.local
|
||||
username admin secret mcs2025
|
||||
crypto key generate rsa general-keys modulus 2048
|
||||
ip ssh version 2
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/18/1881a74fa8065efcf42ced3373d7b136cc098dfab1d7db2a" data-crypto-key="cryptpad:3enRu+/ilQvxeyLU+yFdIGZ2b9TyHqycSwKOJE3qHO0="></media-tag>
|
||||
|
||||
Protection par mot de passe :
|
||||
```
|
||||
enable
|
||||
conf t
|
||||
enable password encryption
|
||||
line console 0
|
||||
password CisCanne
|
||||
login local
|
||||
line vty 0 4
|
||||
login local
|
||||
transport input ssh
|
||||
enable secret Conf-Iture
|
||||
end
|
||||
write memory
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/c7/c7489db8ed0d3e567414d3fee430ac312b66ccc0c5a48dd1" data-crypto-key="cryptpad:ozAr3/lNIaY4eBJ3JXGM5jpt92XkuZbk1NcXjrqniTA="></media-tag>
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/50/50e9db450cf23ccaac173476143752a85743a76917af5373" data-crypto-key="cryptpad:tlpugQJH1eSRGkBL1FihnusGElULFGzFj0ggsgTIZqQ="></media-tag>
|
||||
|
||||
ACL pour le trafic Ceph :
|
||||
```
|
||||
ip access-list extended CEPH-ALLOW
|
||||
permit tcp any any eq 80
|
||||
permit tcp any any eq 443
|
||||
permit tcp any any eq 6789
|
||||
permit tcp any any eq 7480
|
||||
permit tcp any any eq 8443
|
||||
permit tcp any any range 3300 3303
|
||||
permit tcp any any range 6800 7300
|
||||
permit udp any any range 6800 7300
|
||||
permit icmp any any
|
||||
permit udp any any eq 161
|
||||
deny ip any any
|
||||
```
|
||||
|
||||
<media-tag src="https://files.cryptpad.fr/blob/35/35b58a27fc74a43af2a5ffd1e81ce446a53b1d632d013459" data-crypto-key="cryptpad:Lu/trK9ciZxIK+6hk476MVpMttad4JY2BndgxC3ouMY="></media-tag>
|
||||
|
||||
# Liens utiles
|
||||
|
||||
## Bibliographie
|
||||
### Ceph
|
||||
[Tutoriel Scaleway d'un cluster Ceph](https://www.scaleway.com/en/docs/tutorials/ceph-cluster/)
|
||||
|
||||
[Tutoriel d'installer Ceph sur Rocky Linux](https://www.linkedin.com/pulse/step-by-step-instructions-install-ceph-rocky-linux-saman-salamat/)
|
||||
|
||||
[Configuration RGW sur RedHat](https://docs.redhat.com/de/documentation/red_hat_ceph_storage/3/html/object_gateway_guide_for_red_hat_enterprise_linux/rgw-configuration-reference-rgw)
|
||||
|
||||
[Cephadm pour RGW](https://docs.ceph.com/en/reef/cephadm/services/rgw/)
|
||||
|
||||
[Déployer Ceph sur Rocky Linux 9](https://random-it-blog.de/ceph/ceph-storage-cluster-deployment-on-rocky-linux-9-centos-9/)
|
||||
|
||||
### Pare-feu Rocky
|
||||
[Mettre en place FirewallD](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-rocky-linux-8)
|
||||
|
||||
[Ports pour cluster Ceph](https://docs.redhat.com/en/documentation/red_hat_ceph_storage/5/html/configuration_guide/ceph-firewall-ports_conf)
|
||||
|
||||
[FirewallD par Stéphane Robert](https://blog.stephane-robert.info/docs/securiser/reseaux/firewalld/)
|
||||
|
||||
### Détails sur la configuration
|
||||
["Beast" pour RadosGW](https://documentation.suse.com/fr-fr/ses/7.1/single-html/ses-admin/book-storage-admin.html#config-ogw)
|
||||
|
||||
## Ressources
|
||||
[Rocky Linux](https://rockylinux.org/fr-FR/download)
|
||||
Reference in New Issue
Block a user