Comments (6)
Or would a post-update or post-receive hook allow auto updates when pushed, e.g.
- run
git push
- hook ssh's to each doorbot in turn and runs
git pull
- success/failure info appears in the terminal during the push
Or would a separate script be better, e.g.
- make commit and push to settings repo
- run script to ssh to each doorbot and
git pull
from doorbot-setup.
without having updated the reload-local-config.sh
or reload-all-config.sh
I have run ssh-copy-id
for doorbot 1&2, so the process to pull and reload stands at:
ssh doorbot1
cd logcards/doorbot-config/
git pull
cd ../..
./reload-local-config.sh
sudo screen -x
(to check the config is fine)./reload-all-config.sh
exit
from doorbot-setup.
I've made an rfid-keyboard to allow easier collection of the RFID UIDs: https://git.defproc.co.uk/DefProc/rfid-keyboard
So now, with the device plugged in as a USB keyboard, the process to add/search though a local clone of doorbot-setup can be done without ssh'ing to a doorbot for an ID number.
from doorbot-setup.
Ideally, the pull should happen from the user's local repo in a script. e.g:
- git pull the
doorbots-config
- make local changes to
config.yaml
- test the yaml is valid ( #13 )
- commit and push the config
- (optionally) run a script locally to ssh across to each doorbot and have it pull the config and reload
- (alternatively) leave the doorbots to auto-pull the most recent config ( #14 )
from doorbot-setup.
As a way of taking steps to improve the current process, I've written a pair of scripts that automate the git pull
, checking if the yaml is valid and then either copying out to the other doorbots or restoring the previous known good configuration. These are derived from, and can be used in place of the older reload-local-config
and reload-all-config
scripts.
In the doorbots-config repo, there is now:
config.yaml
has been moved to_config.yaml
so the original is used as the current config on the actual doorbotupdate-rfids.sh
will (when run on the doorbot):- pull the remote repo
- copy the new config into position
- run
screen
for you to view the loading message from the new config - ask you if the loading message looked correct
- either restore the original config
- or copy the config to the other two doorbots
ssh-update-rfids.sh
will (when run locally from inside DoES's network) ssh over to doorbot1 and runupdate-rfids.sh
remotely
from doorbot-setup.
Have changed the title on this to reflect what the issue is now about.
from doorbot-setup.
Related Issues (20)
- Other doorbot hostnames and ssh credentials should be installed
- remote-setup.rb shouldn't hide errors
- config.yaml should be checked before pushing
- doorbots should regularly check for up-to-date config
- RFID keyboard inserts unnecessary 0s into output HOT 2
- Add a power switch to the custom PCB HOT 2
- Add space for an I2S DAC for audio on the PCB HOT 1
- Rework remote-setup.rb to use ansible HOT 2
- Holes for the Molex connector are a bit small
- PCB fouls the USB/Ethernet jacks on the Pi
- High power traces on the PCB aren't thick enough
- Stop using custom SSH ports
- Make sure Ansible sets up the `open-door.sh` utility script HOT 3
- kdeweb install hangs requiring input
- Better mounting for Doorbot2 (kitchen/workshop) HOT 2
- No documentation for hardware configuration HOT 6
- Init script documentation/repo/deployed don't match HOT 2
- No bitbucket credentials on the wiki HOT 6
- initial-local-setup.sh should unmount the SD card before running dd HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doorbot-setup.