Skip to content

Installing Openchirp

Khushboo Bhatia edited this page May 7, 2018 · 11 revisions

Install Databases

  1. Mongo DB - https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
  2. InfluxDB - https://docs.influxdata.com/influxdb/v1.5/introduction/installation/
  3. Redis - sudo apt-get -y install redis-server

Install and setup mosquitto(for MQTT)

  1. https://mosquitto.org/download/
  2. Mosquito Auth Plugin https://github.com/jpmens/mosquitto-auth-plug 2.1 Download and Install Mongo C Driver 2.2 Download Mosquitto Source code 2.3 Update config.mk ( Set yes for files and mongo backend and update SSL and mosquitto source code path) 2.4 Compile plugin 2.5 Update mosquitto configuration as follows:

#Path to auth plugin compiled above

auth_plugin /etc/mosquitto/auth-plug.so auth_opt_backends files,mongo auth_opt_mongo_uri mongodb://localhost:27017 #Hostname and port of mongodb auth_opt_mongo_database openchirp #Database should be set to "openchirp" as it is shared by rest server and mosquitto auth_opt_mongo_user_coll thingcredentials #Table name should be set to "thingcredentials" as it is shared by rest server and mosquitto auth_opt_password_file /etc/mosquitto/passwords auth_opt_acl_file /etc/mosquitto/acls

Clone Openchirp repos

  1. Website : https://github.com/OpenChirp/website
  2. REST : https://github.com/OpenChirp/openchirp_rest
  3. Storage Service: https://github.com/OpenChirp/mqtt_influx_storage_service
  4. Mapper Service : https://github.com/OpenChirp/gpsmapper-service
  5. Grafana Dashboard : https://github.com/OpenChirp/grafana_dashboards

Config and Startup

REST

$ npm install // This will download all the javascript dependencies in package.json

$ npm start // Starts node.js with default settings in config/development.json and default port is 10010

Website

MQTT Influx Storage Service

Grafana

Configuring Google Oauth

  1. Create a google oauth client ID for your website here. Click on the Configure Project button. This will generate an oauth client id.
  2. Update REST config and website config with the generated oauth client ID.
  3. https://console.developers.google.com
Clone this wiki locally