Archived
Ajouter docs/installation.md
This commit is contained in:
1 parent
618a0f4f0a
commit
1dec2984b5
1 file changed
+100
@@ -0,0 +1,100 @@
|
||||
# Installation
|
||||
|
||||
## 1. Cloner le dépôt
|
||||
|
||||
### Sur la machine INFRA (Proxmox)
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://gitea.ephaitek.com/ephaitek/ephaitek-provisioning.git
|
||||
chmod +x ephaitek-provisioning/scripts/infra/deploy-vm.sh
|
||||
```
|
||||
|
||||
### Sur la machine ADMIN
|
||||
```bash
|
||||
cd /root/admin_tools
|
||||
git clone https://gitea.ephaitek.com/ephaitek/ephaitek-provisioning.git post-provision
|
||||
chmod +x post-provision/scripts/admin/run-all.sh
|
||||
chmod +x post-provision/scripts/admin/steps/*.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 2. Installer les dépendances (machine ADMIN)
|
||||
|
||||
```bash
|
||||
dnf install -y expect sshpass bind-utils nc
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Configurer le CA cert Vault
|
||||
|
||||
```bash
|
||||
mkdir -p /root/admin_tools/pki
|
||||
|
||||
# Récupérer le certificat root CA depuis Vault
|
||||
ssh root@10.100.0.42 -p 2242 \
|
||||
"vault read -field=certificate pki/cert/ca" \
|
||||
> /root/admin_tools/pki/root.crt
|
||||
|
||||
chmod 644 /root/admin_tools/pki/root.crt
|
||||
|
||||
# Vérifier
|
||||
openssl x509 -in /root/admin_tools/pki/root.crt -noout -subject -dates
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Vérifier les accès SSH
|
||||
|
||||
```bash
|
||||
# NS1
|
||||
ssh -p 2260 root@ns1.adm "echo OK"
|
||||
|
||||
# pfSense
|
||||
ssh -p 2266 admin@10.11.0.1 "echo OK"
|
||||
```
|
||||
|
||||
Si pfSense refuse la connexion par clé, ajouter la clé publique dans l'UI :
|
||||
**System → User Manager → admin → Authorized SSH Keys**
|
||||
```bash
|
||||
cat ~/.ssh/id_ed25519.pub
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Vérifier les scripts admin_tools
|
||||
|
||||
```bash
|
||||
for script in \
|
||||
/root/admin_tools/majdns/dns1maj.sh \
|
||||
/root/admin_tools/fwdeploy/provision_pfsense_vlan_interactivev2.sh \
|
||||
/root/admin_tools/deploy_splitdns_adminkey/deploy-dns-keyv3.sh; do
|
||||
[[ -x "$script" ]] && echo "✔ $script" || echo "✖ MANQUANT: $script"
|
||||
done
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. Test en dry-run
|
||||
|
||||
```bash
|
||||
cd /root/admin_tools/post-provision/scripts/admin
|
||||
|
||||
# Simulation sans aucune modification
|
||||
./run-all.sh --vmid 9999 --name test --vlan 99 --dry-run
|
||||
```
|
||||
|
||||
Résultat attendu : toutes les étapes affichées avec `[DRY-RUN]`, aucune erreur.
|
||||
|
||||
---
|
||||
|
||||
## 7. Mettre à jour
|
||||
|
||||
```bash
|
||||
# INFRA
|
||||
cd ~/ephaitek-provisioning && git pull
|
||||
|
||||
# ADMIN
|
||||
cd /root/admin_tools/post-provision && git pull
|
||||
```
|
||||
Reference in new issue
Block a user