Difference between revisions of "SatNOGS Client Ansible"
(Tag: Visual edit) |
(Tag: Visual edit) |
||
Line 13: | Line 13: | ||
==Prerequisites== | ==Prerequisites== | ||
− | *Download and install Debian 9 from here; ''https://www.debian.org/releases/stretch/debian-installer/'' | + | *Download and install Debian 9 from here; <br />''https://www.debian.org/releases/stretch/debian-installer/'' <br />Chose the net installer if you want to run a headless server. Only download AMD64 version. gr-satnogs does not support i386. <br />Install on your target machine and install the ssh server. |
*Add your user to the sudo group; Become root. <code>su</code> <code>usermod -aG sudo yourUserName</code> | *Add your user to the sudo group; Become root. <code>su</code> <code>usermod -aG sudo yourUserName</code> | ||
− | *A host system with Git and latest version of Ansible installed Edit the file to install the latest Ansible. <code>nano /etc/apt/sources.list</code> | + | *A host system with Git and latest version of Ansible installed <br />Edit the file to install the latest Ansible. <code>nano /etc/apt/sources.list</code> <br />Add the following to the bottom of the file; <br />deb <nowiki>http://ftp.debian.org/debian</nowiki> stretch-backportsmain <br />deb-src <nowiki>http://ftp.debian.org/debian</nowiki> stretch-backports main |
*Add your user to the sudo group; <code>usermod -aG sudo yourUserName</code> | *Add your user to the sudo group; <code>usermod -aG sudo yourUserName</code> | ||
*On the host system run the following commands. | *On the host system run the following commands. | ||
Line 119: | Line 119: | ||
<nowiki> | <nowiki> | ||
− | + | $ sudo apt-get update | |
− | + | $ sudo apt-get -y upgrade | |
− | + | $ sudo reboot</nowiki> | |
To update SatNOGS software, including the configuration tool itself: | To update SatNOGS software, including the configuration tool itself: |
Revision as of 03:33, 7 August 2019
Contents
Intro
SatNOGS Client Ansible is the suggested method to install SatNOGS Client (and friends) to a system. It currently supports Raspbian and Debian Stretch.
Raspbian
For Raspberry Pi 3, which is the reference platform for SatNOGS, a Raspbian image with SatNOGS Client Ansible pre-installed is available.
Debian
These sections contain generic instructions for installing SatNOGS Client on a Debian Stretch system.
Prerequisites
- Download and install Debian 9 from here;
https://www.debian.org/releases/stretch/debian-installer/
Chose the net installer if you want to run a headless server. Only download AMD64 version. gr-satnogs does not support i386.
Install on your target machine and install the ssh server. - Add your user to the sudo group; Become root.
su
usermod -aG sudo yourUserName
- A host system with Git and latest version of Ansible installed
Edit the file to install the latest Ansible.nano /etc/apt/sources.list
Add the following to the bottom of the file;
deb http://ftp.debian.org/debian stretch-backportsmain
deb-src http://ftp.debian.org/debian stretch-backports main - Add your user to the sudo group;
usermod -aG sudo yourUserName
- On the host system run the following commands.
apt-get update
apt-get install -t stretch-backports ansible
apt-get install sudo
apt-get install git
apt-get install sshpass
SatNOGs Install Instructions
On the host system run the following commands:
$ git clone https://gitlab.com/librespacefoundation/satnogs/satnogs-client-ansible.git # Clone SatNOGS Client Ansible repository $ cd satnogs-client-ansible # Change to cloned repository directory $ cp -r production.dist production # Copy dist configuration $ vi production/inventory/hosts # Update file with your own target host e.g.127.0.0.1, user and SSH password $ ssh youruser@yourtargetsystem true # Test SSH connection to target system $ ansible-playbook -i production/inventory -K site.yml # Run Ansible playbook $ ssh -t youruser@yourtargetsystem sudo satnogs-setup # Setup SatNOGS client (see below)
SatNOGS Client Setup
satnogs-setup
is a script for configuring a system installed with SatNOGS Client Ansible.
Initial Setup
Right after the first boot of the system, packages and the configuration tool itself must be updated. Follow the Updating instruction found below.
To configure a SatNOGS Client Ansible system:
- SSH into the system and run
sudo satnogs-setup
; this will bring up the configuration menu - Set Basic Configuration (see below)
- Select
Apply
and the Raspberry Pi will configure itself; this may take some time - Select
Back
to exit
Basic Configuration
Setting | Description |
---|---|
SATNOGS_API_TOKEN
|
The API token assigned to your ground station on the SatNOGS Network website, please don’t share your api key as this can give access to anyone to upload and change things in network related to your station and its observations. |
SATNOGS_RX_DEVICE
|
If you are using an RTL-SDR, this is rtlsdr . Other devices supported by gr-satnogs include usrpb200 , usrp2 , airspy or hackrf ; a complete list can be found here.
|
SATNOGS_STATION_ELEV
|
The height of your ground station above sea level in metres. |
SATNOGS_STATION_ID
|
The numeric ID assigned to your station in the SatNOGS Network site when the groundstation was created. |
SATNOGS_STATION_LAT
|
The latitude of your station. North is positive, south is negative. |
SATNOGS_STATION_LON
|
The longitude of your station. East is positive, west is negative. |
HAMLIB_UTILS_ROT_ENABLED
|
Whether or not to enable the Hamlibs rotator daemon. Rotctld is a software daemon that provides a network server to control a rotator on a serial port. If you don't have a rotator (like the No rotator setup), enter NO .
|
HAMLIB_UTILS_ROT_OPTS
|
Options for rotcld:
For a yaesu rotator, use For a SatNOGS rotator |
Advanced Setup
A more detailed description on setting up a development environment using the SatNOGS reference setup is given in SatNOGS_Client_Development.
Setting | Description |
---|---|
SATNOGS_CLIENT_URL
|
If you to try a development version of satnogs-client, you can change the URL here. The URL needs to be in PIP format. Here are some examples:
|
SATNOGS_RADIO_GR_SATNOGS_PACKAGE
|
This options allows you to change the installed package of gr-satnogs. For example, to install nightly development builds use:
|
RF_GAIN
|
RF Gain value for your SDR hardware. Defaults can be found here.
|
Updating SatNOGS Client software
To update all Debian packages to the latest you can use the normal APT updating methods. SSH into the system and run the following commands:
$ sudo apt-get update $ sudo apt-get -y upgrade $ sudo reboot
To update SatNOGS software, including the configuration tool itself:
- SSH into the system and (re-)run
sudo satnogs-setup
; this will bring up the configuration menu - Select
Update
to update the configuration tool - Select
Apply
and the Raspberry Pi will update itself; this may take some time - Before exit, check at the top that you have the latest satnogs-client and gr-satnogs versions
- Select
Back
to exit
WARNING: An update can potentially interrupt a running observation!
Verification of correct installation
To see if satnogs-client has started successfully, check the logs with journalctl:
journalctl -u satnogs-client.service
You should see entries running approximately once per minute that look like this:
Oct 01 23:02:13 raspberrypi satnogs-client[6695]: * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) Oct 01 23:02:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:02:14,466 - satnogsclient - INFO - [LD] Downlink thread waiting for first downlink packet Oct 01 23:03:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:14,450 - apscheduler.executors.default - INFO - Running job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:03:14 UTC)" (scheduled at 2017-10-01 23:03:14.423393+00:00) Oct 01 23:03:47 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:47,324 - satnogsclient - DEBUG - Opening TCP socket: 127.0.0.1:5011 Oct 01 23:03:47 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:47,325 - satnogsclient - DEBUG - Sending message: [] Oct 01 23:03:47 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:47,327 - apscheduler.executors.default - INFO - Job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:04:14 UTC)" executed successfully Oct 01 23:04:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:14,453 - apscheduler.executors.default - INFO - Running job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:04:14 UTC)" (scheduled at 2017-10-01 23:04:14.423393+00:00) Oct 01 23:04:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:14,484 - apscheduler.executors.default - INFO - Running job "post_data (trigger: interval[0:02:00], next run at: 2017-10-01 23:04:14 UTC)" (scheduled at 2017-10-01 23:04:14.436367+00:00) Oct 01 23:04:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:14,489 - apscheduler.executors.default - INFO - Job "post_data (trigger: interval[0:02:00], next run at: 2017-10-01 23:04:14 UTC)" executed successfully Oct 01 23:04:15 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:15,627 - satnogsclient - DEBUG - Opening TCP socket: 127.0.0.1:5011 Oct 01 23:04:15 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:15,628 - satnogsclient - DEBUG - Sending message: [] Oct 01 23:04:15 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:15,629 - apscheduler.executors.default - INFO - Job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:05:14 UTC)" executed successfully
If you see that, great -- you're ready to schedule your first observation! If not, check out the Troubleshooting page.