diff --git a/files/snster-kaz/kaz/group.yml b/files/snster-kaz/hoster-a/group.yml similarity index 82% rename from files/snster-kaz/kaz/group.yml rename to files/snster-kaz/hoster-a/group.yml index ba9c345..4944c31 100644 --- a/files/snster-kaz/kaz/group.yml +++ b/files/snster-kaz/hoster-a/group.yml @@ -1,8 +1,8 @@ version: 1 header: - name: Kaz AS - comment: AS of the Kaz CHATONS + name: Hoster-A AS + comment: AS of the first hoster of Kaz CHATONS hosts: router: @@ -14,10 +14,10 @@ hosts: ipv4: 100.64.0.10/24 ipv6: 2001:db8:b000::10/48 eth1: - bridge: kaz-lan1 + bridge: ha-lan1 ipv4: 100.80.0.1/24 eth2: - bridge: kaz-lan2 + bridge: ha-lan2 ipv4: 100.80.1.1/24 templates: - bgprouter: @@ -29,14 +29,14 @@ hosts: ns: 100.100.100.100 domain: kaz.sns - prod: + kaz1: network: interfaces: eth0: - bridge: kaz-lan1 + bridge: ha-lan1 ipv4: 100.80.0.2/24 eth1: - bridge: kaz-lan2 + bridge: ha-lan2 ipv4: 100.80.1.2/24 gatewayv4: 100.80.0.1 templates: diff --git a/files/snster-kaz/kaz/prod/80.100.in-addr.arpa.zone b/files/snster-kaz/hoster-a/kaz1/80.100.in-addr.arpa.zone similarity index 100% rename from files/snster-kaz/kaz/prod/80.100.in-addr.arpa.zone rename to files/snster-kaz/hoster-a/kaz1/80.100.in-addr.arpa.zone diff --git a/files/snster-kaz/kaz/prod/createUser.txt b/files/snster-kaz/hoster-a/kaz1/createUser.txt similarity index 94% rename from files/snster-kaz/kaz/prod/createUser.txt rename to files/snster-kaz/hoster-a/kaz1/createUser.txt index 0891255..671f41d 100644 --- a/files/snster-kaz/kaz/prod/createUser.txt +++ b/files/snster-kaz/hoster-a/kaz1/createUser.txt @@ -19,7 +19,7 @@ # -- # NOM ; PRENOM ; EMAIL_SOUHAITE ; EMAIL_SECOURS ; ORGA ; ADMIN_ORGA ; NC_ORGA ; GARRADIN_ORGA ; WP_ORGA ; AGORA_ORGA ; WIKI_ORGA ; NC_BASE ; GROUPE_NC_BASE ; EQUIPE_AGORA ; QUOTA -Hello1;Contact1;contact1@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;1;toto -Hello2;Contact2;contact2@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;1;toto -Hello3;Contact3;contact3@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;10;toto -Hello4;Contact4;contact4@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;10;toto +Hello1;Contact1;contact1@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;1;tototototo +Hello2;Contact2;contact2@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;1;tototototo +Hello3;Contact3;contact3@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;10;tototototo +Hello4;Contact4;contact4@kaz.sns;contact2@kaz.sns; ;N;N;N;N;N;N;N; ; ;10;tototototo diff --git a/files/snster-kaz/kaz/prod/kaz-config/container-mail.list b/files/snster-kaz/hoster-a/kaz1/kaz-config/container-mail.list similarity index 100% rename from files/snster-kaz/kaz/prod/kaz-config/container-mail.list rename to files/snster-kaz/hoster-a/kaz1/kaz-config/container-mail.list diff --git a/files/snster-kaz/kaz/prod/kaz-config/container-orga.list b/files/snster-kaz/hoster-a/kaz1/kaz-config/container-orga.list similarity index 100% rename from files/snster-kaz/kaz/prod/kaz-config/container-orga.list rename to files/snster-kaz/hoster-a/kaz1/kaz-config/container-orga.list diff --git a/files/snster-kaz/kaz/prod/kaz-config/container-proxy.list b/files/snster-kaz/hoster-a/kaz1/kaz-config/container-proxy.list similarity index 100% rename from files/snster-kaz/kaz/prod/kaz-config/container-proxy.list rename to files/snster-kaz/hoster-a/kaz1/kaz-config/container-proxy.list diff --git a/files/snster-kaz/kaz/prod/kaz-config/container-withMail.list b/files/snster-kaz/hoster-a/kaz1/kaz-config/container-withMail.list similarity index 100% rename from files/snster-kaz/kaz/prod/kaz-config/container-withMail.list rename to files/snster-kaz/hoster-a/kaz1/kaz-config/container-withMail.list diff --git a/files/snster-kaz/kaz/prod/kaz-config/container-withoutMail.list b/files/snster-kaz/hoster-a/kaz1/kaz-config/container-withoutMail.list similarity index 100% rename from files/snster-kaz/kaz/prod/kaz-config/container-withoutMail.list rename to files/snster-kaz/hoster-a/kaz1/kaz-config/container-withoutMail.list diff --git a/files/snster-kaz/kaz/prod/kaz-config/dockers.env b/files/snster-kaz/hoster-a/kaz1/kaz-config/dockers.env similarity index 100% rename from files/snster-kaz/kaz/prod/kaz-config/dockers.env rename to files/snster-kaz/hoster-a/kaz1/kaz-config/dockers.env diff --git a/files/snster-kaz/kaz/prod/kaz.sh b/files/snster-kaz/hoster-a/kaz1/kaz.sh similarity index 100% rename from files/snster-kaz/kaz/prod/kaz.sh rename to files/snster-kaz/hoster-a/kaz1/kaz.sh diff --git a/files/snster-kaz/kaz/prod/kaz.sns.zone b/files/snster-kaz/hoster-a/kaz1/kaz.sns.zone similarity index 52% rename from files/snster-kaz/kaz/prod/kaz.sns.zone rename to files/snster-kaz/hoster-a/kaz1/kaz.sns.zone index 13bf823..66e4bc2 100644 --- a/files/snster-kaz/kaz/prod/kaz.sns.zone +++ b/files/snster-kaz/hoster-a/kaz1/kaz.sns.zone @@ -11,26 +11,27 @@ $ORIGIN kaz.sns. IN MX 10 smtp.kaz.sns. IN A 100.80.0.2 ns IN A 100.80.0.2 -dmz IN A 100.80.0.2 -smtp IN CNAME dmz -imap IN CNAME dmz -www IN CNAME dmz -mail IN CNAME dmz -cloud IN CNAME dmz -tableur IN CNAME dmz -dashboard IN CNAME dmz -webmail IN CNAME dmz -garradin IN CNAME dmz -wiki IN CNAME dmz -git IN CNAME dmz -office IN CNAME dmz -depot IN CNAME dmz -ldap IN CNAME dmz -mobilizon IN CNAME dmz -mdp IN CNAME dmz -koffre IN CNAME dmz -pad IN CNAME dmz -agora IN CNAME dmz +kaz1 IN A 100.80.0.2 +kaz2 IN A 100.81.0.2 +smtp IN CNAME kaz1 +imap IN CNAME kaz1 +www IN CNAME kaz1 +mail IN CNAME kaz1 +cloud IN CNAME kaz1 +tableur IN CNAME kaz1 +dashboard IN CNAME kaz1 +webmail IN CNAME kaz1 +garradin IN CNAME kaz1 +wiki IN CNAME kaz1 +git IN CNAME kaz1 +office IN CNAME kaz1 +depot IN CNAME kaz1 +ldap IN CNAME kaz1 +mobilizon IN CNAME kaz1 +mdp IN CNAME kaz1 +koffre IN CNAME kaz1 +pad IN CNAME kaz1 +agora IN CNAME kaz1 listes IN MX 10 listes listes IN A 100.80.1.2 firewall IN A 100.80.0.1 diff --git a/files/snster-kaz/kaz/prod/provision.sh b/files/snster-kaz/hoster-a/kaz1/provision.sh similarity index 100% rename from files/snster-kaz/kaz/prod/provision.sh rename to files/snster-kaz/hoster-a/kaz1/provision.sh diff --git a/files/snster-kaz/kaz2/group.yml b/files/snster-kaz/hoster-b/group.yml similarity index 83% rename from files/snster-kaz/kaz2/group.yml rename to files/snster-kaz/hoster-b/group.yml index 88eb45a..bc20c11 100644 --- a/files/snster-kaz/kaz2/group.yml +++ b/files/snster-kaz/hoster-b/group.yml @@ -1,8 +1,8 @@ version: 1 header: - name: Kaz2 AS - comment: AS of the Kaz organization, 2ndary server + name: Hoster-B AS + comment: AS of the second hoster of Kaz CHATONS hosts: router: @@ -14,7 +14,7 @@ hosts: ipv4: 100.64.0.11/24 ipv6: 2001:db8:b000::11/48 eth1: - bridge: kaz2-lan1 + bridge: hb-lan1 ipv4: 100.81.0.1/24 templates: - bgprouter: @@ -26,11 +26,11 @@ hosts: ns: 100.100.100.100 domain: kaz.sns - prod2: + kaz2: network: interfaces: eth0: - bridge: kaz2-lan1 + bridge: hb-lan1 ipv4: 100.81.0.2/24 gatewayv4: 100.81.0.1 templates: diff --git a/files/snster-kaz/kaz2/prod2/kaz-config/container-mail.list b/files/snster-kaz/hoster-b/kaz2/kaz-config/container-mail.list similarity index 100% rename from files/snster-kaz/kaz2/prod2/kaz-config/container-mail.list rename to files/snster-kaz/hoster-b/kaz2/kaz-config/container-mail.list diff --git a/files/snster-kaz/kaz2/prod2/kaz-config/container-orga.list b/files/snster-kaz/hoster-b/kaz2/kaz-config/container-orga.list similarity index 100% rename from files/snster-kaz/kaz2/prod2/kaz-config/container-orga.list rename to files/snster-kaz/hoster-b/kaz2/kaz-config/container-orga.list diff --git a/files/snster-kaz/kaz2/prod2/kaz-config/container-proxy.list b/files/snster-kaz/hoster-b/kaz2/kaz-config/container-proxy.list similarity index 100% rename from files/snster-kaz/kaz2/prod2/kaz-config/container-proxy.list rename to files/snster-kaz/hoster-b/kaz2/kaz-config/container-proxy.list diff --git a/files/snster-kaz/kaz2/prod2/kaz-config/container-withMail.list b/files/snster-kaz/hoster-b/kaz2/kaz-config/container-withMail.list similarity index 100% rename from files/snster-kaz/kaz2/prod2/kaz-config/container-withMail.list rename to files/snster-kaz/hoster-b/kaz2/kaz-config/container-withMail.list diff --git a/files/snster-kaz/kaz2/prod2/kaz-config/container-withoutMail.list b/files/snster-kaz/hoster-b/kaz2/kaz-config/container-withoutMail.list similarity index 100% rename from files/snster-kaz/kaz2/prod2/kaz-config/container-withoutMail.list rename to files/snster-kaz/hoster-b/kaz2/kaz-config/container-withoutMail.list diff --git a/files/snster-kaz/kaz2/prod2/kaz-config/dockers.env b/files/snster-kaz/hoster-b/kaz2/kaz-config/dockers.env similarity index 100% rename from files/snster-kaz/kaz2/prod2/kaz-config/dockers.env rename to files/snster-kaz/hoster-b/kaz2/kaz-config/dockers.env diff --git a/files/snster-kaz/kaz2/prod2/kaz.sh b/files/snster-kaz/hoster-b/kaz2/kaz.sh similarity index 100% rename from files/snster-kaz/kaz2/prod2/kaz.sh rename to files/snster-kaz/hoster-b/kaz2/kaz.sh diff --git a/files/snster-kaz/kaz2/prod2/provision.sh b/files/snster-kaz/hoster-b/kaz2/provision.sh similarity index 100% rename from files/snster-kaz/kaz2/prod2/provision.sh rename to files/snster-kaz/hoster-b/kaz2/provision.sh diff --git a/files/snster-kaz/isp-a/home/provision.sh b/files/snster-kaz/isp-a/home/provision.sh index c2bc3e1..52b6a64 100644 --- a/files/snster-kaz/isp-a/home/provision.sh +++ b/files/snster-kaz/isp-a/home/provision.sh @@ -15,10 +15,10 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y claws-mail # On configure les comptes mail if [ -f /clawsmail/addclawsuser.sh ]; then - su debian /clawsmail/addclawsuser.sh contact1 kaz.sns contact1@kaz.sns toto 1 - su debian /clawsmail/addclawsuser.sh contact2 kaz.sns contact2@kaz.sns toto 2 - su debian /clawsmail/addclawsuser.sh contact3 kaz.sns contact3@kaz.sns toto 3 - su debian /clawsmail/addclawsuser.sh contact4 kaz.sns contact4@kaz.sns toto 4 + su debian /clawsmail/addclawsuser.sh contact1 kaz.sns contact1@kaz.sns tototototo 1 + su debian /clawsmail/addclawsuser.sh contact2 kaz.sns contact2@kaz.sns tototototo 2 + su debian /clawsmail/addclawsuser.sh contact3 kaz.sns contact3@kaz.sns tototototo 3 + su debian /clawsmail/addclawsuser.sh contact4 kaz.sns contact4@kaz.sns tototototo 4 su debian /clawsmail/addclawsuser.sh email isp-a.sns email email 5 fi diff --git a/files/vm-provision.sh b/files/vm-provision.sh index 30dfbe8..565057c 100755 --- a/files/vm-provision.sh +++ b/files/vm-provision.sh @@ -219,12 +219,13 @@ auth: cp -ar ${VAGRANT_SRC_DIR}/snster-kaz /root # crypto keys - cp -ar /etc/letsencrypt /root/snster-kaz/kaz/prod/ + cp -ar /etc/letsencrypt /root/snster-kaz/hoster-a/kaz1/ cp -ar /etc/letsencrypt /root/snster-kaz/isp-a/home/ - cp -ar /etc/letsencrypt /root/snster-kaz/kaz2/prod2/ + cp -ar /etc/letsencrypt /root/snster-kaz/hoster-b/kaz2/ # On lie le filesystem de kaz-prod dans le /kaz de la VM pour le dév - ln -s /var/lib/lxc/kaz-kaz-prod/rootfs/ /kaz-prod + ln -s /var/lib/lxc/kaz-hoster-a-kaz1/rootfs/ /kaz1-prod + ln -s /var/lib/lxc/kaz-hoster-b-kaz2/rootfs/ /kaz2-prod ln -s /kaz-prod/kaz /kaz # On met le KAZGUARD pour la mise au point diff --git a/files/vm-upgrade.sh b/files/vm-upgrade.sh index c60a288..ed3e9f6 100755 --- a/files/vm-upgrade.sh +++ b/files/vm-upgrade.sh @@ -22,7 +22,8 @@ cd /tmp/kaz-vagrant # On écrase les anciens fichiers cp -ar /tmp/kaz-vagrant/files/snster-kaz /root/ # crypto keys -cp -ar /etc/letsencrypt /root/snster-kaz/kaz/prod/ +cp -ar /etc/letsencrypt /root/snster-kaz/hoster-a/kaz1/ +cp -ar /etc/letsencrypt /root/snster-kaz/hoster-b/kaz2/ cp -ar /etc/letsencrypt /root/snster-kaz/isp-a/home/ # On détruit et reconstruit tout sauf kaz-prod @@ -30,7 +31,8 @@ SNSTER="snster -c /root/snster-kaz" $SNSTER destroy isp-a-home $SNSTER destroy isp-a-infra $SNSTER destroy isp-a-router -$SNSTER destroy kaz-router +$SNSTER destroy hoster-a-router +$SNSTER destroy hoster-b-router $SNSTER destroy mica-router $SNSTER destroy mica-infra $SNSTER destroy opendns-router