As promised I’m back with the summary of cool stuff that I’ve done with my team in Build & Release domain to help us deal with day to day problems in efficient & effective way. As I said this month was about creating tools/utilities that sounds very simple but overall their impact in productivity & agility of build release teams and tech verticals was awesome :).
Automated deployment of Artifacts : If you have ever worked with a set of maven based projects that are interdependent on each other, one of the major problem that you will face in such a setup is to have the latest dependencies in your local system. Here I’m assuming two things you would be using a Maven Repo to host the artifacts & the dependencies would be SNAPSHOT dependencies if their is active development going on dependencies as well. Now the manual way of making sure that maven repo will always have the latest SNAPSHOT version is that every-time somebody does change in the code-base he/she manually deploy that artifact to maven repo. What we have done is that for each & every project we have created a Jenkins job that check if code is checked in for a specific component & if so that component’s SNAPSHOT version get’s deployed to maven repo. The impact of these utilities jobs was huge as now all the developers doesn’t have to focus on deploying their code to maven repo & also keeping track of who last committed the code was also not needed.
Log Parser Utility : We have done further improvement in our event based log analyzer utility. Now we also have a simple log parser utility through which we can parse the logs of a specific component & segregate the logs as per ERROR/WARN/INFO. Most importantly it is integrated with jenkins so you can go to jenkins select a component whose log needs to be analyzed, once analysis is finished the logs are segregated as per our configuration(in our case it is ERROR/WARN/INFO) after that in the left bar these segregations are shown with all the various instances of these categories and user can click on those links to go exactly at the location where that information is present in logs
Auto Code Merge : As I already told we have a team of around 100+ developers & a sprint cycle of 10 days and two sprints overlap each other for 5 days i.e first 5 days for development after tat code freeze is enforced and next 5 days are for bug fixing which means that at a particular point of time there are 3 parallel branches on which work is under progress one branch which is currently deployed in production second branch on which testing is happening and third branch on which active development is happening. You can easily imagine that merging these branches is a task in itself. What we have done is to create an automated code merge utility that tries to merge branches in a per-defined sequence if automatic merge is successful the merge proceeds for next set of branches otherwise a mail is sent to respective developers whose files are in conflict mode
Hope you will get motivated by these set of utilities & come up with new suggestions or point of improvements
A major issue that people face in managing a big system is log files management. In our setup we were primarily facing two issues
1.) We had around 10-15 different applications, it was a messy things to track the logs as you have to login to those systems to view the logs
2.) Other issue was cleaning up of log files
Resolution for the second issue was quiet easy, one of the solution can be to write a script that will delete the logs files older then say n days and then add this script in crontab to execute with some frequency say daily. This approach had an issue, with the addition of a new system you have to do this setup every-time. As a one time solution for this problem we have created a job in our CI system(jenkins) which can be configured to run after some frequency & then reads the details of machine, location of log files which needs to be cleaned. The second approach gave us the flexibility to manage cleaning of the log files from a single place.
For first issue obviously we have to look out for some tool & the first google hit 🙂 suggested log.io and it seemed meeting all our requirements. So the one line definition goes like this Log IO is a Real time log monitoring tool, through this tool you can monitor multiple log files in a single browser window.
I referred the link given below to configure logio
I’m not going into the details of setting up of log.io or how it works, but if you have any confusion you can leave a comment
For your reference I’m attaching an image of log.io instance we are using
So happy logs tracking 🙂