Code Monkey home page Code Monkey logo

iot_controller's Introduction

README

Semaphore Status Ruby Critic SimpleCov

IOT-Controller

IOT-Controller is the platform in charge of manage Deliveries and Dispersions.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • Ruby 2.5.1
  • Using Docker for Development
  • Docker version 17.03.0-ce or higher
  • Docker Compose version 1.21.2 or higher
  • Neo4J 3.5.3

Installing

A step by step series of examples that tell you how to get a development env running

  1. Set the environment variables with Figaro gem. Complete the variables preloaded in config/application.yml
  2. Run sudo docker-compose run web rake neo4j:migrate to add migrations to the database.
  3. Run sudo docker-compose run web rails db:seed to initialize the database.
  4. Run sudo docker-compose run web rails r before each script located in scripts folder.

If you want to migrate test database, you should add RAILS_ENV=test before each command

Running the app

  • Run app in development mode sudo docker-compose up
  • Run app locally but with production configuration sudo docker-compose -f docker-compose.prod-local.yml up
  • Run app in production mode sudo docker-compose -f docker-compose.prod.yml -p iot_controller up

Database Commands

  • Create a migration: rails generate neo4j:migration RenameUserNameToFirstName

Test Suite

  • Run sudo docker-compose run web rspec spec for Ruby tests.
  • Run sudo docker-compose run web rake rswag:specs:swaggerize for RSwag generators

Break down into end to end tests

Follow this good practices:

Build an image and push it to DockerHub

  • sudo docker build -t zonawik1/iot_controller:version .
  • sudo docker push zonawik1/iot_controller:version

Flush Redis DB

  • This command should be used carefully; it will delete the entire Redis DB.
  • Run in rails console Sidekiq.redis { |r| puts r.flushall }
  • If there is a overcommit memory, please checkout Redis logs:
  • sudo docker-compose -f docker-compose.prod.yml -p iot_controller logs --tail=1000 -f redis

Deployment instructions

This repository use Capistrano gem for deployment. Please read the documentation first.

  • Run script/up to deploy the app to AWS.

Built With

DB Cypher delete Nodes

Delete all nodes of specific label MATCH (n:City) DETACH DELETE n

Delete EVERYTHING IN DB (CAREFUL) MATCH (n) DETACH DELETE n

Contributing

This is a private repository.

Authors

  • Nathaly Villamor - Tech Lead at ProCibernética - Nathaly
  • William Calderon - Full stack developer at ProCibernética - William
  • Daniela Patiño - Full stack developer at ProCibernética - Daniela
  • Jeisson Moreno - DevOps Engineer at ProCibernética - Jeisson
  • Javier Varón - QA Developer at ProCibernética - Javier

See also the list of contributors who participated in this project.

Acknowledgments

iot_controller's People

Contributors

wecalderonc avatar danipb avatar morenojey-90 avatar jinara avatar jvaron avatar oscar-zw avatar procibernet 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.