Coder Social home page Coder Social logo

aventus_exersice_1's Introduction

aventus_exersice_1

!!Application was developed and tested on microk8s single-node cluster.

The repo contains 2 types of app:

  • docker-compose
  • helm chart

If you want to run flask app without deploying k8s cluster just run: docker-compose up -d --build

It will create postgresql and flask connected apps.

Also you can find helm chart in flask-app folder. Before running helm install you need to create namespace flask-app, github personal access token with permissions:

  • admin:repo_hook,
  • delete:packages,
  • repo,
  • write:packages

and kubernetes secret, containing that token:

k create secret docker-registry github-key --docker-server=ghcr.io --docker-username=YOUR_USERNAME --docker-password=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --docker-email=YOUR_EMAIL -n flask-app

here: github-key - is the name of the secret YOUR_EMAIL - email you use to log in to github YOUR_USERNAME - is your username) docker-password - paste your github personal access token.

Additionally you need to download and update helm dependencies: helm dependencies update

Now you can install helm chart, containing

  • flask app chart
  • postgresql v16.2 helm chart
  • pgadmin4 helm chart

helm install flask-app -n flask-app ./flask-app

Flask app will be accessble via http://K8S_NODE_IP:30500/

Flask endpoints available:

http://K8S_NODE_IP:30500/endpoint1

http://K8S_NODE_IP:30500/endpoint2

Those endpoints return content of postgresql tables endpoint1 and endpoint2, stored in db db_exercise_1

Postgresql credentials hardcoded into helm version but they are using env vars in docker-compsoe version:

dbname="db_exercise_1"

user="postgres"

password="postgres"

host="flask-app-postgresql" (here postgresql service's name is used).

pgadmin4 is available http://K8S_NODE_IP:PGADMIN4_SERVICE_PORT

pgadmin4 credentials:

username - [email protected]

password - devops

aventus_exersice_1's People

Contributors

dzmitrytarasevich avatar

Watchers

 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.