Content Staging from Dev > Staging > Production with Azure

Brendon McCarthy asked on November 13, 2014 17:54

We have two-way syncing from Staging to Production setup in Azure, but would like to add in multiple Dev environments, as documented here: https://docs.kentico.com/display/K81/Bi-directional+content+staging#Bi-directionalcontentstaging-Startopology.

There are multiple Dev environments, one for each developer. The idea is common, push changes in Dev up to Staging, but we also want to be able to sync changes from Production all the way down to Dev, in order to keep content and objects in sync across all environments.

However, when adding a new Staging server in Kentico, you are required to point to the domain/IP of the Dev environment. This does not seem plausible considering individual developers won't have fixed domains/IPs. Did I miss something or is there another recommended way to get Production/Staging changed synced with a local Dev environment?

We are running in Azure, so while you could export/import a refresh of the database on regular basis, this takes time and is not very efficient (and also requires updating various production settings each time to non-production values, i.e. Content Staging settings). Additionally, though, Objects are stored in Azure Storage and syncing all three storage blobs (Production, Staging, Dev) is required.

Recent Answers


Brenden Kehren answered on November 27, 2014 03:35

You can add multiple servers to sync to. Have you tried that?

0 votesVote for this answer Mark as a Correct answer

Brendon McCarthy answered on December 1, 2014 21:41

The issue is in how to connect to a local development instance, which is not accessible via public IP address, or if you setup proper routing, multiple developers are sharing the same IP address.

0 votesVote for this answer Mark as a Correct answer

Filip Ligač answered on December 6, 2014 12:39 (last edited on December 6, 2014 12:43)

Hello Brendon,

Basically I see 2 options for setting up Staging servers:

  1. Ensure fixed IP addresses or domain names for the Staging servers and configure it according to documentation.

  2. Configure the Server URL dynamically via Kentico API. You would need to constantly check for IP address changes on the servers and then change the settings for the respective servers using a code snippet similar to this:

    private bool GetAndUpdateStagingServer()
    {
        // Get the staging server
        ServerInfo updateServer = ServerInfoProvider.GetServerInfo("MyNewServer", SiteContext.CurrentSiteID);
        if (updateServer != null)
        {
            // Update the server IP address
            updateServer.ServerURL = newIPaddress;
    
            // Save the changes
            ServerInfoProvider.SetServerInfo(updateServer);
    
            return true;
        }
        return false;
    }
    
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.