Deploying software releases is a mixture of planning, testing, late hours, and celebratory beers. This checklist is intended to be a guide to help improve how your team achieves this complicated and sometimes hairy task.
Part 1: Planning and Deployment Preparation
Collaboration Between Development and Operations
It is important that operations be in the loop when it comes to planning any software deployment. They need to know when the project starts, not at the last minute about your new deployment. Ensure that operations is aware of any infrastructure changes needed well in advance. If the operations team is your front-line defense for monitoring and troubleshooting your app, help them help you by collaborating on how best to monitor the app and discuss early warning signs of trouble to be alerted to. If you’re thinking of setting up DevOp team you should probably read this.
Build & Release Automation
Removing the human factor is important to duplicating software deployment success. How you deploy the code doesn’t have to be state of the art. Utilize a basic build server like Maven, Bamboo, or TFS to automate the process or even a simple script that copies the files across the network can be sometimes sufficient. The key here is to make it easily repeatable by anyone on the team and eliminate the possibility of skipping any manual steps.
Minimize the Amount of Change
When things break in IT, typically it is because something changed. When you introduce small changes in each software update it is easier to roll back those changes, or know exactly where to look for the source of the problem. As each release takes a certain amount of work in planning and testing, the key is finding the right balance of frequency and size of your releases that is optimal for your team to handle.
Create and Test SQL Change Scripts
Prior to your app deployment make sure you use tools like Red Gate SQL Compareto know what SQL schema and data changes have to be moved to production. to ensure there are no environmental differences that will cause potential headaches, I recommend never to forget to take a backup of production and run the test scripts on the backup copy before the final release. Production data differences or different database software versions can commonly cause hiccups. Also, have a plan to roll back to a previous state if the release has issues. Code is easy to roll back, but SQL requires some planning.
Know your KPIs
Every app should have some form of key performance indicators or metrics that can be used to know if everything is running smoothly. These will vary wildly from one app to another. They can be as simple as server CPU, page load times, or database performance metrics. The best metrics are more custom though. Knowing how many orders are happening per minute, or how many messages are being processed off a queue and how long it takes, or how long a certain piece of code takes to execute is a critical part of your app. Make your KPIs the heartbeat of your application and monitor them at all times.
Setup Synthetic Transactions Tests
Create a few tests that test things like your login page, key pages within your apps, APIs, etc. This will allow you to feel very confident that all systems are operational after the app deployment. I highly recommend Selenium, the leading open source framework for web automation.
Notify Your Users and Colleagues
Don’t forget to notify your users and others within your company about the upcoming changes. Make sure you have time to update documentation, train internal staff about new features, and coordinate with other departments in your company.
Part 2: After the Deployment
Monitor Server Utilization
Make sure servers are all online, in the load balancer, and still receiving traffic. Monitor server and app CPU, memory, network, and disk usage. Noutilization can be as bad as sudden high utilization.
Monitor Exception Rate
After a new release your software is likely to throw some new exceptions you have never seen. Utilize an error tracking program so you can immediately identify new errors introduced in the release and to ensure previously resolved errors haven’t been reintroduced. A comparison of your overall error rates before and after the deployment will give you good indication of the release health.
Check your KPIs
Keep an eye on your performance indicators that let you know if your application is running properly.
Watch your logs
After an app deployment make sure logging is still working and the volume of logging hasn’t changed dramatically. No logging at all can be as bad as sudden high logging rates. A centralized log management tool makes this easy to monitor. You might also want to check the logs of new features that were released to ensure they are behaving properly.
Monitor Page Load Times and HTTP Error Rates
Watch the overall page load times of your application and keep a closer eye on 2-3 requests that are mission critical to your app. Also watch out for the rate of 400 and 500 level HTTP requests to ensure they haven’t dramatically changed.
Monitor Database Performance
After your deployment make sure database CPU, IO, and overall traffic look normal. Nothing is scarier than a sudden drop in database traffic after a release… unless it’s a sudden spike in database traffic.
Monitor Key Database Queries
Setup monitors in your monitoring system to test key queries to ensure they are loading quickly and returning proper results. For example, if some important background processes work based on SQL queries, run similar queries to make sure it isn’t missing work to be done and is working properly.
Monitor Application Queues
Monitor how many messages are in your application queues to ensure everything is flowing properly and not getting backed up.
Cache Server Changes
Don’t forget about caching. Depending on how you use caching, you may need to clear your caches or make other configuration changes. Data type changes can commonly cause some weird serialization type issues in cache.
Have a celebratory beer!
Post Mortem Meeting
It can be very valuable to stop for a few minutes and discuss how the last release went and how things potentially can be improved. These kinds of conversations can help identify team weaknesses, allow people to vent, and take note of issues that can try to be prevented in future development cycles.
Deployment success over a long period of time depends on being able to automate and create processes that minimize issues for all stakeholders. Creating some automation or scripts around your build and release processes pay big dividends in the long run. Utilizing various monitoring tools or looking for new ones that can help monitor your server and application health from every angle. Tracking trends over time can help you show off the improvements you’ve made with each release in availability, performance, KPIs, and user experience.
About the Author
Matt Watson founded Stackify in 2012 and as CEO provides the vision and leadership for the direction of the company. Prior to founding Stackify, he was the founder and CTO of VinSolutions. VinSolutions’ innovative product offering led to rapid company growth and was even featured on the Inc. 500 (#447) in 2010. Matt is an entrepreneur at heart and excels at product and software development.
Matt studied Computer Information Systems at DeVry University. He started programming when he was in middle school to automate playing video games while he was at school. He hasn’t stopped programming since and loves anything technology related. Other hobbies include working too much, travel, movies, golf, cars, and of course his family. You can reach Matt at @Stackify, @mattwatson81, www.stackify.com, https://www.facebook.com/Stackify