-
Notifications
You must be signed in to change notification settings - Fork 4
SwarmSense Development Setup
Gopal Kildoliya edited this page May 15, 2018
·
1 revision
- Python3.4
- pip3
- PostgreSQL
- InfluxDB
- RabbitMQ
We are using PostgreSQL for database. To install and setup use following instructions https://www.postgresql.org/download/linux/ubuntu/
For Ubuntu 16.04
Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository::
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
Import the repository signing key, and update the package lists::
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo apt-get update
Now install::
$ sudo apt-get install postgresql-9.4
We are using InfluxDB to store time-series data. Follow the instructions here to setup database: https://docs.influxdata.com/influxdb/v1.2/introduction/installation/
RabbitMQ is being used as MQTT broker and Celery backend.
$ export RABBITMQ_VERSION=3.6.12
$ export RABBITMQ_GITHUB_TAG=rabbitmq_v3_6_12
$ export RABBITMQ_DEBIAN_VERSION=3.6.12-1
$ sudo apt-get install -y erlang-asn1 erlang-crypto erlang-eldap erlang-inets erlang-mnesia erlang-nox erlang-os-mon erlang-public-key erlang-ssl erlang-xmerl socat
$ sudo wget -O rabbitmq-server.deb.asc "https://github.com/rabbitmq/rabbitmq-server/releases/download/$RABBITMQ_GITHUB_TAG/rabbitmq-server_${RABBITMQ_DEBIAN_VERSION}_all.deb.asc"
$ sudo wget -O rabbitmq-server.deb "https://github.com/rabbitmq/rabbitmq-server/releases/download/$RABBITMQ_GITHUB_TAG/rabbitmq-server_${RABBITMQ_DEBIAN_VERSION}_all.deb"
$ sudo dpkg -i rabbitmq-server.deb
$ sudo rm -f rabbitmq-server.deb*
For python application development we recommend to use of virtual environment.
Install python requirements::
$ pip3 install -r requirements.txt
$ pip3 install -r requirements_dev.txt