All Projects → idev4u → concourse-ci-kube

idev4u / concourse-ci-kube

Licence: other
Concoures CI Kube Deploment

Projects that are alternatives of or similar to concourse-ci-kube

Computer-Architecture-Task-2
Riscv32 CPU Project
Stars: ✭ 43 (+168.75%)
Mutual labels:  pipeline
skippa
SciKIt-learn Pipeline in PAndas
Stars: ✭ 33 (+106.25%)
Mutual labels:  pipeline
dropEst
Pipeline for initial analysis of droplet-based single-cell RNA-seq data
Stars: ✭ 71 (+343.75%)
Mutual labels:  pipeline
metagraf
metaGraf is a opinionated specification for describing a software component and what its requirements are from the runtime environment. The mg command, turns metaGraf specifications into Kubernetes resources, supporting CI, CD and GitOps software delivery.
Stars: ✭ 15 (-6.25%)
Mutual labels:  pipeline
etl
M-Lab ingestion pipeline
Stars: ✭ 15 (-6.25%)
Mutual labels:  pipeline
germline-DNA
A BioWDL variantcalling pipeline for germline DNA data. Starting with FASTQ files to produce VCF files. Category:Multi-Sample
Stars: ✭ 21 (+31.25%)
Mutual labels:  pipeline
sfpowerscripts
A build system for modular development in Salesforce, delivered as a sfdx plugin that can be implemented in any CI/CD system of choice
Stars: ✭ 121 (+656.25%)
Mutual labels:  pipeline
pipecolor
A terminal filter to colorize output
Stars: ✭ 17 (+6.25%)
Mutual labels:  pipeline
Credit
An example project that predicts risk of credit card default using a Logistic Regression classifier and a 30,000 sample dataset.
Stars: ✭ 18 (+12.5%)
Mutual labels:  pipeline
JT1078Gateway
基于Pipeline实现的JT1078Gateway支持TCP/UDP,目前只支持http-flv、ws-flv、hls三种拉流方式
Stars: ✭ 50 (+212.5%)
Mutual labels:  pipeline
bifrost
A stream processing framework for high-throughput applications.
Stars: ✭ 48 (+200%)
Mutual labels:  pipeline
spot-termination-exporter
Prometheus spot instance exporter to monitor AWS instance termination with Hollowtrees
Stars: ✭ 30 (+87.5%)
Mutual labels:  pipeline
elasticsearch-ingest-attachment-plugin-example
Example of how to use ElasticSearch ingest-attachment plugin using JavaScript
Stars: ✭ 19 (+18.75%)
Mutual labels:  pipeline
pipelines-as-code
Pipelines as Code
Stars: ✭ 37 (+131.25%)
Mutual labels:  pipeline
coronavirus-stats
Automatically scrape data and statistics on Coronavirus to make them easily accessible in CSV format
Stars: ✭ 47 (+193.75%)
Mutual labels:  pipeline
companion
This repository has been archived, currently maintained version is at https://github.com/iii-companion/companion
Stars: ✭ 21 (+31.25%)
Mutual labels:  pipeline
image-processing-pipeline
An image build orchestrator for the modern web
Stars: ✭ 43 (+168.75%)
Mutual labels:  pipeline
concourse-git-bitbucket-pr-resource
🚀 Concourse CI resource for tracking git branches of Bitbucket pull-requests
Stars: ✭ 29 (+81.25%)
Mutual labels:  concourse-ci
gitlab-merger-bot
GitLab Merger Bot
Stars: ✭ 23 (+43.75%)
Mutual labels:  pipeline
bistro
A library to build and execute typed scientific workflows
Stars: ✭ 43 (+168.75%)
Mutual labels:  pipeline

The missing kubernetes deployment for Concourse-Ci

Goal

This project was build to bring Concourse-Ci to IBM Cloud Container Service, which is based on kubernetes. If someone else has the need to deploy Concourse-Ci to kubernetes he/she should also benefit from this project.

Pre Requirements

The only Requirements to follow all this steps is to have running kubernetes cluster on IBM Bluemix Containers. How to do this, is described on https://console.bluemix.net/containers-kubernetes/launch?env_id=ibm:yp:eu-de The second requirement is that you have basic knowledge about kubernetes.

