#24 Procédure installation RPi

Aberto
aberto por maxime-alves 4 anos atrás · 3 comentários

Création d’une VM

Création d'une VM
maxime-alves comentou 4 anos atrás
Colaborador
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
``` 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 ```
maxime-alves comentou 4 anos atrás
Colaborador

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
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 ```
maxime-alves mudou título de Procédure installation para Procédure installation RPi 4 anos atrás
nas comentou 4 anos atrás
Proprietário

Les commit suivant décrivent le staging dev : sa doc, son installation, et le script de lancement de la VM :

Les commit suivant décrivent le staging dev : sa doc, son installation, et le script de lancement de la VM : - ada78c1a9e - 0b465b7de7 - 47d911b828 - 885a52fffc79b57b3df4ef0bc7e0d617501b7b56
Acesse para participar desta conversação.
Sem marco
Sem responsável
2 participante(s)
Data limite

Data limite não informada.

Dependências

Esta issue atualmente não tem dependências.

Carregando…
Cancelar
Salvar
Ainda não há conteúdo.