We have a several types of applications we deploy with glu (java applications, java web applications, python apps etc).
Currently, we have a deployment script per application type. This is causing a lot of code duplication, the scripts have some common code (sending events, logging stuff etc).
I'm in the midst of a consolidation effort, aimed at eliminating all the scripts and collapsing them into a single script. Currently, I have created a private class for each application type, but since I couldn't find any way to initialize a global variable with the proper strategy to use, I have to go through a function call each time I need to obtain the correct strategy (the strategy is selected based on some parameter in initParameters)