In the previous recipe, we compiled and installed the part that actually tracks the satellite. Now, we need to add the piece of the system that allows us to manage the potential flood of data, share it with others, and have them share their data back with us.
Note that this has been tested successfully on Debian Wheezy (3.8) and Debian Jessie (13.4).
The materials needed are as follows:
Here are the steps you need to perform:
pip
is installed and the package management system used to install and manage packages is written in Python through the following command:$ pip list
As Python 2.7.9 and later versions (on the Python2 series) and Python 3.4 and later versions include pip
by default, you may have pip already. If not, you can install it this way:
get-pip.py
at https://bootstrap.pypa.io/get-pip.py.$ sudo python get-pip.py
$ sudo pip install virtualenvwrapper
virtualenv is a tool designated to address the problem of dealing with packages' dependencies while maintaining different versions for different projects. For example, if you work on two Python Django websites, one that uses Django 1.2 and another 0.96, there is no way to keep both versions if you install them into the standard /usr/lib/python2/site-packages
. virtualenv creates two isolated environments.
vitualenvwrapper
takes virtualenv a step further by providing commands that can be invoked from the terminal window.
virtualenvwrapper
, modify your bash profile with the following command:$ sudo nano ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh
$ sudo source ~/.bashrc
$ sudo apt-get install libxml2-dev libxslt1-dev python-dev $ sudo pip install django $ sudo pip install django-dotenv
$ git clone https://github.com/satnogs/satnogs-network.git
$ cd satnogs-network $ mkvirtualenv satnogs-network -a .
(Note the .
symbol at the end of the command, and don't use sudo
.)
(satnogs-network)debian@beaglebone:~/satnogs-network$ cp .env-dist .env
$ workon satnogs-network
$ pip install -r requirements/dev.txt
This step may take a while and consume most of your BBB's resources as it downloads, compiles, and installs the development platform to share your SatNog tracking data.
$ sudo ./manage.py migrate
$ ./manage.py createsuperuser
Follow the prompts to input a username, e-mail address, and password.
$ ./manage.py initialize
$ sudo ./manage.py runserver your_ip_address_here:8000
If you experience problems getting the browser to resolve an address, shut down the server (by pressing Ctrl + C), and rerun the command with the following network address:
$ sudo ./manage.py runserver 0.0.0.0:8000
The address, 0.0.0.0
, allows you to reach the server from any machine in your network.
You can sign up as a Ground Station operator by first confirming your user credentials. Look in the terminal window for the following output, which contains a verification link:
User <NAME> at example.com has given this as an email address. To confirm this is correct, go to http://your_ip_address_here:8000/accounts/confirm-email/generated_string_here/
Now, the next time you reboot or shut down the server and the virtualenv
environment and want to run SatNogs again, just jump right to the following three main steps, and you will be off to the races:
$ cd satnogs-network $ workon satnogs-network $ sudo ./manage.py runserver your_ip_address:8000
18.216.47.169