2014. június 20., péntek

Work on Salt is in final state

I was out for a while, it's exam time in my university. Next to the studying I worked on my GSoC task but didn't write blog about it. Now, I have done with my exams so I can make up leeway.


I worked on a Salt state module and IMHO it's  development is reaching its final state. I'm done with config generation from YAML, you can find a howto here:



There are a lot of examples I hope you will try them. I don't want to repeat myself, under the above link you can find information how to use the new syslog-ng state modul.
At first it was difficult to me to generate perfect syntax configurations. There are a lot of statement types (log, channel, source, options, etc.), some of them have names, some not. In a statement you can use already defined statements (I call them references) like source(s_local) or you can define them inline. The statements have options and the options have parameters. Some options have a type (like file("input.txt"), its type is file), but in some places you can omit them. For example you can write this:

Now you can see, you can't represent the file type as a dictionary. It should be a list, because its first item is just a string, there is no key for it. You must use different separator characters in different levels of the configuration tree. You can omit the colons in options, but in their parameters you can't. These are not very difficult problems but they are annoying until you get used to them. I built a recursive algorithm which tracks the level in the configuration and uses the appropriate separators, opening and enclosing characters.  You can find the source code here:



Syslog-ng uses words yes and no in some places, so you have to use them in YAML also. PyYAML will load these variables as booleans if you don't enclose them in quotation marks:



If you have any questions or thoughts please leave a comment!



2014. május 20., kedd

Collecting use cases

In my first post I wrote about myself and my attendance in GSoC 2014. I've already taken a look at Salt and wrote a proof of concept code. You can find it here:


Recently I met with my mentor and got my first task: collect use cases.  The configuration management is a huge area and there is not just one software on the market: Salt, Chef, Puppet, Ansible (these are the most popular ones).

You can find below the summed up use cases that we managed to make up:

  1. A lot of computers send their logs to a central log server,
  2. syslog-ng listens on more than one interface and forwards the logs to a central log server,
  3. you want to do some application layer filtering on log messages,
  4. you may want to store application specific configuration files under a conf.d directory,
  5. you might have template configuration files which can be used in more than one place (e.g. data centers),
  6. grids: you got N new computers then you want them to apply the configuration of the "old" machines.
In the case of Salt, the requirements of a general modul are:
  1. It should be some sort of high level stuff,
  2. you may say: "I want a new destination, which is ...",
  3. the users should have the opportunity to define the desired state ("I want a new destination to be created...")
  4. it'd be nice to generate syslog-ng configuration from YAML files,
  5. you might say: "Here is a file, take this as your config"
  6. the infrastructure management is very significant. The syslog-ng configuration must be generatable (by using meta data).
I have some ideas about a Jinja templated solution, but I need more information about Salt to implement them. If you have any suggestions, feel free to share it with me!

2014. május 19., hétfő

About me

My name is Tibi, I am a 23 year old student living in Hungary. I study Computer Science at BUTE, currently working on my MSc degree. 

I live in Budapest but came here from a little village so I brought along the love of nature and animals. In my spare time I read books or listen to music. I lead a little group of volunteer students (~60 people), who aren't content with our education and want more knowledge about IT. We operate the network of our dormitory, which consists of more than 1000 Gigabit endpoints.  Our server park provides services to the whole faculty and moreover we have teams working on IT security, mobile application- and game development.

I like open source software, so I applied to Google Summer of Code 2014. After a few weeks I was informed that the syslog-ng project accepted my proposal, so I'll work on it this summer.

I created this blog to inform people about the progress of my GSoC 2014 work. My task is not so exact as the other ones, but I will try to explain: it's about configuration management. I'd like to make easier the administration of syslog-ng in cloud environments. You can find my proposal here: 


I'm planning to write posts every week about my progress. If you have any questions, feel free to write comments :)