Install

  1. Grab the project

    git clone [email protected]:idev4u/concourse-ci-kube.git
    cd concourse-ci-kube
  2. As described in the Concourse Documentation generate the keys for TSA and ATC

    mkdir -p keys/web keys/worker
    
    ssh-keygen -t rsa -f ./keys/web/tsa_host_key -N ''
    ssh-keygen -t rsa -f ./keys/web/session_signing_key -N ''
    
    ssh-keygen -t rsa -f ./keys/worker/worker_key -N ''
    
    cp ./keys/worker/worker_key.pub ./keys/web/authorized_worker_keys
    cp ./keys/web/tsa_host_key.pub ./keys/worker
    
  3. Generate the secrets volume for your deployments

    This generate the secret volume for the web deployment

    $ kubectl create secret generic concourse-web-keys \
    	--from-file=./keys/web/authorized_worker_keys \
    	--from-file=./keys/web/session_signing_key \
    	--from-file=./keys/web/session_signing_key.pub \
    	--from-file=./keys/web/tsa_host_key \
    	--from-file=./keys/web/tsa_host_key.pub
    

    If you would verify the generated secrets volume, use this command.

    kubectl get secret concourse-web-keys -o yaml

    Here is command that generate the secret volume for the worker deployment

    $ kubectl create secret generic concourse-worker-keys \
    	--from-file=./keys/worker/tsa_host_key.pub \
    	--from-file=./keys/worker/worker_key \
    	--from-file=./keys/worker/worker_key.pub
    

    And here as well the verify command.

    kubectl get secret concourse-worker-keys -o yaml
  4. Deploy the all the 3 components

    This command will deploy the database for your Concourse-Ci

    kubectl apply -f concourse-db-deployment.yaml && kubectl apply -f concourse-db-service.yaml
    deployment "concourse-db" created
    service "concourse-db" created

    Before you deploy the Web UI, change the value of the external IP in the concourse-web-deployment.yaml file

      - name: CONCOURSE_EXTERNAL_URL
        value: ${kubernetes_node_public_ip}
    

    This command will deploy the WebUI of your Concourse-Ci

    kubectl apply -f concourse-web-deployment.yaml && kubectl apply -f concourse-web-service.yaml
    deployment "concourse-web" created
    service "concourse-web" created

    This command will deploy one worker for your Concourse-Ci

    bash$ kubectl apply -f concourse-worker-deployment.yaml && kubectl apply -f concourse-worker-service.yaml
    
    deployment "concourse-worker" created
    service "concourse-worker" created

Concourse Pipeline

After the Concourse-Ci deployment is succesfully done, you can login the frist time into Concourse-Ci. Open the url http://${kubernetes_node_public_ip}:32080 in your favorite browser and login with user concourse and the password changeme. If you have changed this values in the deployment manifests, use yours. If this works and you have download the tool fly you can push your first pipeline.

fly -t kube login -c ${kubernetes_node_public_ip}
fly -t kube set-pipeline -p kube-pipe -c pipeline/pipeline.yml
fly -t kube expose-pipeline -p kube-pipe

Some useful command to be succesful

public IP of your node

How did you find the public IP of your kubernetes node on the Bluemix Container platform? This is the command for getting this information.

bx cs workers concourse-ci
ID                                                 Public IP      Private IP      Machine Type   State    Status
kube-par01-pa747d8ee7d506411aba3f992fc3d3c7a1-w1   x.x.x.x        10.x.x.x	  free           normal   Ready

kube context

If you are not sure, that you aim on the correct context, this command helps you.

kubectl config current-context
concourse-ci

This command provides an overview of your pods you should have 3!

kubectl get pods -o wide
NAME                                READY     STATUS    RESTARTS   AGE       IP               NODE
concourse-db-59888000-1fcv0         1/1       Running   0          6h      172.x.x.x      10.x.x.a
concourse-web-2821356835-npkvb      1/1       Running   0          5h      172.x.x.x      10.x.x.a
concourse-worker-1074565060-nkrm9   1/1       Running   0          13m     172.x.x.x      10.x.x.a

This command provides an overview of your service you should also have 3!

bash$ kubectl get svc -o wide
NAME               CLUSTER-IP   EXTERNAL-IP   PORT(S)          AGE       SELECTOR
concourse-db       None         <none>        55555/TCP        28d       service=concourse-db
concourse-web      None         <nodes>       8080:32080/TCP   10m       service=concourse-web
concourse-worker   None         <none>        55555/TCP        12m       service=concourse-worker

Troubleshooting

TSA Connection

Problemdescription:

I had a problems with the tsa connection from inside of the worker container.

Solution:
I fixed it with replaceing the service selector name with the endpoint ip.

Getting the enpoint of the service concourse-web

kubectl get endpoints | grep web
concourse-web      1.1.1.80:8080    17h

and here the area which is have to change concourse-worker-deployment.yaml

   ...
   # use the endpoint ip, because the dns lookup point to the cluster ip and this ip is not reachable from inside the container
   # value: concourse-web
   value: 1.1.1.80
   ...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].