Software deployment requires a lot of moving parts, from source code repositories to automated testing to monitoring and much more. It is no longer the case that write build code and copy it into production. In this post I discuss five ways to improve your software release cycles.
1. Source Code RepositorySince the early 90's, there has been source code versioning tools available in some form. Whether its the original Concurrent Versions System (CVS) to todays popular Git, for more than two decades we have had some way to manage and version source code.
Adoption rates are increasing as more developers understand the benefit of using a source code repository. The real push is to require all software development to go through source control.
2. Proper Infrastructure EnvironmentsIf software goes from the developers machine to the production server, its guaranteed to have bugs. The famous statement, "It works on my machine", countered by "We are not shipping your machine".
Proper infrastructure starts with a proper production environment. Based off the production environment, is the staging environment. The staging system must replicate the production environment. This is often overlooked and treated as just a place to load the software to show to others.
Finally, the development environment should be a virtualized replica of the staging setup. It's given that it might not have all the stagings memory, processing and disk availability. In a virtualized setup, it could be setup as a scaled version of the staging setup.
3. Testing AutomationSoftware tested manually, is not testing software. Manually testing, even if it comes from a checklist, has the risk of inaccurate testing. The focus must to be to automate the software testing process. If software testing is driven by an automated process, the risks are significantly reduced.
The first step towards test automation is to establish an environment of testing first, second and last. Web applications can be tested using Webdrivers, desktop application have a range from TestComplete to the build your own kind. Regardless of the automation tool used, a strong process of automated testing is key to improving software release cycles.
4. Automating DeploymentDo you manually S/FTP the files to the staging environment? Do you have to manually transfer the application from your staging into production? You are doing it wrong.
Automating deployments means that whenever code is done from the developers end, tested by the automated testing application, it gets deployed into the staging enviroment. The deployment process should be as simple as selecting the build from the version control and then selecting the server environment and clicking the Deploy button.
5. MonitoringIf the above 4 steps are done, congratulations! You've already massively improved your software release cycle. There is just a final step, but this is the most critical step: Monitoring.
Monitoring allows you to know something is going awary, before it actually does. Monitoring let's you know the time between the developer uploading code into the source control and deploying it into the staging server. Monitoring however doesn't have to be a complicated process.
Here is a list of items that should be monitored and what to look out for:
- Source Code Repository - how often is code being pushed into the reposotitory. Is the code only pushed if the developer has built everything, or are they regularly creating branches?
- Server Monitoring - are the servers healthy? Do you see trends with the scalaing of the application? Do the servers slow down vs. their CPU/Memory? How's the network connectivity?
- Automated Testing - Is the testing script updated with the new releases? How often to the builds fail? What's the turn-around time between a failed test and a passing test (useful for measuring your developer's performance).
- Deployments - Are 100% of the deployments being deployed into the appropriate servers? How often is a staging and production build reverted?