Skip to content

Commit

Permalink
improving deploy automation
Browse files Browse the repository at this point in the history
  • Loading branch information
akrv committed Dec 19, 2019
1 parent e534a2c commit 8fd3298
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions floor_flasher/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json

from fabric.api import *

from time import sleep


RPi_IPs = [
Expand Down Expand Up @@ -45,13 +45,13 @@

@parallel
def r():
run('mkdir -p /home/pi/sensorfloor/flash')
run('sudo apt-get -y install dtach')


@parallel
def imuread():
with cd('~/sensorfloor/imu_reader'):
run('nohup python read_past_imu.py &')
run('dtach -n python /home/pi/sensorfloor/imu_reader/read_past_imu.py')

@parallel
def deploy():
Expand Down Expand Up @@ -97,22 +97,23 @@ def cssh():
# # install apache2 and mod-wsgi
# run('sudo apt-get update')
# run('sudo apt-get install -y apache2 libapache2-mod-wsgi git libcairo2-dev libjpeg-dev libgif-dev')
#
# # disable default conf
# run('sudo a2dissite 000-default.conf')
#
# with cd('~/'):
# run('sudo rm -rf sensorfloor')
# # git clone
# run('git clone --recurse-submodules http://github.com/akrv/sensorfloor')
# # copy conf and the rest of the folder
# run('sudo cp sensorfloor/sensorfloor.conf /etc/apache2/sites-available')
#
# # copy to www folder the source code
# run('sudo cp -rf sensorfloor /var/www/')
# with cd('~/sensorfloor'):
# run('pip install -r requirements.txt')
# run('mkdir -p /home/pi/sensorfloor/flash')
# with cd('~/sensorfloor/addr_finder'):
# run('python main.py')
# # copy to www folder the source code
# with cd('~/'):
# run('sudo cp -rf sensorfloor /var/www/')
#
# # disable default conf
# run('sudo a2dissite 000-default.conf')
# # enable site
# run('sudo a2ensite sensorfloor.conf')
# run('sudo systemctl reload apache2')

0 comments on commit 8fd3298

Please sign in to comment.