Any tips on how to deploy / sync Sitefinity from development

Posted by Community Admin on 04-Aug-2018 23:04

Any tips on how to deploy / sync Sitefinity from development to production?

All Replies

Posted by Community Admin on 16-Mar-2012 00:00

I'm coming along nicely with Sitefinity. I feel that I 'get it' much more than I did a year ago. Yet, since I am the lone programmer who understands Sitefinity's inner workings at my workplace, I don't have anyone to discuss deployment / sync issues/solutions with.

Since Sitefinity uses a combo of database schema changes plus XML based configuration files that are modified by the Administration menu of the web back end, it can be a challenge keeping those in sync between my workstation and server. If I use Visual Studio's "Publish Web" button to deploy my project to the server, my local configuration files can blow away the configuration files that may have been changed by users on the server.

Are there any tips, tricks, recommended practices on how to deploy changes from my development machine to the server without breaking XML config files?

Additionally, how do you sync your live database with your development database? Whereas the development files are usually more up to date, the opposite is true for the database. Users are updating the database all the time.

Thanks and enjoy the weekend!
Dan

Posted by Community Admin on 21-Mar-2012 00:00

Hi Dan,

If you want to sync your development machine and its code to the production environment, you have few options which I will outline bellow.

 - for any changes to the exact content of the website and other database changes, you can use the built - in data compare ( or third party ) tool, to deploy your changes to the live database. On a side note, I would suggest putting a staging environment, which will help you to test your code prior to pushing it to the production environment.

- you can push any other custom code, controls and configurations by using some kind of file comparing tool or if you decide to run your site under source control, you should ensure that the configurations are excluded from the source control.

We also offer a Site - Sync module:

www.sitefinity.com/.../staging-synchronization

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Mar-2012 00:00

Hi,

The documentation describes settings that I can't find in Sitefinity 5.0. 
Has this option been removed between 4.X and 5 or is it somewhere else ?

Posted by Community Admin on 26-Mar-2012 00:00

Hello Yann,

The Site Sync module is available as an addon to the profession edition:

www.sitefinity.com/purchase.aspx

it is also available in the Enterprise edition. The module was introduced in Sitefinity 4.4:

www.sitefinity.com/.../sitefinity-4-4.aspx

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 27-Mar-2012 00:00

Hi Victor,

I missed that difference between the Professional and Enterprise edition.

Can it be downloaded as part of the Professional trial ?

Thanks.

Posted by Community Admin on 28-Mar-2012 00:00

Hello Yann,

The two editions contain differences ( limitations / additional modules ) between the two editions of Sitefinity. You can have a look at the following page, for more information on the matter:

www.sitefinity.com/purchase.aspx

The Enterprise edition can be downloaded as a separate trial, as it is not part of the Professional edition. For more information you can contact our sales team.

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 02-Apr-2012 00:00

Is it possible to sync data through the API ?
I keep in mind the scenario where we want to automate pushing data changes from one environment to another.

Posted by Community Admin on 02-Apr-2012 00:00

Not sure if this is something you are looking for but I work for a client that has 14 different instances of Sitefinity and I didn't want to have to reproduce every control/module/image/stylesheet/javascript for each of those Sitefinity sites.  The client wanted to keep the data separate for each site otherwise I would have only done one.

Anyways I found it is possible to "fool" Sitefinity using Virtual Directories in IIS to look at the files I mentioned above in a separate project instead of the SitefinityWebApp project that is created by the Sitefinity project manager.  This allows all of my sitefinity sites to use the same controls/modules/images/stylesheest/javascripts with only one codebase.

If anyone is interested I would gladly post an example of how I setup the IIS virtual directories and my code base for others to use this method.

Posted by Community Admin on 04-Apr-2012 00:00

Hi Brett,

If you feel comfortable, you can share your experience with the community - it will be indeed helpful to us all!

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 26-Apr-2012 00:00

