2

We have completed development in Stage environment on SDL Web 8.5 and DXA 2.0. The setup for Production CMS is also completed and now we are planning to replace the database on Production with Stage database.

Please bear with me as I am new to Topology Manager.

In Stage, when I run the script Get-TtmCdEnvironment, I get the output:

EnvironmentPurpose   : Staging
DiscoveryEndpointUrl : http://stage.microservices.com:8082/discovery.svc
Credentials          : "AuthenticationType":"OAuth", "ClientId":"cmuser", "ClientSecret":"********"
IsOffline            : False
ScopedRepositoryKeys : {DxaSiteType, DxaExampleSite...}
Id                   : CdEnvironment1
ExtensionProperties  : {}

In Production, for the same command, I get the output as:

EnvironmentPurpose   : Live
DiscoveryEndpointUrl : http://www.microservices.com:8082/discovery.svc
Credentials          : "AuthenticationType":"OAuth", "ClientId":"cmuser", "ClientSecret":"********"
IsOffline            : False
ScopedRepositoryKeys : {DxaSiteType, DxaExampleSite}
Id                   : CdEnvironment4
ExtensionProperties  : {}

EnvironmentPurpose   : Staging
DiscoveryEndpointUrl : http://staging.microservices.com:8082/discovery.svc
Credentials          : "AuthenticationType":"OAuth", "ClientId":"cmuser", "ClientSecret":"********"
IsOffline            : False
ScopedRepositoryKeys : {DxaSiteType, DxaExampleSite}
Id                   : CdEnvironment3
ExtensionProperties  : {}

My questions is that when we do the Topology Manager DB replace, how will the environment IDs map out (Stage has CD Environment as CdEnvironment1 and Production has CdEnvironment4 & CdEnvironment3).

Will the Ids remain the same after DB replace and I can run the update scripts on the imported websites

--OR--

Will replacing the DB overwrite the Production CD Environments and I will have to run the the Add-TtmCdEnvironment again and add all the websites again?

I went through this question here, but I am still confused. How should I approach this?

2 Answers 2

4

In general, it is not expected that Topology Manager DBs are “replaced” between DTAP environments.

One of the advantages of Topology Manager is that you can now port CM DBs between DTAP environments, without immediately also copying the infrastructure configuration (which is of course different for each environment).

BTW: the ouput you show looks like the result of Get-TtmCdEnvironment rather than Get-TtmCmEnvironment.

2
2

As per this answer here, I think that it's not possible to copy the Topology Manager to different environments if we have different setups and Ids.

So here is what I did. Imported Topology Manager from Stage to Production. Ran the update command (Set-TtmCmEnvironment, Set-TtmCdEnvironment & Set-TtmWebsite) to update the stage references to the Staging environment of Live.

Ran the add commands (Add-TtmCdEnvironment, Add-TtmCdTopology, Add-TtmWebsite, Add-TtmWebApplication & Add-TtmMapping) for Production Live environment.

This just reduced the effort to write all the Add Commands for the entire 240+ sites that we had for the Production Staging environment. We would have run the add commands for Production Staging sites too if the number of sites was less.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.