New TeamCity plugin for user authentication via Atlassian Crowd

TeamCity ScreenRecently I have finished some work on the TeamCity Crowd Plugin.

This plugin enables TeamCity to use Crowd for user authentication. It could be used in places where Crowd is used to manage access to other products (for example Atlassian JIRA or Confluence). Thanks to this plugin the same user base will be able to access TeamCity.

The plugin is open Source, available on GitHub, binary build downloadable on BinTray.

TeamCity Crowd Plugin is using Atlassian Java REST Client to connect to Crowd. More detailed description of functionality on GitHub.

Please do get in touch with feedback/improvements.

Greg

Do Less to Do More – My Personal Kanban in the Clouds

Kanban columnAs you might already know I did a small application called My Personal Kanban, that serves as offline Kanban board. It’s HTML application which stores your Personal Kanban on your device. It free to use and Open Source.

I just released a new feature and service for My Personal Kanban that allows you to Upload and Download your Personal Kanban Boards to Cloud.

The service and functionality is in Beta phase but it would be great if you could give it a try and provide me with some feedback.

Heres a video of how the Cloud features work.

Here is the link to the previous post with Themes.

If you want to help me and contribute a Theme or some code, please do get in touch.

Greg

Horizontal Scaling of Atlassian Crowd

Context

Atlassian Crowd is an identity management server for Web Applications. It integrates very well with other Atlassian tools like JIRA, Confluence, Stash, Fisheye, Crucible, etc. We also used it with some custom plugins as Authentication and Authorization mechanism for our CI Servers (TeamCity), SonarQubue (via OpenID) and Source Code Repositories (SVN, Atlassian Stash).

Crowd was connected to Active Directory with LDAP connector and delegating Authentication to it. The picture bellow represents out setup.

Crowd Setup

We had about 15000 users and 1500 groups across 3 directories. Each directory delegating authentication to Active Directory.

Performance issues

After a short while we started to get user complaining that they were unable to log in to JIRA or checkout code from Subversion, etc. Turned out that Crowd was slowing down. Profiling the system Crowd was running on showed us that there was plenty of CPU and Memory left for it.

The problem turned out to be Active Directory. Most specifically the slow response time for authentication requests into Active Directory at times of substantial load.

Plan and decision

We’ve decided that it would be nice to have a number of Crowd instances, serving different Applications.

Implementation

We’ve created Master -> Slave setup. All the users and groups’ management would happen in Master Crowd and propagate to Slave Crowd. We picked applications and grouped them by authentication load and set them up on appropriate Crowd Servers.

Crowd configuration got duplicated and catalogs imported so the Slave Crowd was still using Active Directory for authentication. Then we tackled the problem of keeping Crowd Master and Slave in Sync (users and groups).

Keeping Slave up to date

Unable to find a good out of the box solution we developed a Custom Crowd plugin and a bunch of web services.

Plugin functionality was rather simple: listen to any User or Groups events in Crowd (add/update/remove) and perform a simple HTTP get request with change details to preconfigured URL.

We’ve created two types of web services:

  1. The Web Services for the Crowd Plugin to call when the change happened. It was asynchronously calling to next Web Service that performed the changes in Slave Crowd.
  2. The Web Service performing changes in Slave Crowd.

The picture below represents the solution.

Crowd Simple Setup

Multiple Slaves

We’ve ended up having multiple Crowd Slave instances. One of the instances had to be older and different version.  Separating the Web Services gave us possibility for using different versions of Crowd Java Client Libraries.

We have also used this setup to keep our UAT environment with up to date data from Master Crowd.

The Web Services are stateless and have no database.

Crowd Full setup

Full Crowd synchronization

As additional functionality we implemented full synchronization triggered from WS 1. WS 1 takes list of all the users and groups for each Directory from Master Crowd. Once collected it will call each WS 2 with full update.

This functionality makes it very easy to bring new UAT/DEV Crowd environments and populate it with Production data. It also makes it possible to Sync entire directory if one of the Web Services goes down.

Summary

