Updating the Software ===================== Whenever the upstream repository is updated and you would like to update to the latest, you must do the following steps: 1. Update the software on the processing computer. 2. Rebuild the compiled components on the processing computer. 3. Restart all the server processes on the processing computer. 4. Update the software on the Microzed. 5. Rebuild the compiled components on the Microzed. 6. Restart all the server processes on the Microzed Updating the Processing Computer -------------------------------- To actually do these steps, you can run the following commands. First, on the processing computer in a terminal, ``cd`` into the software directory (e.g. ``/home/username/repo_name/sw``) and run the following commands .. code-block:: bash git tag known-working-$(date +%Y-%m-%d) #optionally, make a tag of the current revision git reset --hard # This overwrites all your local changes! git pull origin master make # this rebuilds all compiled components. Updating the Microzed --------------------- .. Important:: The way the system is normally operated, the Microzed cannot access the internet without cooperation from the processing computer. There is a script located at ``/path/to/repository/sw/scripts/start-iptables`` that allows the Microzed to access the internet via the processing computer. That script must be run for the following steps to work. It takes two arguments: the external interface (the one connected to the internet) and the Microzed interface. It should be called like this: .. code-block:: bash /path/to/start-iptables enp3s0 enp4s0 Note that the above names ``enp3s0`` and ``enp4s0`` may not be the correct names for your setup; check the output of ``ifconfig`` to determine which interface is facing the internet and which one is facing the Microzed. By default, the interface connected to the Microzed has an IP address of 192.168.1.10. Updating the Microzed is a similar process to updating the processing computer. First, from a terminal on the processing computer, execute the following commands: .. code-block:: bash ssh microzed cd ~/wni/sw git tag known-working-$(date +%Y-%m-%d) #optionally, make a tag of the current revision git reset --hard # This overwrites all your local changes! git pull make # this rebuilds all compiled components Restarting Daemons ------------------ The system relies on several long-running processes. The above steps updated the source code, but the running processes are still using the old code and need to be restarted. The simplest way is to reboot the system.