Updated the docker and ansible files for setting up and building / running rasberry pi with the frank service
Still need to manually copy the new id_rsa created on the pi to knox.
This commit is contained in:
4
docker/files/config
Normal file
4
docker/files/config
Normal file
@ -0,0 +1,4 @@
|
||||
Host do knox knox.tanshu.com
|
||||
HostName knox.tanshu.com
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
User tanshu
|
||||
@ -1 +1 @@
|
||||
docker run --detach --name frank --hostname=moh1 --env-file=/home/pi/frank.env --network=host --restart=no --device /dev/usb/lp0:/printer frank:latest
|
||||
docker run --detach --name frank --env-file=/home/pi/frank.env --network=host --restart=no --device /dev/usb/lp0:/printer frank:latest
|
||||
|
||||
16
docker/files/gotthard.service
Normal file
16
docker/files/gotthard.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Reverse SSH connection
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=pi
|
||||
|
||||
ExecStart=/usr/bin/ssh -NTg -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_rsa -R {{ ssh_port }}:localhost:22 tanshu@knox.tanshu.com
|
||||
|
||||
# Restart every >2 seconds to avoid StartLimitInterval failure
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
15
docker/files/knox-redis-tunnel.service
Normal file
15
docker/files/knox-redis-tunnel.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Keep ssh tunnel to specified remote host open
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=pi
|
||||
|
||||
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_rsa -L 6379:localhost:6379 tanshu@knox.tanshu.com
|
||||
|
||||
# Restart every >2 seconds to avoid StartLimitInterval failure
|
||||
RestartSec=5
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user