turbospaces / github-webhook-kubernetes

GitHub Webhook app. Receives messages from GitHub and sends them to a message broker. Part of the deployment pipeline example for Kubernetes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Webhook

GitHub Webhook app. Receives messages from GitHub and sends them to a message broker. Part of the deployment pipeline example

Docker integration

For more information please read the guides.

Building docker image

$  ./mvnw package docker:build

Setting authentication for Docker

Go to your ~/.m2/settings.xml and add the server with id docker-repo

<server>
  <id>docker-repo</id>
  <username>username</username>
  <password>password</password>
  <configuration>
    <email>your@email.com</email>
  </configuration>
</server>

Pushing docker image

Important
Remember to set authentication in your settings.xml
$  ./mvnw package docker:build -DpushImage

or

$  ./mvnw deploy

Running the application in Kubernetes

  • First create and push the docker image

    $ ./mvnw package docker:build -DpushImage
  • Start minikube

    $ minikube start
  • Start Kubernetes Dashboard

    $ minikube dashboard
  • Create this deployment on the cluster using kubectl

    $ kubectl create -f deployment.yml
  • Check if deployment is there

    kubectl describe deployment github-webhook-deployment
  • Create a service to expose the pod to the outside world

    $ kubectl create -f service.yml
  • Check if service has properly been created

    $ kubectl describe service github-webhook-service
  • Retrieve the URL from minikube

    $ minikube service github-webhook-service --url
  • Or go directly to the URL

    $ minikube service github-webhook-service

Deleting deployments / services

It’s enough to call kubectl delete to delete deployment / service

$ kubectl delete deployment github-webhook-deployment
$ kubectl delete service github-webhook-service

About

GitHub Webhook app. Receives messages from GitHub and sends them to a message broker. Part of the deployment pipeline example for Kubernetes

License:Apache License 2.0


Languages

Language:Groovy 53.9%Language:Java 24.6%Language:Shell 12.0%Language:Batchfile 9.5%