Showing posts with label IIS 7. Show all posts
Showing posts with label IIS 7. Show all posts

Tuesday, August 21, 2012

Deploy your Website Using IIS 7 - Part II


In Part I of this article, I explained how you could export a package of your website from IIS 7.  If you haven’t already, please read that blog here before continuing with this blog. 

As I pointed out in that blog, it is an industry best practice that developers not have access to the production server.  To deploy a website from the Test environment to the Production environment, I would export a package of my website in the Test server.  I would then instruct the Release team (or their equivalent) to import this package into the IIS of the Production server.  All files in the package contents would be identical in both environments.

Of course, you would want to exclude the web config files and SSL Certificates and other environment-specific files from the package you export.

Here in this blog I explain how your Release team can import a package using the IIS Manager and the Web Deployment Tool in IIS 7.0 or above.

Import a Package


1.     Open the IIS Manager by clicking Start -> Run and typing INETMGR

2.     In IIS Manager, in the Connections pane, select the Server node

3.     In the right-hand Actions pane, under Deploy, click the Import Server or Site Package… link to launch the wizard



4.     Select the package that you exported from the Test server (per Part I of this article).





5.     Enter the Password used to Encrypt the Package





6.     In the Import Server or Site Package dialog, Select All the Contents of the Package




7.     Click Next


8.     Confirm the Server Package Import.  Click OK.




9.      The wizard will now complete the package installation process.  When it is complete, you will see a Summary page that provides a high-level overview of what items were installed from the package.  The Details tab will give a lot of details on exactly what was installed.  Click Finish.




That’s it.  You (or your Release team) have now deployed your website from your Test environment to your Production environment using IIS 7 Manager.




Wednesday, June 13, 2012

Deploy your Website Using IIS 7 - Part I

As an industry best practice, developers should not have access to the Production server.  Developers can use Dev servers as their playground and build any number of proofs-of-concept.  And developers can perform any number of tests on the Test servers.  But, while developers need to deploy websites from the Test environment to the Production environment, they need not be granted direct access to the Production servers.

There are a number of ways to deploy a website to the secure Production environment.  My prefered method is to export a package of my website from IIS 7 in the Test server.  I can then import this package into the IIS 7 of the Production server.  All files in the package contents would be identical in both environments. 

Of course, you would not want the web config files in one environment to be copied to the other.  The same is true for SSL Certificates and other environment-specific files.  Not to worry: you can exclude them from the package you export.

This blog will help you create a package of your website using the IIS Manager and the Web Deployment Tool in IIS 7.0 or above.

Export a Package


1. Always make a backup of your Production web server, in case a website deployment to Production fails, and a rollback becomes necessary.  Run the following command to backup the IIS server:
%windir%\system32\inetsrv\appcmd add backup “PreMsDeploy”

2. Open the IIS Manager by clicking Start -> Run and typing INETMGR

3. In IIS Manager, in the Connections pane, select the Server node

4. In the right-hand Actions pane, under Deploy, click the Export Server Package… link to launch the wizard




5. In the Export Server Package dialog, Select All the Contents of the Package



6. Click Next

7. In the Select Parameters dialog, select no parameters.  Click Next




8.  In the Save Package dialog, click the Browse button to choose a location to save your exported package.  The Package name must have a ZIP file extension.  For this example, “2012-07-09 IISBackup.zip” is used




9. Enter the Encryption Password



10.  The wizard will now complete the packaging process and save the package to disk.  When it is complete, a Summary page documents an overview of what actions were performed.  Click Finish.




That's it.  You have now created an exported package of your website using IIS 7 Manager.

In Part II, we will walk through the steps to import this package from the Test server into the Production server.