Posts

Soft-removing balancing node from HAProxy

HAProxy is great! It is a simple tool that allows to balance the load across multiple servers and it's pretty easy to setup and configure. But I have encountered a little bit challenging to handle the upgrade of one of the server node. You see, in the most common configuration, HAProxy is set to just checks for a port on the server, for example the WildlFly port 8080, so, in order to stop receiving requests from clients, you either stop the application server or disable it on HAProxy. Neither of those methods worked for the application I was working on for various reasons that are out of scope of this post. The solution I have found is pretty simple and it is based on a URL on the application server itself, that HAPRoxy is using to check if the node is available. For example: http://localhost:8080/console/health Here is an example of HAProxy configuration, that is using this URL for health checking: global daemon maxconn 4096 user haproxy group haproxy defau...

Docker with WildFly and Java 8

Searching for a docker container for running JBoss WilFly  application server, I could not find any existing one that has the Java 8. So had to create one . To import it run: docker pull sillenttroll/wildfly-java-8 In order to run it simply execute this: docker run -d -it -p 9990:9990 -p 8080:8080 sillenttroll/wildfly-java-8 However, in order to be able to manage the instance and to deploy your application, you will have to add a management user. This is done with the WilfFly  add-user utility  . In order to be able to access and run the utility you will have to extend the image. Create a Dockerfile  with the following content: FROM sillenttroll/wildfly-java-8 RUN /opt/wildfly/bin/add-user.sh user password --silent Then build the image docker build -t "your_tag" . Run the new image and start using this amazing application server with latest Java version. Source code is available here . And here you can find the container info on Docker Hub.

Puppet module for MongoDB Management Service

Hello everyone! One of the server, on which runs my "pet project":  www.torrent-filter.com , is running MongoDB database, that I want to be able to monitor. Thanks to the guys at MongoDB, they have created a great service for monitoring and backups:  MongoDB Management Service . The monitorization requires the installation and configuration of a small package. A process that I wanted to automate. So I have created a really simple Puppet module for this. The installation is pretty simple: puppet module install SillentTroll-mongodbmms In your main  *.pp file just define this (with the appropriate value for your mms key): class { 'mongodbmms': api_key => Env['MMS_API_KEY'] } Unfortunately, you will have to perform the needed configuration of the host manually. The source code is available here . You can report any issue here .

Dropbox OAuth in Flask

Yesterday I was trying to add a Dropbox related functionality to my home-brew project http://rss-aguzun.rhcloud.com/ , which is build using a great and lightweight Python framework Flask , and I had some issues, solution to which will be described in this blog post. As I have already added Twitter integration using Flask-OAuth extension, I thought it will be relatively easy to do the same for the Dropbox Core API Authentication Method. I was wrong :). You see, after some debugging, I have decided to do a rather unusual thing for me: read very carefully the documentation. And then I have found out that the Drobpox API´s are based on OAuth 1.0 specification, when the Flask-OAuth supports only the 1.0a version. What is the difference? A very substantial one, in my opinion, for a "a" version. In 1.0a version, the oauth_callback parameter is passed in the first step of the flow, Consumer Obtains a Request Token . The Service Provider will redirect the User back when th...

OpenShift deploy script

This is a simple shell script I use to deploy my app to OpenShift. Place this script in your deployments folder.

Quinta da Regaleira

Image
Quita da Regaleira  —  неоготический дворцово-парковый комплекс неподалёку от Синтры в Португалии. На территории поместья находятся вычурный романтический дворец в стиле фантастически переосмысленной неоготики, часовня и парк с озёрами, гротами, колодцами, скамейками, фонтанами и архитектурными капризами. В обиходе известен как дворец миллионера Монтейру, в честь первого владельца Карвалью Монтейру, который был известен своим интересом к масонской культуре и алхимий. Советую вам захватить у входа карту этого места, и не забыть привести с собой фонарик. Также можно посмотреть на это место используя о тличный виртуальный тур по этому волшебному месту  . В парке находится обширная и загадочная система туннелей, которые имеют множество входов и выходов: гроты, часовня, озеро-водопад и «Пещера Леды» под башней Регалейра. Их символика интерпретирована как путешествие между светом и тьмой, смертью и воскрешением. Особого упоминания заслуживают два...

git - the simple guide

just a simple guide for getting started with git. no deep shit ;)