Upgrades Questions on upgrading to version 7.x.
Version 7.x > Upgrades > Upgrade for 3 servers View modes: 
User avatar
Member
Member
beau.cowan-rrpartners - 6/26/2013 6:58:41 PM
   
Upgrade for 3 servers
I've been practicing localling on doing the upgrade for our client who has a number of different websites that have a staging, failover, and live server. The way how I've been practicing doing the upgrade is using the upgrade tool for each "server" (it's localhost, it has to be in quotes), and it seems like it's going to put their sites down for a long time if I do this.

What I would like to know, is if I use the upgrade tool on just the Staging server, copy the files, perform a sync with the upgraded keys, and then paste the files to the other 2 servers, if that would work or not. I'm not sure how the upgrade affects the database in regards to staging and applying those SQL changes to the other databases.

Any info or personal experiences would be appreciated.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 6/28/2013 8:04:05 AM
   
RE:Upgrade for 3 servers
I'm working with a similar environment and we have just begun this process of performing updates and I too am wondering what the best practice is. Unfortunately some of the hotfixes have SQL executed with them so there could be database changes on top of the code changes which could cause problems if one was to just copy files out.

User avatar
Member
Member
beau.cowan-rrpartners - 6/28/2013 10:41:10 AM
   
RE:Upgrade for 3 servers
After doing a little more reading and trial/error on my localhost, I think that I might have found a plausible solution, but would like some feedback on it still if possible.

In the Instructions.pdf that's included with the upgrade, it gives details on how to manually upgrade Kentico. I focused on the SQL part of it, which is easy because there is a SQL script included in the package, as well as with the most recent hotfix. Taking into account that license keys will also have to be upgraded, I did a little further testing and found that they can be taken care of through staging and syncing, but there is a catch that I will get to later.

Here is what I'm thinking about doing:
I'm going to use the upgrade tool on just the staging server. Make sure that everything is backed up and run the tool once for the whole process. After this is complete, I will delete all of my v6 license keys and add in the v7 license keys, as well as adjust any settings, permissions, roles, etc that need to be taken care of.

One I am comfortable with staging being fully upgraded, I will place an App_Offline.html into the second server, delete all files excluding the web.config and media files. Then, copy/paste the core files from staging over to second server, and run the SQL scripts that are included in both the upgrade package and hotfix package. There are some added/adjusted values to the web.config, so that will need to be addressed as well.

When the SQL script is finished, and this will be important for syncing, I will go into the CMSSiteManager for the second server and add in just 1 license key, preferably for the domain that I'm currently doing the sync'ing from. From staging, I will select the second server, and do a Synchronize All. This way all of the keys, changed settings, and anything else that needed to happen will be sent to the second server properly.

Should this go well, I would repeat the same process for the final, live server.

This should help limit the amount of time the live site is down to hopefully around 15-20 minutes, depending on how your internet speed is and how organized you are. I'm still doing some testing on this at this time, so this is just a suggestion on how to go about doing the process.

Should anyone have any comments or suggestions to help streamline this process, please feel free to chime in.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 7/2/2013 2:54:56 AM
   
RE:Upgrade for 3 servers
Hello.

Yes, this should work. Basically, the upgrade is nothing else than replacing certain files within your web project by new files from upgrade package and running SQL script. This is done in your scenario, so there should not be a problem. Replacing license key and synchronizing settings is OK, so your approach is fine.

Best Regards,
Radek Macalik

User avatar
Member
Member
Swainy - 7/2/2013 11:04:14 AM
   
RE:Upgrade for 3 servers
Hi Radek,

I have known in the past Kentico say that if you are upgrading through multiple versions (i.e. 5.5R2 -> 7.0) that you need to run the site after each upgrade.

i.e. 5.5R2 -> 6.0 - Run site

Then 6.0 -> 7.0 Run site

Can you confirm that this is still the case?

Thanks,
Matt

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 7/2/2013 11:16:02 AM
   
RE:Upgrade for 3 servers
Hello Matt,

Yes, I can confirm that it's still recommended, and I would recommend you not to just run the site but also to go through a few pages, give it some clicks and check if everything is working fine... it's the best and the easiest way to find out what version is causing a problem if any comes out after upgrading.

Best Regards,
Martin Danko

User avatar
Member
Member
beau.cowan-rrpartners - 7/3/2013 4:59:17 PM
   
RE:Upgrade for 3 servers
I like where this is going, this is cool. heh

I took your advice and created a file that will read the exported keys that I get from the client portal, remove the old keys and insert the new ones accordingly. The syncing process is where my next set of questions come from though.

What I'm wondering is if there is an efficient way to use the App_Offline.htm file so that I can still access the CMSSiteManager for doing the sync on the other servers and adjust their license keys while keeping the site offline.

Would there be something that I need to configure in the IIS, or is there another method that I can use?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 7/8/2013 6:30:17 PM
   
RE:Upgrade for 3 servers
Hello,

No, it's not possible to access any part of the CMS with the simultaneous usage of App_Offline.htm. You can set some redirection for CMS app folder and allow just access to the CMS Desk or CMS Site Manager but from version 7 you can use also the new feature -> Off-line mode, just scroll down at the bottom of this section in the Dev Guide for more details.

Best Regards,
Martin Danko

User avatar
Member
Member
beau.cowan-rrpartners - 7/15/2013 2:02:16 PM
   
RE:Upgrade for 3 servers
I've decided to go ahead and go with the offline mode for the sites. I have it pointing to a custom html file basically saying that the site is down.

My next problem is that when the upgrade tool is running, there are runtime errors that come up due to files being deleted and adjusted, and App_Offline.htm file only takes care of the application, not the compiler.

I've tried to rewrite some of the web.config for custom errors through there, using
<customErrors defaultRedirect="~/maintenance.htm" mode="On">
, and I'm still not getting the redirect to happen on my localhost.

Is there something that I need to do in IIS, a different file handling the runtime errors, or anything else that I need to do in order to get the runtime error to go to the preferred place?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 7/20/2013 2:12:12 PM
   
RE:Upgrade for 3 servers
Hi,

Sorry I'm a little bit confused at this point, could you please once again try to describe what exactly do you want to achieve? I don't understand what/where is the problem in this case.

Best Regards,
Martin Danko

User avatar
Member
Member
beau.cowan-rrpartners - 7/22/2013 11:29:10 AM
   
RE:Upgrade for 3 servers
Basically while the upgrade tool is removing files, altering content and upgrading the database, if someone comes to visit the site at this time, there is a compiling error. At least that's what's happening when I'm testing on my localhost. I tried to set the web.config to handle the errors differently, as I've read in many asp.net forums and tutorials, but it is still not redirecting to the proper error page.

Until I apply the hotfix and my custom files that have been altered for the upgrade, the compiling errors still persist.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 7/24/2013 4:07:18 PM
   
RE:Upgrade for 3 servers
Sorry,

I'm not pretty sure what exactly is the issue in your case but your site must be off-line during the whole process of upgrading or hotfixing. This is also the most important information mentioned in every instructions file!

Regards,
Martin Danko

User avatar
Member
Member
beau.cowan-rrpartners - 7/25/2013 12:17:32 PM
   
RE:Upgrade for 3 servers
My apologies, I know that it's kinda hard to explain this error that I'm getting, so I'll try once more. We are close to doing the upgrade, so I might just hope that the caching takes while we are doing the process.

Here is the process that I'm doing to upgrade the sites:
- Take all of the sites off-line in the CMSSiteManager
- Test the root of the site to ensure that it's redirecting to the right file.
- Run the Upgrade tool with a custom App_Offline.htm file
- Run the latest Hotfix
- Copy over a package that has updated code for all of our custom templates and webparts
- Remove App_Offline.htm so that I can run a file that installs all v7 license keys
- Refresh CMSDesk and CMSSiteManager after clearing browser cache
- Bring sites back Online if not the staging server.

This whole process should take me about 6-8 minutes, depending on server speeds and if any unforeseen error happens.

During this 6-8 minutes, I visit the root of the site to make sure that it's still redirecting properly, and instead I'm getting compile error messages. I believe that this is because files are being over-written and new files are entering the project.

I've tried a few ASP.NET solutions in the web.config file to redirect any compiling errors to the same file that I'm using for offline mode, but it's still not redirecting to there.

I think that at this time I might just have to eat it and hope that I'm fast enough that no one will see the compile error, or that the form of caching that we are using is taking care of what is needed.

User avatar
Member
Member
kentico_sandroj - 7/30/2013 3:37:23 PM
   
RE:Upgrade for 3 servers
Hello,

I tried to reproduce this issue but I was unable to. During the upgrade I tried to access the page many times using different browsers and always got the default "offline" message. You mentioned a custom App_Offline file, what's custom about it? I can check with the developers if they have any ideas but since we are unable to reproduce this it might be specific to your environment.

Regards,
Sandro

User avatar
Member
Member
beau.cowan-rrpartners - 7/30/2013 3:53:49 PM
   
RE:Upgrade for 3 servers
Thank you for helping look into it Sandro. Just to make sure, you kept going to the root of the site, correct? Not just refresh the browser to go wherever the redirect file is all the time?

The only thing custom about the App_Offline.htm file is the code inside of it. It looks like the offline file that I have the site redirecting to.

I might just have to take what I've got, and it might even be just a localhost problem. could be a lot different when I do this on the server.

User avatar
Member
Member
kentico_sandroj - 7/30/2013 4:00:56 PM
   
RE:Upgrade for 3 servers
You're very welcome - I can give it another try with your App_Offline file if you like? I can confirm that I was accessing the root of the site, not the App_Offline url. You're right about the localhost, it will likely be different on the server. If not, just let us know and we will look into it.

User avatar
Member
Member
beau.cowan-rrpartners - 8/6/2013 5:14:27 PM
   
RE:Upgrade for 3 servers
Thank you, I think that we are going to try and use what we have at this time. However, if it helps, we are upgrading from v6.0.23(SP1). We are currently having an issue with our SmartSearch, and we are going to hold off on doing the upgrade until we can resolve this issue.

I've just put in a post about the issue here: http://devnet.kentico.com/Forums/f55/t39324/Unable-to-access-SmartSearch.aspx