The solution described above gave us horizontal scalability and possibility of working with different Crowd Client libraries and Crowd Versions. It also makes it easy to upgrade Crowd Instances.

New features in My Personal Kanban, Kanban Themes and new Card details dialog

I did spent some time adding new feature requested by my Wife. Links, in card details field, are now supported as real HTTP links, which could be opened. I did remodel slightly the Kanban Card dialog to support that.

The other new feature is the possibility of changing look of Kanban.  The feature comes with easy way of adding own styles.

You can get a copy of the software here: http://greggigon.github.io/my-personal-kanban/

The video bellow is a quick overview of the new features.

How to update My Personal Kanban with your own styles

  1. You need to create a css file with styles and copy it into: my-personal-kanban-folder/styles/themes/ folder.  Name doesn’t matter, however you will need to use this name in last step. The default-bright.css and default-dark.css can be used as a starting point for your own styles.
  2. Prepare image capture for the new style and place it in my-personal-kanban-folder/img/themes/ folder. It should be a jpg no bigger than 150px in width with the same name as the css file (you can see that there are default-bright.jpg and default-dark.jpg in that folder already).
  3. Last step is to open the themes.js file from my-personal-kanban-folder/scripts/ folder (it will have a funny name like 5ebce75f.themes.js ) and add entry for your new theme. Name is the property that will be displayed in the Drop down. css is the property that will be used to find the css and jpg file prepared in steps 1 and 2.

If you want me to make the style a permanent member of My Personal Kanban, just make a pull request on GitHub. https://github.com/greggigon/my-personal-kanban

Greg

My Personal Kanban, offline Kanban board for personal use

I’ve just released new version of My Personal Kanban. You can check it out at http://greggigon.github.io/my-personal-kanban/ .

My Personal Kanban is offline Kanban Board that runs within web browser.

My Personal Kanban sample board
My Personal Kanban sample board

Why Kanban for personal stuff?

Kanban is lightweight enough to bend to my personal lifestyle and to the way I do things outside work. I used a simple TODO list but I wasn’t happy with it.

Kanban gives me clear overview of things that need to be done, things I’m working on and stuff I finished. It also provides way of prioritizing the work (by color coding or bubbling the most important tasks to the top of the columns) and clear visual aid for reviewing tasks.

By limiting Work in Progress I can make sure I stay focused on task and finish it. By looking at the last column with things done I can give myself a tap on the back for achieving task completion.

Have a go and try it. Greg

Simple Artifactory plugin for total size of Artefacts in local repositories

I’ve done a little plugin I hope might be useful for others who would like to know what is the total size of artefacts stored by Artifactory in local repository.

The functionality is quite simple:

  1. You can obtain a size of a repository by sending a POST request to url: /artifactory/api/plugins/execute/getRepositorySize?params=repoName=repository-name
  2. You can obtain a report in a form of a JSON Array for all local repositories by sending a POST request to url: /artifactory/api/plugins/execute/getAllRepositorySizes

Plugin code and a sample JSON response for all repository sizes below.

Just want to add that JFrog did a brilliant work with their very simple and elegant Artifactory API.

To install plugin just copy the RepositorySize.groovy file to ARTIFACTORY_HOME/etc/plugins folder.

 

My Personal Kanban, new tiny application just released

I’ve posted about Kanban before (Free Kanban Board , Kanban), however this time I’ve created a little Kanban Board application that I started to use as my personal, sophisticated TODO list.

My Personal Kanban Screen
Example of a Board

My Personal Kanban is Free and Open Source for anyone to use.

More description of it’s functionality can be found here: http://greggigon.github.io/my-personal-kanban/ and the source code in here: https://github.com/greggigon/my-personal-kanban

Groovy Map to Json String converter

I use Groovy a lot. It’s simple and easy to use, runs on JVM and saves me from Java verbosity. I also like the fact that it’s dynamic.

I use it with a simple Servlet to return data to JavaScript AJAX requests. I like to keep the server side very simple, so I don’t create a lot of POJOs and I’m using HashMaps instead. Groovy has few convenient methods that makes it easy to work with Maps.

