Coder Social home page Coder Social logo

csn_web's Introduction

Cambridge Sensor Network Portal

This project provides a multi-user portal for the management of sensors on the Cambridge Sensor Network.

The portal is designed to accomodate self-provisioning of sensors that will be registered on the CSN Lorawan (Low-power, Long-Range) network of radio gateways in the Cambridge UK region.

The portal has three main areas of function:

  • User management - these are the people able to register devices and manage the receipt of the data.
  • Device management - this is where devices are registered and the server designated to receive their data.
  • Server management - this is where user servers are defined that can then be used to receive data from the sensors.

User Management

Device Management

Server Management

Installation

python3 -m venv csn_web_venv
mkdir csn_web
cd csn_web
source ~/csn_web_venv/bin/activate
python3 -m pip install django
python3 -m pip install --upgrade pip
django-admin.py startproject csn_web
git init

cp ../tfc_web/.gitignore .
git add --all .
git commit -m "Initial csn_web project start"
python3 -m pip install gunicorn
cd csn_web
gunicorn --bind localhost:8099 csn_web.wsgi
python3 -m pip install whitenoise

# install postgresql
sudo apt update
sudo apt upgrade
sudo apt install postgresql postgresql-contrib libpq-dev python-dev

sudo -u postgres psql

sudo -u postgres createdb csn_prod
sudo -u postgres createuser csn_prod --interactive
sudo adduser csn_prod
sudo -u csn_prod psql

# setup nginx for https://<host>/csn

sudo cp csn_web/config/nginx/includes/csn_web_port_443.conf /etc/nginx/includes/
sudo service nginx restart

python3 -m pip install psycopg2

ssh csn_prod@localhost
ssh-keygen -t rsa -C "csn_prod@tfc-app2"
sudo cp ~/.ssh/authorized_keys /home/csn_prod/.ssh
sudo chown csn_prod:csn_prod /home/csn_prod/.ssh/authorized_keys

csn_web's People

Contributors

ijl20 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.