Deployment woes
June 8th, 2007 — 7:56 am —I have to be honest – the upgrade to version 0.4.0 of slate last night did not go very smoothly. I ran into a number of odd issues and in the end, it two nearly two hours to iron everything out.
One thing that did go smoothly was the database migration. This has always been a scary point for me, because we use SQLite3 for development, and SQL Server for production. Thus, from time to time there are pieces of SQL code that don’t work quite the same in both databases. But this time, I planned ahead: I created a staging database in SQL Server, which was a copy of the production database, and ran the migrations. I had a number of failures that aborted rake and caused a big mess, so I had to repeat the process multiple times. I did all this last week, to help reduce the stress of deployment. And for this task, it worked: the migration went perfectly. Unfortunately, the migration was about the only thing that went smoothly.
Version 0.4.0 touched on a large number of features, one of these being Resources (now called Files), our name for user-uploaded files. In v0.4.0, the paths and actual filenames for all Files changed, which I handled via two rake tasks. However, the task for file renaming bombed when it saw one of those “Thumbs.db” files, so I had to run it again. But the logic for renaming wasn’t perfect, and ended up removing a critical piece of the filename for a number of files. I was able to resolve the issue, but I wanted to kick myself for the poor testing.
The next issue was SQL related, and it dealt with a LIKE condition. Apparently, SQL Server expects the pattern to be in single quotes, not double quotes. So, ... WHERE filename LIKE "%.png" ended up failing with the always helpful “Invalid syntax near LIKE” error.
The final big issue actually had to do with TEH. When I performed the svn switch, I forgot to run an update on the externals. As a result, the new helpers introduced in TEH v0.2 were not available, and that resulted in 500s. Of course, the two places where TEH are used have ”;edit” in the URL, so I initially thought that mod_proxy or something else related to Apache was throwing up when it saw the semi-colon in the URL. Thankfully, that was not the case, and a simple svn update on the TEH external and rake textile_editor_helper:install fixed the issue.
Perhaps I was a bit optimistic regarding depolyment this time, but I assumed that the migration piece was going to be the biggest headache. And truthfully, it would have been if I hadn’t tested it the week before. Really, the biggest issue is just that deployment involves a major platform jump: from OS X/SQLite3 to W2K/SQL Server.
Yes, deployment is definitely a pain, and it all basically falls on me. *Sigh* I really need a raise.
About slate
slate is a content management system (CMS) developed using Ruby on Rails focused on rapid production of traditional websites created by WVU Web Services. Read more about why we created slate and a longer list of features of slate. You can also check out a list of sites using slate. If you have questions or comments let us know but if it's a question about open sourcing slate have a look at this article first.Archives
Recent articles
- No Wonder Rails Is Default in Mac OS X Server...
- Good News: An Open Sourced slate Is Coming
- The WVU Open Source License
- Implementation idea: .do templates
- Keeping slate Humming - Part 1
- Campfire for Design & Keeping Your Tag Cloud Running
- Custom configuration settings made easy
- HOW-TO: Add a Gallery to Your Site
- JSONRequest.post Example
- Miscellaneous
Articles
The moment before deploying makes me so nervous for some reason. It’s far from life-or-death, but it’s about as close to life-or-death as you can get in the web development world.
That’s a good idea to test the migrations and DB stuff before hand. That’s probably the scariest part: the thought of losing real data. Technical issues are a pain, but DB issues are in a category all their own. Yuck.
And I’ll go ahead and put my vote in that Chris should get a raise :-)
Deployments definitely give me butterflies but one thing I’ve learned is that (most) users understand if there’s an issue or two. As long as you are working on resolving the issue then (most) people will be patient. It’s never going to be glitch-free process.
The worst deployment for me was: a) moving www.wvu.edu to a new server cluster set-up and b) rolling out the new home page in the new cluster on the same night. There wasn’t much DB stuff behind the scenes but it was still a long process. We had to worry about the hardware being able to handle the load of the site and then people being happy with the new design. Just your normal 35 hour day ;)
Add comment
You are adding a new comment