DevOps

Jenkins

Trigger Jenkins multibranch pipeline with curl or webhook

0

Git branch source

Jenkins jobs that use the widely used git plugin, can be triggered remotely with curl or a webhook. The job must have the option “Poll SCM” enabled. That’s all to enable push triggers, no timer has to be configured. Jobs are only executed if there is an actual source code change. Off course you can configure a timer, if you also want a periodic pull.

An example curl commando to trigger all jobs that have configured the repository URL “ssh://git@bitbucket.mycompany.example/demo/my-api.git” in Git SCM and have “Poll SCM” enabled:

curl 'http://jenkins.mycompany.example/git/notifyCommit?url=ssh://git@bitbucket.mycompany.example/demo/my-api.git' --user 'jenkins-trigger:mysecrettoken123'

More >

jenkins-docker-180x180

Jenkinsfile Docker pipeline multi stage

0

Using a Jenkinsfile to configure the Jenkins build job for source code is great. Jenkins has a very nice Docker Pipeline plugin that makes it possible to execute docker commands nicely during the build.

Note: Don’t forget to read on this page the update of 16 august 2018.

However, a lot of the examples at https://jenkins.io/doc/book/pipeline/docker/ keep it very simple. They start and stop in one pipeline stage, with methods like docker.inside or docker.withRun. For example, building a container, running it, executing commands in it and destroy it, all within one stage. For several use More >

minikube-square

Minikube NFS mounts

2

Minikube is great for having a Kubernetes cluster as local Docker development environment. In a development workflow you probably have source code on your host machine and it would be great if the Docker containers in the Kubernetes cluster could mount this. So changes made to the code can be tested and are visible quickly. The steps on this blog post are tested with Minikube version v0.28.0.

Mounting is possible for example with:

minikube start --mount --mount-string ./sources:/sources

And by using hostPath in the volume.

---

More >

python-icon

Rolling upgrade Elasticsearch, Couchbase and CouchDB

0

For a client I automated the patching process of Linux operating systems and middleware. I create a python action for that in StackStorm. The script retrieved all servers from the CMDB and patched per data center.

 

Non cluster hosts parallel

All non cluster hosts where patched in parallel with the Python ParallelSSHClient.

Cluster hosts rolling upgrade

For hosts in a cluster it’s a bit harder. The minimum amount of nodes in a cluster is most of the time 3 and only one node can be down without downtime of the cluster. So a rolling upgrade is More >

chef-logo

Install ViMbAdmin with Chef

0

Two years ago I wrote a tutorial to install a complete Postfix mail server with Dovecot, SpamAssassin and ViMbAdmin. At the moment I am automating this tutorial for CentOS 7 with Chef. For ViMbAdmin I created a recipe that clones the ViMbAdmin repository from Github, puts the configuration files from templates, creates the database, tables and inserts an admin user into the database. I thought it would be nice to share my vimbadmin recipe:

(more…)

chef-logo

Chef – Speed up development with vagrant-proxyconf and squid

0

If you do a lot of Chef development, you are creating cookbooks with recipes. But also converging, testing and destroying virtual machines with Test Kitchen that uses Vagrant. In this process, virtual machines are often destroyed and build from the ground up. For every new build, all of the yum or debian packages must be downloaded and installed again. If your internet connection is not blazing fast, this will certainly slow down your work tempo a lot.

Install and configure Squid

But no worries, we can fix that with the use of the wonderful vagrant-proxyconf More >

Capistrano

Capistrano – Automatically start ssh-agent

0

Capistrano has the option to forward the local SSH agent to the remote server it wants to deploy on. But for this to work a SSH agent must be running and the key(s) you want to forward must be added to that SSH agent.

First I tried to start the SSH agent with the Capistrano deploy.rb recipe, but I could not get that to work and also the killing of the SSH agent afterwards could be a problem.

Eventually I solved it by adding the following line to the crontab of the deploy user. This line will be executed More >

Go to Top