Création d’une VM
LVM: lvcreate -L 2G -n rpi_buster vg1 dd if=./2020-05-27-raspios-buster-lite-armhf.img of=/dev/vg1/rpi_buster bs=4M QEMU: dd if=./2020-05-27-raspios-buster-lite-armhf.img of=/dev/vg1/rpi_buster bs=4M qemu-img resize /tmp/rpi.img +1G utiliser raspi-config pour agrandir l'image à la taille du device setup la keymap, la langue, etc... activer le login ssh root et le service installer les paquets : apt install git sqlite3 python3-pip python3-click \ python3-requests python3-netifaces python3-serial mkdir /var/lib/pyheatpump echo 'pip3 install --upgrade git+https://git.yannweb.net/maxime-alves/pyHeatpump.git' > /var/lib/pyheatpump/pyheatpump_upgrade.sh chmod +x /var/lib/pyheatpump/pyheatpump_upgrade.sh /var/lib/pyheatpump/pyheatpump_upgrade.sh sqlite3 -init /var/lib/pyheatpump/pyheatpump.sql /var/lib/pyheatpump/pyheatpump.sqlite3 cat << EOF > /var/lib/pyheatpump/pyheatpump.ini [heatpump] database = /var/lib/pyheatpump/pyheatpump.sqlite3 [supervisor] scheme = https host = supervision.gteo.fr port = 8081 post_path = /Symfony/web/app_dev.php/boardws/insert get_path = /Symfony/web/app_dev.php/boardws/orders interval = 60 heatpump_id = 42 [api] host = 0.0.0.0 port = 80 EOF cd /etc/systemd/system ln -s /var/lib/pyheatpump/pyheatpump_api.service ln -s /var/lib/pyheatpump/pyheatpump_fetch.service ln -s /var/lib/pyheatpump/pyheatpump_fetch.timer systemctl daemon-reload systemctl enable pyheatpump_api.service pyheatpump_fetch.timer pyheatpump_supervise.timer
Script de lancement de VM
IMG=$1 echo "Mount $IMG" qemu-system-arm \ -kernel /mnt/glarg/rpi/rpi-20200922/kernel-qemu-5.4.51-buster \ -dtb /mnt/glarg/rpi/rpi-20200922/versatile-pb-buster-5.4.51.dtb \ -m 256 -M versatilepb -cpu arm1176 \ -serial stdio \ -append "rw console=ttyAMA0 root=/dev/vda2 panic=1 loglevel=8" \ -drive "file=$IMG,if=none,index=0,media=disk,format=raw,id=disk0" \ -device "virtio-blk-pci,drive=disk0,disable-modern=on,disable-legacy=off" \ -no-reboot
Les commit suivant décrivent le staging dev : sa doc, son installation, et le script de lancement de la VM :
No due date set.
This issue currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?
Création d’une VM
Script de lancement de VM
Les commit suivant décrivent le staging dev : sa doc, son installation, et le script de lancement de la VM :