Git Product home page Git Product logo

devops-assessment's Introduction

DevOps-Take-Home

  1. Create your own AWS Account to utilize during this exercise. Utilize free-tier where possible to avoid costs being charged to you, and don't forget to destroy all resources when you're done. We don't want this to cost you money :)

  2. Then, create a Kubernetes cluster in AWS that hosts the Flask application (app.py) as well as a Postgres database for the application to access. HINT: You will need image(s) and files to deploy the application and database in Kubernetes. HINT2: Your image(s) will need to be accessible from within AWS.

  3. Once your Flask application and Postgres database are running in Kubernetes, proceed.

  4. Scale your application to 2 instances.

  5. Follow instructions below for interacting with the API.

Interact with the API

POST a message to the API:

curl -X POST http://127.0.0.1:5000/message -H "Content-Type: application/json" --data '{"message": "hi"}'

GET a message

curl http://127.0.0.1:5000/message/1

HEALTHCHECK

curl http://127.0.0.1:5000/healthcheck

Test Locally

If you desire to test locally to see things working there first before you put it on Kubernetes, you can follow the instructions below:

Install the app

git clone https://github.com/geezerP/devops-assessment.git
cd devops-assessment
virtualenv -p python3 .
source bin/activate
pip install -r requirements.txt

Start the app

If you're using a local postgres db use the following to run the app.

DATABASE_URL='postgresql://postgres:postgres@localhost:5432/groundspeed_devops' python app.py

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.