5/06/2016

How to start a Jenkins slave inside Docker

First thing first: open Jenkins, go to Settings > Build Nodes > Add new node > Select Permanent Agent, then set the distant workspace directory (our HOST_JENKINS_SLAVE_HOME in the script above) and select Launch agent via Java Web Start.

Finally, login into your slave machine, put and edit the script above, run it and job done!

#!/usr/bin/env bash
JENKINS_ENDPOINT="http://my-jenkins.com"
SLAVE_SECRET="YOUR_SLAVE_SECRET_FROM_JENKINS_NODE_SETTINGS"

# where your slave working dir will be, it should be the same as the one you configured in Jenkins master settings
HOST_JENKINS_SLAVE_HOME="/data/jenkins-slave"

# download the slave.jar on the slave machine
curl -s "${JENKINS_ENDPOINT}/jnlpJars/slave.jar" > slave.jar

# run the slave inside a docker
# replace "-d" by "-it --rm" for debugging
docker run -d --name jenkins-slave -v ${PWD}:/app -v ${HOST_JENKINS_SLAVE_HOME}:${HOST_JENKINS_SLAVE_HOME} java:7 java -jar /app/slave.jar -jnlpUrl "${JENKINS_ENDPOINT}/computer/docker-slave/slave-agent.jnlp" -secret $SLAVE_SECRET
4/11/2016

How to setup Sysdig on Proxmox

First, you need to trust the Draios GPG key, configure the apt repository, and update the package list

curl -s https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public | apt-key add -
curl -s -o /etc/apt/sources.list.d/draios.list http://download.draios.com/stable/deb/draios.list
apt-get update

Install sysdig:

apt-get install -y sysdig

Ok, now if you try start sysdig it won't work. Sysdig is not compatible with Proxmox outside of the box BUT we can make it work! First install the proxmox kernel (pve) (source):

aptitude update && aptitude install  pve-headers-`uname -r`

Then run these extra commands (see this github issue), don't forget to change "0.9.0" with the sysdig version you installed.

cd /var/lib/dkms/sysdig/0.9.0/source/
sed -i 's/for_each_process/for_each_process_all/g' *.[ch]
sed -i 's/while_each_thread/while_each_thread_all/g' *.[ch]
sed -i 's/do_each_thread/do_each_thread_all/g' *.[ch]

# build sysdig kernel module
dkms build -m sysdig -v 0.9.0
dkms install --force -m sysdig -v 0.9.0

Alright! You should now be able to run sysdig and csysdig on proxmox!

2/29/2016

Give a try and bench ScyllaDB (Cassandra-compatible C++ db, 10x faster) with two lines of docker

I'm currently very interested by the ScyllaDB project as it announce a database that is "fully compatible with Apache Cassandra at 10x the throughput and jaw dropping low latency". Scylla is coded in C++ (so no garbage collection) and the team behind it seems quite awesome, so why not after all.
If like me you would like to give a quick try to ScyllaDB, here is two docker lines that will start ScyllaDB and run a benchmark over it:


Please note that running ScyllaDB inside a virtual box VM on MacOSX is not the best idea to grasp what it's capable of, however here is the result I got:

[Update] A little precision by Pekka Enberg: "Please remember that the Docker image is not optimized so performance isn't all that great. That's because Scylla needs a filesystem that supports AIO/DIO properly and the only one to do that is XFS at the moment."

« »
 
 
Made with ❤ on a hot august night from an airplane the 19th of March 2017.