I apologize that it took so long to reply but I've been pretty busy the last couple of weeks. So I am going to attempt to explain how I am using the same code base for multiple instances of sitefinity through the use of IIS Virtual Directories and one .DLL.  This may not be the "best" way to do this, but my client had a requirement where they wanted one code base for all websites but a separate instance of Sitefinity for each website.  The only changes I have made to the Sitefinity project are configuration changes and added a .dll to the bin file.

I've attached below an image of how I setup my code base solution.  The SampleInstalledComponent project will contain all items that I believe have to be installed or be a .dll in the bin file of the Sitefinity website.  Here is an explanation of what each folder contails

1) Custom Controls - this folder is being used for all controls that are simple but require template designers.
2) Handlers - this folder isn't necessary but it is used for any custom handlers (.ashx) that I need for my Sitefinity sites.
3) Libraries - this folder contains any class files that contain any shared methods that I want to use within my sitefinity sites.
4) Modules - this folder contains any code that has to do with a module.

The Sample Site project is for items that do not need to be installed.
1) UserControls - all very basic System.Web.UI.UserControls go in here.
2) WebsiteTemplates - this folder contains all of my "themes" css, javascript, and images that I use throughout my sites.

Now where the magic happens, the Virtual Directories, also attached to this post.  Most of the folders created in my shared solution are also added as virtual directories to the Sitefinity site in IIS.  I've been able to do this in II6 and IIS7.

1) Create a virtual directory called WebsiteTemplates under App_Data/Sitefinity that points to the WebsiteTemplates folder in the shared solution.  This is the directory that Sitefinity is looking for when loading up static content such as Javascript/CSS/Images from your web server.  These items are not added as content in Sitefinity.

2) Create a virtual directory called App_Master under the root that points to the App_Master folder in the shared solution.  My App_Master is located under my WebsiteTemplates folder in my file system.  This folder is where Sitefinity is looking for your custom master pages.

3) Create a virtual directory called CustomControls under the root that points to the CustomControls folder in the Installed Component project of the shared solution.   This folder is one of the folders that you will point Sitefinity to when adding tools to your toolbox.

4) Create a virtual directory called Handlers under the root that points to the Handlers folder in the Installed Component project of the shared solution.  

5) Create a virtual directory called Modules under the root that points to the Modules folder in the Installed Component project of the shared solution.   This is where my self installing modules are located.  All of my modules so far are very similar to the Testimonials Intra-Site module that has a tutorial on how to do on this site.  These modules install when the application is first started and the module has been added to the configuration of sitefinity.

6) Create a virtual directory called UserControls under the root that points to the UserControls folder in the project of the shared solution.   This folder is one of the folders that you will point Sitefinity to when adding tools to your toolbox.

So that is my brief summary of what I did to get one code base shared among multiple sitefinity sites.  Currently this code base is being used for 12 different sites.  To deploy changes all I have to do is move code from my development shared code base to my production shared code base to affect all sites where previously I had to copy the change to each instance of sitefinity.  Setup of new sites takes me about 2 hours and all of my controls and modules are available in the new site.


Posted by Community Admin on 28-Apr-2012 00:00

Brilliant!
We have a similar architecture (with 11 separate instances) and have had to struggle with user control updating.
Now migrating to Version 5.0 and will follow your configuration.
A big buck saver.
Thanks a million (almost).

Posted by Community Admin on 20-Jan-2013 00:00

We're planning to deploy to a Windows Azure Reserved environment.

Any tips about duplicating the suggested structure on Azure?

Thanks.

Posted by Community Admin on 24-Jan-2013 00:00

Hello,

In Azure the configuration files by default saved in App_Data/Sitefinity/Configuration are saved in the database as when deploying sitefinity to Azure this line in web.config (commented out by default) is uncommented.

<telerik>
    <sitefinity>
      <environment platform="WindowsAzure"/>
      <sitefinityConfig storageMode="Database" />
    </sitefinity>
  </telerik>
Sitefinity runs on Azure are cloud service on one or several server instances (as on one server or multiple servers forming a webfarm deployment to increase performance)

Regards,
Stanislav Velikov
the Telerik team

This thread is closed