Compare commits
8 Commits
v0.0.2b-jl
...
v0.0.2h-ml
Author | SHA1 | Date | |
---|---|---|---|
5fffbc77e2 | |||
b1e87cdd1e | |||
7f7207cf46 | |||
1187a5e28d | |||
8cef3cbf6b | |||
49ca8325e8 | |||
08973e83b3 | |||
79c7bd34e6 |
@ -1,11 +1,25 @@
|
|||||||
---
|
- name: install haproxy
|
||||||
- name: Installation d'HAproxy
|
apt:
|
||||||
apt: pkg=haproxy state=present update_cache=yes
|
name: haproxy
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Fichier de configuration
|
- name: parametre backend et fontend
|
||||||
copy: src=haproxy.cfg dest=/etc/haproxy/haproxy.cfg
|
blockinfile:
|
||||||
notify:
|
path: /etc/haproxy/haproxy.cfg
|
||||||
- restart haproxy
|
block: |
|
||||||
|
frontend proxypublic
|
||||||
|
bind 192.168.56.2:80
|
||||||
|
default_backend fermeweb
|
||||||
|
|
||||||
|
backend fermeweb
|
||||||
|
balance roundrobin
|
||||||
|
option httpclose
|
||||||
|
#option httpchk HEAD / HTTP/1.0
|
||||||
|
server web1.test 192.168.56.3:80 check
|
||||||
|
#server web2.test 192.168.56.4:80 check
|
||||||
|
|
||||||
- name: Copie de goss
|
- name: redemarre haproxy
|
||||||
copy: src=goss.yaml dest=/root
|
service:
|
||||||
|
name: haproxy
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
@ -2,34 +2,36 @@
|
|||||||
|
|
||||||
Nextcloud et Traefik fonctionnent grâce à docker. Pour pouvoir faire fonctionner ce playbook, docker doit être installé.
|
Nextcloud et Traefik fonctionnent grâce à docker. Pour pouvoir faire fonctionner ce playbook, docker doit être installé.
|
||||||
|
|
||||||
## Premièrement
|
## 1.
|
||||||
|
|
||||||
Le playbook va créer le dossier nxc à la racine de root. Deux fichier docker-compose "nextcloud.yml" et "traefik.yml" y seront copiés depuis le répertoire "files" du playbook.
|
Le playbook crée le dossier **nxc** à la racine de root.
|
||||||
Enfin, dans le répertoire nxc, seront créé les dossier certs et config.
|
|
||||||
|
|
||||||
### Deuxièmement
|
Les fichiers "nextcloud.yml" et "traefik.yml" y seront copiés depuis le répertoire "files" du playbook.
|
||||||
|
|
||||||
Le playbook va copier les fichiers placés dans "files" et les placer dans les bons répertoires.
|
Enfin, dans le répertoire nxc, sont créés les répertoires **certs** et **config**.
|
||||||
|
|
||||||
#### Troisièmement
|
## 2. Copie des fichiers
|
||||||
|
|
||||||
Le playbook va créer un certificat x509 grâce à mkcert, il s'agit d'une solution permettant de créer
|
Le playbook copie les fichiers placés dans "files" et les placer dans les bons répertoires.
|
||||||
des certificats auto-signés. Pour cela il télécharge mkcert sur s-adm (utiliser le getall).
|
|
||||||
|
|
||||||
mkcert sera placé dans : /usr/local/bin/
|
## 3. Génération du certificat
|
||||||
|
|
||||||
Pour créer le certificat le playbook va executer des lignes de commandes (lancé depuis nxc/) :
|
Le playbook crée un certificat **x509** grâce à **mkcert**, il s'agit d'une solution permettant de créer des certificats auto-signés. Pour cela, il télécharge **mkcert** sur **s-adm** (utiliser le script **getall**).
|
||||||
|
|
||||||
|
**mkcert** est placé dans : /usr/local/bin/
|
||||||
|
|
||||||
|
Pour créer le certificat, le playbook exécute les commandes (lancé depuis nxc/) :
|
||||||
```
|
```
|
||||||
/usr/local/bin/mkcert -install # Installe mkcert
|
/usr/local/bin/mkcert -install # Installe mkcert
|
||||||
/usr/local/bin/mkcert -key-file key.pem -cert-file cert.pem "hôte.domaine.local" "*.domaine.local" #Crée le certificat le DNS spécifié
|
/usr/local/bin/mkcert -key-file key.pem -cert-file cert.pem "hôte.domaine.local" "*.domaine.local" #Crée le certificat le DNS spécifié
|
||||||
```
|
```
|
||||||
##### Quatrièmement
|
## 4. Lancement
|
||||||
|
|
||||||
Le playbook va lancer les fichier "docker-compose" à savoir : nextcloud.yml et traefik.yml.
|
Le playbook lance les fichiers "docker-compose" à savoir : nextcloud.yml et traefik.yml qui démarrent les deux piles **docker**.
|
||||||
Cela va installer les solutions automatiquement. Nextcloud est alors fonctionnel avec
|
|
||||||
un proxy inverse qui va rediriger en HTTPS.
|
Nextcloud est alors fonctionnel avec le proxy inverse **traefik** assurant la redirection vers HTTPS.
|
||||||
|
|
||||||
|
|
||||||
ATTENTION : Après avoir relancé la VM, executez le script "nxc-start.sh" afin d'installer les piles applicatives.
|
ATTENTION : Après avoir relancé la VM, executez le script "nxc-start.sh" afin d'installer les piles applicatives.
|
||||||
Une fois le script fini, accedez au site :
|
|
||||||
https://s-nxc.gsb.lan
|
Une fois le script terminé, le site est disponible ici : https://s-nxc.gsb.lan
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ping interface paserelle r-vp2
|
||||||
ping -c3 172.16.128.254
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
|
echo ping r-vp1 interface n-linkv
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
|
echo ping r-ext interface n-linkv
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-ext interface n-link
|
||||||
ping -c3 192.168.200.253
|
ping -c3 192.168.200.253
|
||||||
|
|
||||||
|
echo ping r-int interface n-link
|
||||||
ping -c3 192.168.200.254
|
ping -c3 192.168.200.254
|
||||||
|
|
||||||
|
echo ping r-int interface s-infra
|
||||||
ping -c3 172.16.0.254
|
ping -c3 172.16.0.254
|
||||||
|
|
||||||
|
echo ping s-infra
|
||||||
ping -c3 172.16.0.1
|
ping -c3 172.16.0.1
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ping s-infra
|
||||||
ping -c3 172.16.0.1
|
ping -c3 172.16.0.1
|
||||||
|
|
||||||
|
echo ping r-int interface n-infra
|
||||||
ping -c3 172.16.0.254
|
ping -c3 172.16.0.254
|
||||||
|
|
||||||
|
echo ping r-int interface n-link
|
||||||
ping -c3 192.168.200.254
|
ping -c3 192.168.200.254
|
||||||
|
|
||||||
|
echo ping r-ext interface n-linkv
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-vp1 interface n-linkv
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
|
echo ping r-vp2 interface n-ag
|
||||||
ping -c3 172.16.128.254
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
|
echo ping s-agence
|
||||||
ping -c3 172.16.128.10
|
ping -c3 172.16.128.10
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ping s-infra
|
||||||
ping -c3 172.16.0.1
|
ping -c3 172.16.0.1
|
||||||
|
|
||||||
|
echo ping r-ext interface n-link
|
||||||
ping -c3 192.168.200.253
|
ping -c3 192.168.200.253
|
||||||
|
|
||||||
|
echo ping r-ext interface n-linkv
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-vp1 interface n-link
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
|
echo ping r-vp2 interface n-ag
|
||||||
ping -c3 172.16.128.254
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
|
echo ping s-agence
|
||||||
ping -c3 172.16.128.10
|
ping -c3 172.16.128.10
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
echo ping vers r-int
|
||||||
ping -c3 172.16.0.254
|
ping -c3 172.16.0.254
|
||||||
|
|
||||||
|
echo ping r-int interface externe
|
||||||
ping -c3 192.168.200.254
|
ping -c3 192.168.200.254
|
||||||
|
|
||||||
|
echo ping r-ext interface interne
|
||||||
ping -c3 192.168.200.253
|
ping -c3 192.168.200.253
|
||||||
|
|
||||||
|
echo ping r-ext interface liaison
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-vp1 interface liaison n-linkv
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
ping -c3 172.16.125.254
|
echo ping r-vp2 interface interface interne
|
||||||
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
ping -c3 172.16.128.10
|
echo ping s-agence
|
||||||
|
ping -c3 172.16.128.11
|
||||||
|
Reference in New Issue
Block a user