Coder Social home page Coder Social logo

kubernetes-concourse's Introduction

Deploy Concourse CI To Kubernetes Cluster

Using vSphere Storage Class

Assume the kubernetes cluster has vsphere provider. Below command is able to provision a disk through vCenter and mount to the postgres pod. When the pod is recreated, the storage is treated as persistant storage and all the pipelines/meta data still exist

kubectl create -f vsphere/storage-class.yml
kubectl create -f vsphere/postgres-volume-claim.yml

Using GCP Storage Class

kubectl create -f gcp/storage-class.yml
kubectl create -f gcp/postgres-volume-claim.yml

Using AWS Storage Class

kubectl create -f aws/storage-class.yml
kubectl create -f aws/postgres-volume-claim.yml

Using Minikube hostpath Storage Class

kubectl create -f minikube/postgres-volume-claim.yml

Postgres DB

Postgres Database is concourse management plane backend

kubectl create -f postgres.yml

Web pod (ATC and TSA)

web consume postgres cluster ip through kubernetes dns. It also creates an internal Cluster IP service so worker can register.

kubectl create -f web.yml

Worker pod

kubectl create -f worker.yml

Access Concourse

Use NODE IP to access

kubectl create -f nodeport.yml

kubectl get service
concourse-external       NodePort    10.100.200.214   <none>        8080:30668/TCP    2h

fly -t atc login -c http://NODE_IP:30668

AWS ELB

kubectl create -f aws/elb.yml
kubectl describe service concourse-external | grep 'LoadBalancer Ingress'
LoadBalancer Ingress:     a7f8d86aed20211e7886906e5f61a9c9-952285343.us-west-2.elb.amazonaws.com
fly -t atc login -c https://a7f8d86aed20211e7886906e5f61a9c9-952285343.us-west-2.elb.amazonaws.com

GCP Load Balancer

kubectl create -f gcp/lb.yml

NSX Load Balancer

kubectl create -f vsphere/nsx-lb.yml
kubectl describe service concourse-external | grep 'LoadBalancer Ingress'
LoadBalancer Ingress:     10.193.54.218
fly -t atc login -c http://10.193.54.218:8080

Minikube

For A Minikube based Kubernetes cluster, use the following handy script to get the Concourse IP/Port

MINIKUBE_IP=$(minikube ip)
EXTERNAL_PORT=$(kubectl get services concourse-external -o json | jq ".spec.ports[0].nodePort")
CONCOURSE_URL="http://${MINIKUBE_IP}:${EXTERNAL_PORT}"
echo "Concourse Url: ${CONCOURSE_URL}"
fly -t atc login -c $CONCOURSE_URL

Future work

  • Expose concourse cluster through IAAS specific Load Balancer instead of NODE IP:Random_Port

  • Use Statefulsets and IAAS Storerage Class to configure a persisted HA postgres cluster

  • Resource Limitation on postgres, worker, and web

kubernetes-concourse's People

Contributors

datianshi avatar bijukunjummen avatar

Watchers

James Cloos avatar Eric De Witte 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.