GithubHelp home page GithubHelp logo

harol5 / planetarium Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 297.65 MB

Developing and deploying java app in GKE implementing Jenkins, Prometheus and Loki.

Shell 16.53% Java 82.68% Dockerfile 0.79%

planetarium's Introduction

Deploying in minikube

  1. make sure you're in the right folder
  2. start minikube
  3. install nginx helm chart, then run helm upgrade --install ingress-nginx ingress-nginx
    --repo https://kubernetes.github.io/ingress-nginx
    --namespace ingress-nginx --create-namespace see https://kubernetes.github.io/ingress-nginx/
  4. install loki-stack https://github.com/grafana/helm-charts/tree/main/charts/loki-stack helm upgrade --install loki grafana/loki-stack
    --set promtail.enabled=false
  5. install kube-prometheus-stack chart https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack then run <helm install -f prometheus-grafana-values.yml prometheus-monitoring prometheus-community/kube-prometheus-stack>
  6. helm install jenkins-planetarium jenkins/jenkins -f jenkins-values.yml
  7. apply promtail-config.yml
  8. apply planetarium-config.yml
  9. planetarium-secret.yml(command line?)
  10. apply planetarium-services-monitor.yml
  11. apply planetarium.yml
  12. apply ingress-service.yml
  13. run on different terminal.
  14. test the app.

Deploying in GKE

Postgres

  • kubectl apply -f postgres-db
  • create tables= kubectl exec -it pod/postgres-deployment-7cf95d7989-swcmr -c postgres -- psql -d postgres -U postgres

Ingress helm

Prometheus monitoring

  • helm install -f prometheus-grafana-values.yml prometheus-monitoring prometheus-community/kube-prometheus-stack

Loki stack helm

  • helm upgrade --install loki grafana/loki-stack #make persistent, edit file to do so.
  • apply loki-pvc.yml
  • kubectl edit statefulset.apps/loki

volumeMounts:

  • mountPath: /tmp name: tmp
  • mountPath: /etc/loki name: config
  • mountPath: /data name: storage
  • mountPath: /tmp/loki/ name: loki-storage

volumes:

  • emptyDir: {} name: tmp
  • name: config secret: defaultMode: 420 secretName: loki
  • emptyDir: {} name: storage
  • name: loki-storage persistentVolumeClaim: claimName: loki-pvc

Jenkins helm

  • helm install jenkins-planetarium jenkins/jenkins -f jenkins-values.yml

  • kubectl exec --namespace default -it svc/jenkins-planetarium -c jenkins -- /bin/cat /run/secrets/additional/chart-admin-password && echo

  • kubectl create clusterrolebinding jenkins-deploy
    --clusterrole=cluster-admin --serviceaccount=default:jenkins-planetarium

    Jenkins setup with github

     1. create pipiline
     2. Build Triggers: githud hook
     3. pipeline script from scm > add github repo url > /main > Script path: Jenkinsfile > uncheck Lightweight checkout.
     4. go to the github repo and add wedHook: settings>Webhooks>addWebhook> http://{ip}/jenkins/github-webhook/
     5. create Jenkinsfile
     6. git add, git commit, git push
    

Planetarium app

  • kubectl apply -f planetarium-app
  • kubectl apply -f canary
  • after pushing into github, jenkins should build test and deploy the planetarium and ingress service manifest to GKE.

helm upgrade [RELEASE] [CHART] [flags]

planetarium's People

Contributors

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