GithubHelp home page GithubHelp logo

binaize-optimize's Introduction

binaize-optimize

NEVER EVER COMMIT THE FILES config.py or config.env

For Local development

  1. Install python 3.6.8

  2. Install the dependencies

    pip3 install -r requirements.txt
    
  3. add config.py in the root folder of the project.

  4. To start the web server

    uvicorn optimization_platform.deployment.server:app --reload 
    
  5. Go to http://127.0.0.1:8000/docs

Using docker and docker-compose

  1. add config.env in the root folder of the project.

  2. docker-compose -f docker-compose-optim.yaml build

  3. docker-compose -f docker-compose-optim.yaml up

  4. Go to http://127.0.0.1:6006/docs

To run the test cases

docker-compose -f docker-compose-optim.yaml up --build --remove-orphans

The output should be

----------------------------------------------------------------------     
Ran X tests in 0.001s          
OK

To reset the tables on AWS RDS

bash initialize_rds.sh

To deploy in EC2 DEV cluster

ssh -i "binaize-optimize.pem" [email protected]
sudo apt update
sudo apt -y install docker.io
sudo apt -y install docker-compose
git clone https://github.com/binaize/binaize-optimize.git
cd binaize-optimize
git checkout development
scp -i "binaize-optimize.pem" ./optim-dev.env [email protected]:~/binaize-optimize/
cp binaize-optimize/optim-dev.env binaize-optimize/optim.env

To deploy in EC2 STAGING cluster

ssh -i "binaize-optimize.pem" [email protected]
sudo apt update
sudo apt -y install docker.io
sudo apt -y install docker-compose
git clone https://github.com/binaize/binaize-optimize.git
cd binaize-optimize
git checkout staging
scp -i "binaize-optimize.pem" ./optim-staging.env [email protected]:~/binaize-optimize/
cp binaize-optimize/optim-staging.env binaize-optimize/optim.env

To deploy in EC2 PROD cluster

ssh -i "binaize-optimize.pem" [email protected]
sudo apt update
sudo apt -y install docker.io
sudo apt -y install docker-compose
git clone https://github.com/binaize/binaize-optimize.git
cd binaize-optimize
git checkout master
scp -i "binaize-optimize.pem" ./optim-prod.env [email protected]:~/binaize-optimize/
cp binaize-optimize/optim-prod.env binaize-optimize/optim.env

For first time deployment

nohup sudo docker-compose -f docker-compose-optim.yaml up --build --remove-orphans >> ~/optim.out&

For re-deployment

nohup sudo docker-compose -f docker-compose-optim.yaml restart optim-server optim-scheduler >> ~/optim.out&

binaize-optimize's People

Contributors

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