I do convert the maps into JSON when returning results to a browser. I don’t use anything fancy, just a couple lines of Groovy code to do that.

With this code there is quite a bit of assumptions though:

  • it will only work for Map
  • it assumes Strings are used as Map Keys
  • it will convert Maps, Lists and Objects
  • when it meets Object it will call .toString() on it to get it’s value
  • it will try to format it with tabs and new lines a bit, so it’s more pleasant for the eye and human readable

Hope it would be useful for you. Greg

Free Kanban board on Mac with no additional software

I’m a big fan of Kanban board. I prefer it over TODO list for all my professional and personal work.  It’s clear to understand, doesn’t require extensive management process and most important offers great visibility of work.

I’m not going to focus on Kanban itself. If you want to read more about it I would refer you to few external links for more info:

Example of a simple Kanban board
Example of a simple Kanban board

What I would like to focus on is how to do a cheap Electronic Board on Apple Mac without any additional software installed.

What you need?

If you got Mac you don’t really need anything more. I’m running OS X 10.8.3.

To make the Kanban board I used application shipped with OS X called Stickies and a custom made desktop backgrounds.

How to do it?

First of all, I’ve created a new Desktop using Mission Control and setup Desktop Background to my Custom “Kanban Board like” wallpaper.

Adding new desktop in the Mission Control
Adding new desktop in the Mission Control

I’ve prepared two backgrounds, dark and bright, which you are more than welcome to use for free.

Kanban Board - Desktop background - Dark
Kanban Board – Desktop background – Dark
Kanban Board - Desktop background - Light
Kanban Board – Desktop background – Light

My empty board is ready. All I need to do now is to add some Stickies onto it.

Background with Stickies
Background with Stickies

Voila. You can modify color of a sticky and make it transparent. I’m using colors to distinguish between different types of tasks. Stickies on the top are the one with top priority.

Once your Done column is full you can archive your Stickie by saving it and removing from the board.

Simple as that I hope you’ll find it helpful and easy to use. Greg

Inbox Zero – 3 years of happy email

Today is roughly 3 years since I’ve decided to sort out my email. Both, my personal email and my work email. I’ve decided to go 100% Inbox Zero. No exceptions.

Inbox zero

Why?

I had a massive inbox full of stuff. I’m using Gmail for my personal mail and the Exchange and MS Outlook at work. Thanks to Google’s never ending storage I never removed a single mail from my inbox. It was the same at work. It started to bother me at some point for number of reasons.

  1. I took me a moment to find things I was looking for
  2. I was annoyed with the mess and the number of things in my inbox
  3. I couldn’t organise myself based on my email inbox. Couldn’t decide what to do next.

About the same time I started to think of my problem I stumbled upon the concept of Inbox Zero.

How I’ve done it?

First thing was to actually reduce the amount of received emails.
Unsubscribing from useless marketing stuff and newsletters I never read and was never interested in.

I’ve created Labels in GMail and filters in Outlook to put less important informative things (like interesting newsletters, Bank statements, some billing info) into folders. This information is there, separately from the other stuff and I can easily get to it by navigating to a folder.

Last step was to archive everything else. This left my Inbox totally empty.

Ongoing maintenance?

Quite simple.
When I received something I was not interested I either tried to unsubscribe or mark it for my spam filter.

All the filters took care of putting interesting but unimportant mails into folders.

Every email I received become immediately my TODO email. I either answered it immediately or as soon as I could. As soon as I took an action I could archive the email and forget about it.

Summary

I find few advantages of having no emails in inbox.
The fact that my inbox is empty when I navigate to it leaves me with the peace of mind. I know that all the necessary actions I should be taking, I’ve done and I don’t need to worry about it.

Email is no longer only a way of communicating, it’s also a way for organising myself. I do actually send myself an email as a reminder of things I need to do. After three years of doing Inbox Zero, I know I will make sure that I will get to it as soon as I can so the inbox could stay empty again.

Lastly, the fact that there is nothing in the inbox and the fact that my Email TODO list is clear makes me feel good, gives me a motivational sense of accomplishment. That alone is an incentive for the Inbox Zero.