Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Chat About It!  Deploying Dev and Production versions of DotNetNuke
Previous Previous
 
Next Next
New Post 7/2/2008 1:31 PM
User is offline lanceomagnifico
29 posts
10th Ranked


Deploying Dev and Production versions of DotNetNuke 

Hi,

I've been searching & frustrated for the better part of today - in doing what should be a fairly straightforward development process: Deploying my dev DNN site on my development box to a staging and a production server.

Here is what I am trying to achieve:

  1. Set up DNN 4.8.4 on my dev machine (W2003 server, SQL Server 2005 std, VS 2005)
  2. Set up DNN 4.8.4 on my staging server (W2003 server, SQL Server 2005 std)
  3. Set up DNN 4.8.4 on my production server (W2003 server, SQL Server 2005 std)

I feel that this is a fairly NORMAL development setup, at least for me and any software company that I've ever worked for.  The idea is that I develop on the (ahem) development machine, when a build is ready, deploy it to the staging server (which has an identical environment to the production server), put the build through testing and when it passes, deploy to the live server.  This is a NORMAL way to develop to me... development should not, except in emergencies, be done on the production environment.

First, kudos to whomever is responsible for the install application - it worked perfectly the four or five times I've used it on my dev box.  Logical and efficient.

Now you will notice that the 3 environments that I have are all quite similar, in a vain hope to eliminate as many 'environemental difference' problems as possible.

 

There doesn't seem to be any f0rmal instructions for how to accomplish deployment from dev to staging or production.  In the forum I find some posts that seem to think it's a bad idea to deploy.  That you should package up your individual enhancements into modules so that you can, instead of deploying, sort of 'upgrade' the staging and production installs with your custom modules.  Some posts recommend developing on the production server so that you don't have to deploy.

Now, in my hours of searching have I missed some documentation that outlines how to deploy?  Ideally is there some sort of wizard that you can use from the site or host admin?  I'm not holding my breath but the DNN framework is sometimes quite amazing with great features.  Maybe I've missed that one.

If DNN doesn't have it, why not?  I can see a need for users to be able to deploy individual portals, as well as the entire 'host'.

 

In any case, here is what I did to deploy to staging.  It's probably quite a bodge, and I'm sure that there is an easier way to do it....

  1. Set up development environment using a SOURCE install.
  2. Install SOURCE modules for modules that you are going to want to view the code of, or hack around a bit.
  3. Set up your portal.  Create pages.  Develop custom modules.  Alter existing modules to suit.  Build a skin.  etc
  4. Copy the contents of the 'website' directory (from the SOURCE DNN install) up to the production server, where you want it to eventually live.  I usually use FTP to do this, (and a fantastic little tool: BeyondCompare - it's a developer 'must have' Diff tool).
  5. On the staging server, set up a website in IIS as per the instructions in the official DNN install .pdf
  6. Use SQL Server Management Studio to do a backup of your dev DB.
  7. copy the DB dump (backup) to the staging server.
  8. Use SQL Server Management Studio to 'restore' the dev DB into your Staging DB.
  9. Manualy add a new portal alias by entering  new record in the PortalAlias table on the Staging DB.

And that's pretty much it. Except today I had the default portal come up and running fine, but the other portals didn't work, I kept getting the dreaded 'Under Construction' page when trying to browse to them. After mucho swearing I figured out that I could just go into IIS and add the alias' of the non-working portals to the 'host header' for the DNN website. I don't understand how DNN works it's magic, but I assume it's some sort of ISAPI binding mojo that intercepts incoming requests, and if there isn't a host-header match in IIS, looks into the DNN portal alias table and redirects.

Now that I have my dev and staging sites up and running, I don't have any problem modding files in dev and FTPing them up to the staging server. Any DB changes are a different thing: does anyone have a list of tables and even better, a script or module that allows updating the DNN from one DB to another? I'm thinking about cooking something up, but I'm sure to be missing stuff - and that will engender the dreaded DNN 'rot'!

summary

So, I just want to know the 'approved' deployment method to move code AND DB changes from one DNN install to another. Note point 3 above - I've hacked some of the standard code to get it to work the way that we need, most of the hacks would NOT lend themselves well to putting in modules, as they effect the core code.

Cheers, Lance

 
New Post 7/2/2008 2:18 PM
User is offline Thayer Tate
19 posts
10th Ranked


Re: Deploying Dev and Production versions of DotNetNuke 

Lance,

I think those of us that do larger sites for client installations and follow a standard development process all end up going through these learning curves.  To validate some of your experiences with my own.

  • I'm not aware of any tool that will selectively build a single portal from one installation to another existing installation
    • I have pondered this at various times as a end all module everyone would want but the biggest issue I see with that is 3rd party modules.  You couldn't write a single upgrade script for each DNN Revision because it wouldn't include the custom tables created by the modules you install
  • We do the same multi-server process that you describe for our environments as well
    • We build it like any custom application from one enviroment to the next which is:
      1. Take a snapshot of the files and push them up
        • This will include the post install files of any new modules so in effect we only install the files on the dev server and move them up from there for production safety
        • A negative of the multi-server approach in general is that many module vendors sell a per server/domain name license for their modules.  In many cases if you wish to do the multi-server build you need to purchase multiple licenses.
      2. Take a backup of the database and push it up to a new database
        • I'd recommended changing the login from one environment database to another just for safety sake
      3. Get the aliases for the site correct
        • Update the portal alias table to work with the new URL's that will be unique to that environment
        • Edit the host alias within IIS for that site to also resolve to that new web site
        • Personally I like to do this as a brand new site in my production environment so I can test it on the actual production environment before switching it "on".  My biggest reason for doing this is the one thing you can't predict going wrong from environment to environment with this build process is license messages coming up on modules if it turns out they are only a 1 server license etc.

This can be a bit daunting for the non-technical user as can any build process.  We have had a few clients with existing sites contact us just to help them with getting environment build processes down or upgrades completed.  I can confirm that you can do it and follow a regular process it just takes a little work.  It looks like to me you've gotten over much of the painful learning curve.

Good Luck,

 


Thayer Tate
VP, Project Services
SolTech, Inc.
thayer.tate@soltech.net
404-601-6000 x284

 
New Post 7/2/2008 2:29 PM
User is offline Michael Washington
2771 posts
ADefWebserver.com
5th Ranked










Re: Deploying Dev and Production versions of DotNetNuke 

The way that works for me is to:

  • Have the 3 environments
  • Create the module in dev and export it as a module package
  • Copy the entire DNN site in production to the Staging environment and then upload the module to it and test it
  • Install the module in production

At my job we attach the actual Module to the "Change Request" in Team Foundation Server. Nothing gets lost. Rolling chages back is easy. The server admins install the exact smae module in Staging as they do in production so there are no surprises. I'm a careful programmer but 10% of my change requests get bounced and never "foul up production".



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
New Post 7/2/2008 6:57 PM
User is offline Thayer Tate
19 posts
10th Ranked


Re: Deploying Dev and Production versions of DotNetNuke 

Michael,

I like that process for just pushing up raw modules but what do you do if you actually have records that go with it.  To be more precise, what if for example you do the following in dev:

1) Purchase and install a module like XMOD

