We install the scheduler on Linux using apt .

Advanced Package Tool, or APT, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian, Ubuntu, and related Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.

1. Connect to the Raspberry PI Device

Using SSH, your root username and password, logon to the raspberry PI using a terminal client like Windows Terminal.

2. Adding the Nathean repository to the software sources on the target machine

You can check the existing sources using this command


cat /etc/apt/sources.list

But we need to first to edit the /etc/apt/sources.list file and so add entry to the HTTP location of the apt packages:
To edit the sources list use either of the following command can be used to append the new source to the end of the file


sudo nano /etc/apt/sources.list 

or


echo "deb [trusted=yes] http://natheandemos.azurewebsites.net/demos/apt/natheanlinuxscheduler ./" | tee -a /etc/apt/sources.list > /dev/null

3. Synchronize repositories

The following command downloads the files available in the listed sources.


sudo apt-get update

Note that you should see references to the Nathean URL

4. Install the package

To install our package, we can now use the apt-get tool:


sudo apt-get install natheanscheduleservice

5. Test Service


cd /usr/bin
python3 NatheanSchedulerDaemon.py start
python3 NatheanSchedulerDaemon.py stop

6. Turn on Auto Updates


sudo apt-get install unattended-upgrades

Use this to check the status of unattended upgrades


systemctl status unattended-upgrades

Make sure that the service is active as below

Edit the file which contains the list of source which can be upgrade unattended.


sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Add the following line to the Unattended-Upgrade::Origins-Pattern section


"site=natheandemos.azurewebsites.net";

You can trigger a upgrade manually using the following command


sudo unattended-upgrade -d

7. Force configuration or upgrade of config

The system requires to be locally configured. When deployed for the first time it will set up the config file “NatheanScheduler.ini”, set up the local SQLlite database etc

bc.
sudo python3 NatheanSchedulerDeployment.py

By executing this call, it will also force an upgrade of the config. It is also run on start-up of the scheduler.

8 – Install required Python packages


sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev
sudo apt-get install python3-pandas
Last modified: Sep 21, 2020

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment