Using GlusterFS for high available storage on Ubuntu

With this setup we will make two servers using a shared storage as high availabile mount. Both of them host the data, if one of them is down, the other one will stay the source of truth for so long. Disadvantage of this approach is, that the files exist 4 times: at server1 and server2 each with /mnt/barrel (the mounted directory) + /var/glusterfs/barrel (the glusterfs working directory).

Install glusterfs server and client

On both machines run as root:

$ sudo apt-get install glusterfs-server glusterfs-client

This makes the glusterfs server available and will allows us to connect to the server later on.

Continue reading ...

In glusterfs, open source, ubuntu by DracoBlue @ 29 Sep 2014 | 303 Words

Use blocks for you CSS/SCSS

If you are working with SCSS/SASS, you might still wonder how to organize your CSS classes. The pre-SASS conventions like OOCSS seem not to be necessary in SCSS, since SCSS has mixins, placeholders and variables.

But there is one very powerful feature of SCSS, which we want to take advantage of now: inline sub selectors in selectors.

.b-post {
  .title {
    color: #f00;

    &:hover {
      color: #fff;

  &.is-new {
    background-color: #aaf;
Continue reading ...

In bem, css, open source, scss by DracoBlue @ 25 Jul 2014 | 620 Words

Set Sender/Reply-To for sendmail in PHP

Today I tried to configure the sender for sendmail in php. There are some ways how to do it, so I share my solution.

There is a sendmail_from setting in php cli and php fpm, but it is usually empty. So sendmail fallsback to user@hostname (given you are logged in as user and the machine is called hostname).

But I found a better way (maybe even easier to extend). Just change the sendmail_path to something with an extra -f noreply@example.org at the end.

Continue reading ...

In open source, php, sendmail, ubuntu by DracoBlue @ 09 Jul 2014 | 204 Words

How to enter/ssh into your docker container

If you want to debug or enter your docker container, you might think that you will easily run a sshd server and that's fine. But it's wrong and most of all: it's not necessary.

Like @jpetazzo explained in "Docker SSHD considered evil": containers run with only one executable as main process. So if you want to have a sshd next to your php-fpm, you will need monit or supervisor to launch them. That's already 3 services in total!

That's why: keep your docker image clean!

But how to enter the container? There is a little tool called "nsenter" (available with util-linux >= 2.24)

Continue reading ...

In docker, open source, ubuntu, vm by DracoBlue @ 09 Jul 2014 | 267 Words

HTTP method hints in media types considered harmful

If you are working on a new API for one of your projects, you might consider a media type like HAL or Collection+JSON as an option for structuring your API responses.

First of all, check out api-craft mailinglist or hal-discuss mailinglist for really good ontopic discussions about api architectures and media types.

Common JSON media types do not support a method parameter on relations

In HAL relations are defined in links, like this (e.g. self and http://example.org/rels/appointment/cancel):

     "_links": {
       "self": { "href": "/appointment/123" },
       "http://example.org/rels/appointment/cancel": { "href": "/appointment/123" }
     "patient_id": "jsmith"

Even though the relations for a patient appointment are available, it's not clear which http method to use.

Continue reading ...

In api, hateoas, open source, rest by DracoBlue @ 29 May 2014 | 495 Words

Page 1 - Page 2

Recent Files


Recent Dev-Articles