Git Product home page Git Product logo

epfl_sti_devops_challenge's Introduction

EPFL STI DevOps Challenge v 0.40


As requested per the challenge task (found here https://github.com/jaepetto/STI-devops-challenge), this repository includes 4 main components

  1. Prerequisites docker
    docker-compose
    snap

  2. Setup In order to run initial setup on Ubuntu, either run
    ./setup.sh
    or
    sudo snap install docker

  3. Build In order to build the container, run docker-compose up -d --build

  4. Prepare Django You also need to migrate Django DBs to PostgreSQL DB. For that, run:
    nano epflchallenge/apps/todo/migrations/__init__.py
    then (based on previous experience, running migrations outside of container's bash may not complete successfully)
    docker run -ti epfl_challenge_web_1 bash
    then
    mkdir epflchallenge/apps/todo/migrations
    then
    python manage.py makemigrations
    and finally
    python manage.py migrate

  5. Find the IP
    docker inspect web

  6. Go to the IP and see the page


Several important comments:

  1. The application uses .env file to store environment variables, such as PostgreSQL host, user and password, for use in Django settings.py
  2. HaProxy uses a script to open the ports
  3. Failover can be increased by simply adding additional Nginx node in docker_compose.yml and haproxy.cfg
  4. HaProxy and Nginx can be configured to accept connections over HTTPS, which is important in this day and age.
  5. In order to update containers without downtime, it's enough to run docker-compose up -d --build

epfl_sti_devops_challenge's People

Contributors

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