Skip to content

Latest commit

 

History

History
100 lines (54 loc) · 2.88 KB

README.md

File metadata and controls

100 lines (54 loc) · 2.88 KB

Welcome to IoT-Framework

IoT-Framework is a computation engine for sensor stream data.

Note: This repository contains only the website for the IoT-Framework. In order to use it, you need to download and start the API hosted at https://github.com/projectcs13/sensor-cloud

Requirements

Installation

  1. You need to set an option for your shell in order for all of the software to work. Run

     make help
    

and read the 'Important' section and follow the instructions.

  1. Download and compile the dependencies, and compile the project sources

     make install
    
  2. Run the application

     make run
    

Usage

In development mode

  1. Install the gems needed:

     bundle install --without production
    
  2. Migrate the database:

     bundle exec rake db:migrate
    
  3. Download and start the IoT-Framework API hosted here: https://github.com/projectcs13/sensor-cloud

  4. Modify the API_URL variable declared in the config/config.yml file to reflect the hostname/port of the API (by default the API uses port 8000):

     API_URL: "<Put your base URL here>:<put your port here>" 
    
  5. Start the Rails server:

     rails s
    

In production mode

  1. Install the gems needed:

     bundle install
    
  2. Migrate the database:

     RAILS_ENV=production bundle exec rake db:migrate
    
  3. Precompile Rails assets:

     RAILS_ENV=production bundle exec rake assets:precompile
    
  4. Modify the config/config.yml file according to your needs.

  5. Open the script called sensor_cloud located in the sensor-cloud-website root folder, and modify the USER and RAILS_ROOT variables in accordance to your system settings.

  6. Run:

     sudo cp sensor_cloud /etc/init.d/
     sudo chmod +x /etc/init.d/sensor_cloud
     sudo update-rc.d sensor_cloud defaults
    

Next time you reboot your computer, the Rails server should be running and the website accessible at http://localhost:3000 (it may take a couple of seconds for the server to start after rebooting).

Running tests

  1. Run the tests

     make test
    

More information

You can take a look at the wiki [here] (https://github.com/projectcs13/sensor-cloud-website/wiki).

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Code Status

Build Status

Licence

IoT-Framework is released under the [Apache License] (http://opensource.org/licenses/Apache-2.0).