Git Product home page Git Product logo

devops-tasks's Introduction

devops-tasks

Application flow - K8S Level

When the client hits the app endpoint, the k8s level flow as below:

app-overview

to run the app locally:

  1. clone the repo git clone -b main https://github.com/saloyiana/devops-tasks
  2. change dir to devops-tasks/todo_app by cd devops-tasks/todo_app/
  3. run docker-compose up
  4. to access the app, go to: http://localhost:8000/todos/list/

to run the app on k8s env

  1. add your creds to the platform/k8s-cluster/terraform.tfvars
  2. run make cluster up or
cd platform/k8s-cluster
terraform init
terraform apply -auto-approve

echo "Preparing the namespaces"
kubectl create namespace nginx-ingress
kubectl create namespace argocd
kubectl create namespace kyverno
kubectl create namespace monitoring
kubectl create namespace logging
kubectl create namespace app-test
kubectl create namespace db
kubectl create namespace app-prod
  1. start installing the tools by running make tools or sh tools.sh
  2. create the db and argocd apps by running make db argocd-test db argocd-prod or
echo "Prepare the DB for the APP"
helm repo add bitnami https://charts.bitnami.com/bitnami &&\
    helm repo update &&\
    helm install postgres -n db --set primary.persistence.enabled=false,global.postgresql.auth.database=postgres,global.postgresql.auth.postgresPassword=postgres,global.postgresql.auth.username=postgres,tls.preferServerCiphers=false,readReplicas.persistence.enabled=false,serviceAccount.automountServiceAccountToken=false bitnami/postgresql --version 12.8.0

kubectl apply -f argocd-objects/repo.yaml -n argocd
kubectl apply -f argocd-objects/test.yaml -n argocd
kubectl apply -f argocd-objects/prod.yaml -n argocd

note: if you wish to install the app in push-mode, check app.sh

Images

K8S Resources

k8s-ns

CI/CD Steps

cicd-overview

Argocd Apps

argocd-ui

Kibana Dashboard

kibana-dashbord

Grafana Dashboard

app-monitoring

Kyverno Polices

kyverno-policy

Notes:

  1. there is still need to manage the env secrets, to be improved.
  2. the database for test and prod need to different, however it is one instance here for demo purposes.
  3. it is better to have two different repos for app and k8s config.

devops-tasks's People

Contributors

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