I'm a Unix sysadmin-turned-programmer, and because this is near and dear to my heart at present, wanted to hear about some best- and worst-practices, in terms of writing software so that it is easy to deploy, upgrade, and maintain long-term. I'm not talking about the long-term maintenance of the code itself; rather, what guidelines do you use to keep your software from turning into an un-installable mess?
My current pet peeve is hard-coded configurations. I'm in the process of working with our development team at my full-time job to simplify the deployment of our applications, so that I can totally automate every step of the deployment process. A large chunk of the configuration for these apps is actually hard-coded, either at build time or in the codebase, which makes the process of actually setting the software up on a server very, very painful.
Fortunately, the team at my full-time gig is talented and wants to see this fixed as much as I do, so things are moving along smoothly.
As for a 'best practice', from a Unix perspective, I really like it when software is, or can be, self-contained. So, I should be able to install an application into a directory, and then be able to move that directory around without causing the app to go utterly haywire. This doesn't really take much more than a bit of startup path-detection, and it makes my life as a sysadmin so much nicer.
What are some ways that you simplify the deployment process (on both Windows and Unix) for server-type applications, and likewise, what are some things you've run into that have turned into a real nightmare when it came time to push the code out the door?
1-Manage your external depedancies - If you assume a file must be at x, make x configurable. Or use relative pathing as one example.
2-Do not hard code configuration.
3-Avoid binary dependancies (COM & DLL Hell Days from Windows)
4-Automate it or make it so simple a brain dead monkey could do it in their sleep. For example now all I have to do is unzip a file and my web app is deployed, I have one sql script that needs running and the DB is handled. It shouldn't take more then a few clicks...and no absolutley no configuration changes should need to be done this should all be scripted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With