Upload Sitefinity CMS-based application Sitefinity CMS handles database model changes automatically. This means that when a Sitefinity CMS application is making the first connection to its database the schema version is checked and the model is updated, if needed. The database model is updated, if any of the Sitefinity CMS based modules have changed its model. This means that with every new version of Sitefinity CMS the database model is changed.
Uploading with database changes
If no downtime is required with such upload, you must consider the following:
- If you do not want any downtime, you must have separate instances with the application files and configurations. If any synchronization was manually configured as already described it must be stopped.
- The changes that the new version of Sitefinity CMS will apply to the database must be backward compatible with the older version to the required extent, allowing uninterrupted work for the other applications. You can verify this only after extensive testing.
- Disable schema changes and validation for the applications that will process the requests during the upload of the other nodes. This setting is a called DisableSchemaUpgrade and is located in the DataConfig setting under Advanced settings from the Sitefinity CMS backend UI. This setting should be applied to all nodes manually from the UI as a direct change to the DataConfig.config file will be refreshed only after an application restart. This setting will prevent any changes to the database from those nodes.
- Drain stop the node that will be upgraded first meaning that all current session should be waited to be closed and all new sessions must be redirected to another node. This is usually done using the health monitoring that was configured or manually commanding the load balancer to remove a given node from the balancing.
- Deploy the new application and its settings on the node that was excluded from the balancing. Start the application. At this point, the database schema of the Sitefinity CMS database will be upgraded. Verify that the application is functioning correctly.
- The next step depends on the number of nodes and the current load of the system. In general, the applications running with the old version should be excluded from the balancing while including the upgraded applications until all nodes are upgraded.
- If used, switch on the configuration files synchronization.
If a short service interruption is acceptable, the upload is straightforward and does not require separate application files and configurations.
- Stop all applications.
- Deploy the new application files.
- Start only one application that will upgrade the database schema.
- Verify that the application is functional.
- Start all applications.
Uploading without database modification changes
If the Sitefinity CMS version is not changed and no Sitefinity CMS based modules have changed, the database model will not be modified. This simplifies the upload procedure. The only thing to consider in this case is the order of which to upgrade your nodes.
If your application and its configuration files are deployed to different locations, you can upgrade node by node.
- Stop any configuration files synchronization services that you have.
- Exclude enough nodes to handle the expected load while maintaining enough to handle the current load. This can be achieved with the health monitoring setup or by manually ordering the load balancer to redirect the new requests to a subset of the available nodes.
- Deploy the new version of your application to the excluded nodes.
- Start them and verify one by one that they are functioning.
- Include the upgraded nodes in the balancing while removing the not upgraded nodes.
- Upgrade the rest of the nodes and include them in the balancer.
- Start any configuration synchronization that you have.