GithubHelp home page GithubHelp logo

asmtal / flaskweatherapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jack17529/flaskweatherapp

0.0 0.0 0.0 641 KB

A flask weather app deployed by me on Kubernetes and exposed using a service. Automated Jenkins servers on AWS for CI/CD Pipelines using Terraform and Ansible.

Home Page: https://hub.docker.com/r/jack17529/weather

License: MIT License

Python 16.73% HTML 22.95% Smarty 14.26% HCL 44.77% Dockerfile 1.30%

flaskweatherapp's Introduction

FlaskWeatherApp

  • Developed a flask app using Python3, SQLalchemy and deployed it on Kubernetes.
  • Used Jenkins servers on AWS for CI/CD pipeline.
  • Provisioned the architecture on AWS using Terraform.
  • Did configuratin management of Jenkins servers on AWS using Ansible.
  • Deployed the app on EKS cluster using helm chart.

Steps to run the flask app

  1. Clone the git repo.
  2. Create a python virtual environement.
  3. Install the requirements.txt in the environement.
  4. Use the sample secret.ini provided below to run the app.
[main]
api_key = 271d1234d3f497eed5b1d80a07b3fcd1
  1. Run the app using flask run command.

Steps to run Dockerfile

  1. Clone the git repository.
  2. cd in the repository and build the Dockerfile using docker build -t <name of image you want to build>:<tag> . (example - docker build -t weatherapp:1 .)
  3. Check the images present using docker image ls
  4. Run the Dockerfile using docker run -it -v <local-config-location>:<location-in-docker> -v <local-secret-location>:<location-in-docker> -p <port_to_be_served>:<port_the_website_works> <name of image you want to build>:<tag> (example - docker run -it -v ${PWD}/config:/config -v ${PWD}/secret/:/secret -p 5000:5000 weatherapp:1)
  5. Go to localhost:5000
  6. The docker image can be found on Docker Hub - https://hub.docker.com/r/jack17529/weather

Steps to deploy

  1. Make a deployment.yaml file
  2. The file has 2 parts the deployment part and the service part.
  3. Make a namespace for the app kubectl create ns flaskapp
  4. Deploy using kubectl apply -f deployment.yaml -n flaskapp
  5. Check port31000 and the weather app would be running.

Setting up AWS

Setting Jenkins Pipeline

flaskweatherapp's People

Contributors

dependabot[bot] avatar jack17529 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.