2) You create actual data records

  • Create XMOD f0rms, Template and fields
  • Fill out the actual data records so you can have all of your f0rm based content pre-loaded (e.g. maybe for a real estate site you are developing you preload all of the home listing in it

3) You want to build this to production content modifications, custom modules, 3rd party modules and the 3rd party module data tables

This is in practice a more common scenario we run into so it isn't a matter of just pushing up the newly developed modules.  I was curious if the method you describe would also be effective for that scenario as well or if you employ other processes for the content/record data pushes from dev to production?

 


Thayer Tate
VP, Project Services
SolTech, Inc.
thayer.tate@soltech.net
404-601-6000 x284

 
New Post 7/2/2008 7:47 PM
User is offline Paul Sellers
270 posts
9th Ranked


Re: Deploying Dev and Production versions of DotNetNuke 

Well for any small potatoes guys/girls out there that can't afford 3 servers and may be developing sites for small businesses,  you can accomplish most of this with  2 machines, one for development and one for production that sort of also doubles as a staging enviroment.  I develop sites and modules on my XP Pro machine with VS 2005/2008 and SQL Express.  I  backup the db and zip up the entire installation and move the files to my server, a Win 2003 with SLQ Express. I unzip into a new directory on the server, use Studio Management Express to restore the db, adjust the portal alias, configure IIS, and the site goes live.  Now I create a new empty db in Studio Management Express, name it testsite, and restore this database with the same backup by choosing the overwrite option.  I then make a new directory for the test site and unzip my files into this directory also.  I them make the appropriate changes to the portal alias table, set up IIS for the test site and the site comes up.  So now I have 3 installs of the same site, one on my dev machine and 2 on my server. 

I know this is not optimal but so far it has proved a productive way to work. I can test all changes made in development to my test site and when satisified that this site is working properly, I can then stop the live site, make adjustments to my test sites portal alias table, adjust my IIS host header records, and now my test site is my production site and my previous production site is now my test site.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Chat About It!  Deploying Dev and Production versions of DotNetNuke
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Cestus Websites
DotNetNuke websites en services in Nederland. Cestus Websites levert websites, projectmanagent, skins, modules, training en gespecialiseerde hosting op basis van het CMS DotNetNuke.
www.dotnetnuke-websites.nl
FREE Skins, Modules & Control Panel!
Choose how much you want to pay on our Skins, Modules, Containers and Control Panel - Starting from FREE!
www.dnngroup.com
Disgrafic
Diseño y creación de portales web dinámicos :: Desarrollo de módulos personalizados :: Soluciones a medida :: Imagen Corporativa :: Tu proveedor DNN en España
www.disgrafic.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP