Giter VIP home page Giter VIP logo

ojo-bot's Introduction

OJO Bot

This is a prototype data processor/publisher for NASA.

Maintained by Pat Cappelaere Vightel Corporation [email protected]

NOTE: Some changes have been made to the code to run on a local server without required access to the AWS cloud. Check config/config.yaml using_aws_s3_for_storage could be set to 0

Check python/config.py for example... USING_AWS_S3_FOR_STORAGE = 1 USING_LOCAL_DIR_FOR_STORAGE = 1 LOCAL_DIR_STORAGE = "/Users/patricecappelaere/Development/ojo/tmp"

NOTE 2: This may not be the best option to run as an enterprise system with multiples instances and load balancing.

Pre-requisites

Check PREREQUISITES.md

Local Docker

Install docker and start VM Start Docker VM via Docker Quickstart Terminal or might have to do: $ docker-machine start

docker --version Docker version 1.11.0

docker-machine env default bash eval "$(docker-machine env default)" docker ps

Build locally

docker-compose build development [use docker-compose-dev.yaml] docker images

Start shell in development mode... you can start processing python scripts

docker run -i -p 7465:7465 -t ojobot_development /bin/bash

To test python scripts using shared folder

docker run -i -p 7465:7465 -v /Users/patrice/data:/app/user/data2 -v /Users/patrice/Development/ojo/ojo-bot/python:/app/user/pydev -t ojobot_development /bin/bash

To stop a docker process

docker ps docker stop CONTAINER_ID

Connecting to service

Start Chrome and use IP address of VM returned by docker-machine env default

http://192.168.99.100:7465/

Checking/Cleaning docker images

docker images

Clean Docker

docker rm -v $(docker ps -a -q -f status=exited)

docker rmi -f $(docker images | grep "" | awk "{print $3}")

docker rmi $(docker images -f "dangling=true" -q)

Building base container

docker-compose build conda

Test it:

docker-compose run conda

Tag it

docker images

docker tag 608fd2eb4b79 cappelaere/ojo_publisher_base_stack:v1

Push it

docker login

docker push cappelaere/ojo_publisher_base_stack

Docker Deployment using Convox

$ convox login console.convox.com $ convox apps info $ convox deploy

Deployment Configuration

Note size worker to avoid out of memory (OOM) errors

$ convox scale worker --memory=2048 $ convox scale worker --count=2 $ convox scale web --memory=2048 $ convox scale web --count=2

$ convox rack scale --type=m3.large --count=4 ######$ convox rack params set Autoscale=Yes

Debugging

$ convox ps $ convox exec bash $ convox instances

Add convox.cron commands to docker-compose.yaml $ convox run worker --detach

ojo-bot's People

Contributors

cappelaere avatar

Watchers

 avatar  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.