Compare commits
No commits in common. "2968582a74984f00c3b27806f151930159ebe7df" and "500556c31dacb32c459109796d9ac9d1abaa62fa" have entirely different histories.
2968582a74
...
500556c31d
11
README.md
11
README.md
@ -44,14 +44,19 @@ Cette étape peut-être (très) longue. Notamment, la construction de kaz-prod s
|
||||
|
||||
## Mise au point
|
||||
|
||||
Il est possible d'interrompre la création à la coquille vide (juste la VM sans les services KAZ) pour des question de mise au point avec la commande :
|
||||
(Non implémenté) Il est possible d'interrompre la création à la coquille vide (juste la VM sans les services KAZ) pour des question de mise au point avec la commande :
|
||||
```bash
|
||||
NOKAZ="true" vagrant up
|
||||
```
|
||||
|
||||
Dans ce cas, il faudra ensuite lancer dans la VM :
|
||||
(Non implémenté) Dans ce cas, il faudra ensuite lancer dans la VM :
|
||||
```bash
|
||||
KAZGUARD="true" /root/vm-install-kaz.sh
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x /mnt/snster/root/snster-kaz/kaz/prod/kaz.sh
|
||||
SETUP_MAIL="docker exec mailServ setup"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact1@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact2@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact3@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact4@kaz.sns toto"
|
||||
```
|
||||
|
||||
Pour détruire la VM et recommencer :
|
||||
|
@ -88,7 +88,7 @@ Vagrant.configure("2") do |config|
|
||||
config.vm.synced_folder "/tmp/", "/tmp_host"
|
||||
|
||||
config.vm.provision "shell" do |s|
|
||||
s.inline = "/vagrant/files/vm-provision.sh"
|
||||
s.inline = "/vagrant/files/provision.sh"
|
||||
s.env = {"KAZGUARD" => "true", "HOSTLANG" => ENV['LANG'], "NOKAZ" => ENV['NOKAZ'], "KAZBRANCH" => ENV['KAZBRANCH']}
|
||||
end
|
||||
end
|
||||
|
@ -192,16 +192,20 @@ EOF
|
||||
|
||||
# Build SNSTER KAZ !
|
||||
snster -c /root/snster-kaz -t /root/templates create
|
||||
cp "${VAGRANT_SRC_DIR}/vm-install-kaz.sh" /root/
|
||||
chmod +x /root/vm-install-kaz.sh
|
||||
if [ "${NOKAZ}" == "true" ]; then
|
||||
echo "on ne fait pas l'install de kaz sur kaz-prod"
|
||||
else
|
||||
echo "on installe kaz sur kaz-prod"
|
||||
bash "/root/vm-install-kaz.sh"
|
||||
fi
|
||||
snster -c /root/snster-kaz -t /root/templates start
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x /mnt/snster/root/snster-kaz/kaz/prod/kaz.sh
|
||||
|
||||
# On monte le filesystem de kaz-prod dans le /kaz de la VM pour le dév (en nofail)
|
||||
# On crée quelques mails
|
||||
SETUP_MAIL="docker exec mailServ setup"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact1@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact2@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact3@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact4@kaz.sns toto"
|
||||
|
||||
echo -e '#!/bin/sh\nsnster -c /root/snster-kaz start' >> /etc/rc.local
|
||||
chmod +x /etc/rc.local
|
||||
|
||||
# On monte le filesystem de kaz-prod dans le /kaz de la VM pour le dév
|
||||
mkdir /kaz-prod /kaz
|
||||
echo "overlay /kaz-prod overlay lowerdir=/var/lib/lxc/sr-masters-bullseye/rootfs,upperdir=/var/lib/lxc/kaz-kaz-prod/overlay/delta,workdir=/var/lib/lxc/kaz-kaz-prod/overlay/work,nofail 0 0" >> /etc/fstab
|
||||
echo "/kaz-prod/kaz /kaz none bind,nofail 0 0" >> /etc/fstab
|
@ -61,7 +61,13 @@ export DebugLog="${OUTPUT_DIR}/log/log-kaz-$(date +%y-%m-%d-%T)-"
|
||||
echo -e "\n #### secretGen\n"
|
||||
/kaz/bin/secretGen.sh
|
||||
|
||||
#possibilité de lancer vagrant up NOKAZ="true" quand on construit la machine
|
||||
if [ "${NOKAZ}" == "true" ]; then
|
||||
echo "on ne lance pas install.sh"
|
||||
else
|
||||
echo "on lance install.sh"
|
||||
/kaz/bin/install.sh
|
||||
fi
|
||||
|
||||
# clear apt cache
|
||||
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Installation de Kaz
|
||||
|
||||
if [ -z "${KAZGUARD}" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
snster -c /root/snster-kaz -t /root/templates start
|
||||
sleep 10
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x /mnt/snster/root/snster-kaz/kaz/prod/kaz.sh
|
||||
|
||||
# On crée quelques mails
|
||||
SETUP_MAIL="docker exec mailServ setup"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact1@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact2@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact3@kaz.sns toto"
|
||||
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact4@kaz.sns toto"
|
||||
|
||||
echo -e '#!/bin/sh\nsnster -c /root/snster-kaz start' >> /etc/rc.local
|
||||
chmod +x /etc/rc.local
|
Loading…
Reference in New Issue
Block a user