locked
Deploy Sharepoint Team site to production RRS feed

  • Question

  • All Guru's

    We have created a teamsite & we have some templates for document library & couple of lists, a calendar in it.

    What will be the best practice to move this to production. One think that we have to take care is that this should have a capability of upgrade without changing old stuff already in there especially the list columns.

    I was thinking of creating a wsp with a feature of this & deploy it. but I don't kow how to do it so can someone please help me out with some code sample or any blog on how to do this.


    Happy Sharepointing... Regards SPTECH07
    Wednesday, January 25, 2012 7:40 PM

Answers

  • That will help in deploying your custom solution. Any custom list templates, column changes will not affect existing columns if these do not affect the column type and the size of the column. You could add feature receivers to handle any changes that need to be made to existing lists etc.

    I also recently posted to the Technet Gallery a article on an approach to deploying sites and code from to mulitple different environments (QA, Staging and Production etc) that you may find helpful - Multiple Environment Deployment using PowerShell .


    Simon Rennocks | SharePoint 2010 MCITP & MCPD | Microsoft Community Contributor 2011 | Blog | LinkedIn
    Wednesday, January 25, 2012 8:03 PM
  • If you are familiar with Visual Studio 2010, the package and creation of features into the WSP is taken care for you automatically.

    You need to create a blank SharePoint solution in VS and add list templates and any default list instances. These are automatically added to the initial default Feature, which itself is added to the solution package (WSP). Then all you need to do is right click on the project name and select either Deploy [you have to also specify the url of you development site in the project properties] or Package [to only build and package the WSP].

     

    This Microsoft site on Best Practices should help: Developing Applications for SharePoint 2010

    This Microsoft Video should help too: http://content2.catalog.video.msn.com/e2/ds/19f3837c-7078-4448-888d-6550a6531491.wmv


    Simon Rennocks | SharePoint 2010 MCITP & MCPD | Microsoft Community Contributor 2011 | Blog | LinkedIn
    • Marked as answer by Shimin Huang Wednesday, February 1, 2012 2:21 AM
    Wednesday, January 25, 2012 8:22 PM
  • That way will work too. When you import the WSP visual studio will automatically create all the project files I previously mentioned. I was coming from the other direction - creating everything in visual studio first and then deploying to SharePoint.

    If you do not need to make any changes to the WSP exported from your Dev SharePoint Site (your step 3), you could directly import the solution into Production (though I would first test this in either a QA environment or at least a new separate Site Collection in Dev). Follow Er. Vinay Kumar link for the power shell commands to import and activate the solution file. Use my script as a base to deploy to multiple environments in a repeatable manner.


    Simon Rennocks | SharePoint 2010 MCITP & MCPD | Microsoft Community Contributor 2011 | Blog | LinkedIn
    • Marked as answer by Shimin Huang Wednesday, February 1, 2012 2:21 AM
    Wednesday, January 25, 2012 9:34 PM

All replies

  • That will help in deploying your custom solution. Any custom list templates, column changes will not affect existing columns if these do not affect the column type and the size of the column. You could add feature receivers to handle any changes that need to be made to existing lists etc.

    I also recently posted to the Technet Gallery a article on an approach to deploying sites and code from to mulitple different environments (QA, Staging and Production etc) that you may find helpful - Multiple Environment Deployment using PowerShell .


    Simon Rennocks | SharePoint 2010 MCITP & MCPD | Microsoft Community Contributor 2011 | Blog | LinkedIn
    Wednesday, January 25, 2012 8:03 PM
  • Thanks you for your quick responses, I definitely understand how to deploy WSPs to different environment. My question is how will I build that package which will contain all these features that I have to package in this wsp.

    My question is how can I package the site as per best practice so later upgrades are not a problem.


    Happy Sharepointing... Regards SPTECH07
    Wednesday, January 25, 2012 8:10 PM
  • If you are familiar with Visual Studio 2010, the package and creation of features into the WSP is taken care for you automatically.

    You need to create a blank SharePoint solution in VS and add list templates and any default list instances. These are automatically added to the initial default Feature, which itself is added to the solution package (WSP). Then all you need to do is right click on the project name and select either Deploy [you have to also specify the url of you development site in the project properties] or Package [to only build and package the WSP].

     

    This Microsoft site on Best Practices should help: Developing Applications for SharePoint 2010

    This Microsoft Video should help too: http://content2.catalog.video.msn.com/e2/ds/19f3837c-7078-4448-888d-6550a6531491.wmv


    Simon Rennocks | SharePoint 2010 MCITP & MCPD | Microsoft Community Contributor 2011 | Blog | LinkedIn
    • Marked as answer by Shimin Huang Wednesday, February 1, 2012 2:21 AM
    Wednesday, January 25, 2012 8:22 PM
  • Thanks Simon, I will try these steps.. had something similar on my mind but was not sure that i was taking the rigth route.. I usally did a backup then restore. But in this case had to do packaging of the site as a feature.

    Please confirm my understanding.

    Step1) Create my site in sharepoint 2010 Dev environment

    Step2) Save it as a template & then that will save a wsp in solution gallery.

    Step3) Download the wsp to the local.

    Step4) Import the wsp to Visual studio 2010

    Step5) Here where I co blank how can I convert this to a wsp that can be deplyed as a feature as the one that I get return me a template that can be reused.

    Can you please explain me what should be my next steps so I can get this as a webapp feature & then whn I activate the feature my site should get created in the Production box.

    Please I am open to options if I can opt for anything else you think would be better. I am taking this route as if I have any change in list columns or anything I will just upgrade the solution & that will get implemented.

    Pls put some light on this

    Thanks a ton...


    Happy Sharepointing... Regards SPTECH07
    Wednesday, January 25, 2012 9:15 PM
  • That way will work too. When you import the WSP visual studio will automatically create all the project files I previously mentioned. I was coming from the other direction - creating everything in visual studio first and then deploying to SharePoint.

    If you do not need to make any changes to the WSP exported from your Dev SharePoint Site (your step 3), you could directly import the solution into Production (though I would first test this in either a QA environment or at least a new separate Site Collection in Dev). Follow Er. Vinay Kumar link for the power shell commands to import and activate the solution file. Use my script as a base to deploy to multiple environments in a repeatable manner.


    Simon Rennocks | SharePoint 2010 MCITP & MCPD | Microsoft Community Contributor 2011 | Blog | LinkedIn
    • Marked as answer by Shimin Huang Wednesday, February 1, 2012 2:21 AM
    Wednesday, January 25, 2012 9:34 PM