Code promotion and deployment

Topics: Administration, General
May 23, 2011 at 2:59 PM

We are working with Orchard 1.1 and we're attempting to find the best way to move our code from environment to environment.  We would ideally like to use TeamCity to do our deploys as we already have that building our source.  We are running into some issues, and we're not entirely sure if it's something to do with Orchard or not, but the Orchard solution is the only project that is currently failing the deploy. 

That being said, while we are currently working on resolving the TeamCity issues, what are some recommendations from others who have a deploy/promote system in place for their orchard projects? Your feedback is appreciated.


May 27, 2011 at 2:43 PM

I got it to work using TeamCity continuous integration server and msdeploy.  I thought I'd post in case it might help someone else.  After viewing the event log, I found that our deploy user was failing authentication. It was saying the user was unauthorized, even though the user had full access to the folder.  After some digging, I found this post on SO:

Using that method, I was able to give our deploy user permissions and things started publishing correctly. Our only hurdle then was Orchard's use of the settings.txt file for its database connection, and thus we had to write a post build command that would copy the correct version of the settings file for whatever environment we were deploying to.  So, our debug configuration copies our debugsettings.txt and renames it to settings.txt.  The same goes for the review configuration...

May 27, 2011 at 3:33 PM

Our latest technical issue is to decide how to actually handle the different database environments...we are promoting the same code base between our dev and review environments, but how we should handle the database promotes is a question.  Do we use the import/export module? Do we promote the whole database every time we go to a new environment (or run a data compare)?  What strategy have others utilized?

May 27, 2011 at 5:13 PM

Orchard has a Data Migrations system built in, if you implement everything as modules the migrations will can get run every time you update.