Merge branch 'master' of gitlab.com:hugvey/hugvey
This commit is contained in:
commit
79b773559f
3 changed files with 33 additions and 2 deletions
22
README.md
22
README.md
|
@ -92,18 +92,27 @@ chown=pi:pi
|
||||||
|
|
||||||
## Deploy / usefull commands
|
## Deploy / usefull commands
|
||||||
|
|
||||||
|
rsync them all
|
||||||
```bash
|
```bash
|
||||||
for i in {1..26}; do echo $i; rsync -av ~/hugvey/ pi@hugvey$i.local:/home/pi/hugvey/ --exclude=www --exclude=venv --exclude=local --exclude=*.pyc --exclude=.git --exclude=recordings --exclude=/voice* --exclude=/pd; done
|
for i in {1..26}; do echo $i; rsync -av ~/hugvey/ pi@hugvey$i.local:/home/pi/hugvey/ --exclude=www --exclude=venv --exclude=local --exclude=*.pyc --exclude=.git --exclude=recordings --exclude=/voice* --exclude=/pd; done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
shut all of them down
|
||||||
```bash
|
```bash
|
||||||
for i in {1..6}; do ssh pi@hugvey$i.local "sudo shutdown -h now"; done
|
for i in {1..26}; do ssh pi@hugvey$i.local "sudo shutdown -h now"; done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
restart supervisor on all of them
|
||||||
```bash
|
```bash
|
||||||
for i in {1..6}; do ssh pi@hugvey$i.local "supervisorctl restart hugvey_client"; done
|
for i in {1..26}; do ssh pi@hugvey$i.local "supervisorctl restart hugvey_client"; done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
install bash on all of them
|
||||||
|
```bash
|
||||||
|
for i in {1..26}; do echo $i;ssh pi@hugvey$i.local "cd hugvey && sudo bash install_server.sh"; done
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Monitoring the server processes
|
### Monitoring the server processes
|
||||||
|
|
||||||
|
@ -205,3 +214,12 @@ times occured/only on n-th instance: determines the order of diversions of the s
|
||||||
|
|
||||||
Visit 192.168.5.1
|
Visit 192.168.5.1
|
||||||
The password is at the bottom of the device.
|
The password is at the bottom of the device.
|
||||||
|
|
||||||
|
|
||||||
|
# Restoring a hugvey
|
||||||
|
|
||||||
|
- Write image `/mnt/stash/hugvey.img` to the microSD card.
|
||||||
|
+ You can use `gnome-disks` 'restore image' for that
|
||||||
|
- Open partition called rootfs, and `sudo nano etc/hostname`
|
||||||
|
+ Change hugvey20 into hugveyX (the number you need)
|
||||||
|
- Start it, rsync, install_server.sh as mentioned above.
|
||||||
|
|
|
@ -11,6 +11,10 @@ service munin-node restart
|
||||||
# Disable internal sound
|
# Disable internal sound
|
||||||
echo "blacklist snd_bcm2835" > /etc/modprobe.d/internalsnd-blacklist.conf
|
echo "blacklist snd_bcm2835" > /etc/modprobe.d/internalsnd-blacklist.conf
|
||||||
|
|
||||||
|
#setup tmpfs
|
||||||
|
echo "d /var/log/supervisor 0777 root root" > /etc/tmpfiles.d/supervisor.conf
|
||||||
|
cp installation/fstab /etc/fstab
|
||||||
|
|
||||||
# Added chown=pi:pi
|
# Added chown=pi:pi
|
||||||
cp installation/supervisord.conf /etc/supervisor/supervisord.conf
|
cp installation/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
ln -s /home/pi/hugvey/supervisor.conf /etc/supervisor/conf.d/hugvey.conf
|
ln -s /home/pi/hugvey/supervisor.conf /etc/supervisor/conf.d/hugvey.conf
|
||||||
|
|
9
installation/fstab
Normal file
9
installation/fstab
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
proc /proc proc defaults 0 0
|
||||||
|
PARTUUID=61a67ebb-01 /boot vfat defaults 0 2
|
||||||
|
PARTUUID=61a67ebb-02 / ext4 defaults,noatime 0 1
|
||||||
|
# a swapfile is not a swap partition, no line here
|
||||||
|
# use dphys-swapfile swap[on|off] for that
|
||||||
|
#change /tmp and var log to tmpfs
|
||||||
|
tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
|
||||||
|
tmpfs /var/log tmpfs rw,nosuid,nodev 0 0
|
||||||
|
|
Loading…
Reference in a new issue