How to use a recurring Integration Endpoint for importing data
You are here
Change LBD OnPremLocalAgent Certificate
LBD has been around for more than a year now. Is it time to replace your servicing certificate?
If you following the instructions from MSFT on how to setup your first cluster, you'll soon be running into one of the issues related certificate lifetime. The scripts from MSFT for self signed certs only creates certs that are good for a year. That means you'll have to cycle some certs out. We're going to outline how to replace the OnPremLocalAgent cert.
-
Import the new OnPremLocalAgent certificate into all orchestrators into Cert::/Local Computer/My
-
If using self signed certs
-
Update your ConfigTemplate.xml to create one and regenerate all VM scripts and push out to each node
-
-
If not using self signed certs
-
Update the ConfigTemplate.xml for each environment with the new thumbprint for the OnPremLocalAgent certificate
-
Update the acl.csv in VM directory with the new thumbprint value for the on prem local agent cert
-
-
Run .\Set-CertificateAcls.ps1 from the VM directory for that machine to apply ACLs to the newly imported OnPremLocalAgent certificate on all orchestrators
-
Delete the thumb print stored in azure using script
-
Remove-AzureRmADSpCredential -ServicePrincipalName "00000015-0000-0000-c000-000000000000" -KeyId ΓÇ£xxxΓÇ¥
-
If you are unsure what value to use for "xxx", run the following to get an error with the value
- \Add-CertToServicePrincipal.ps1 -CertificateThumbprint <OnPremLocalAgent Certificate Thumbprint>
-
- Upload new OnPremLocalAgent thumbprint (Step 11 from https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/setup-deploy-on-premises-pu12)
-
.\Add-CertToServicePrincipal.ps1 -CertificateThumbprint <OnPremLocalAgent Certificate Thumbprint>
-
Uninstall On Prem Agent from each cluster
-
LocalAgentCLI.exe Cleanup localagent-config.json
-
-
Install new On Prem Agent with updated OnPremLocalAgent certificate info
-
LocalAgentCLI.exe Install localagent-config.json
-
-
Test servicing operation on each environment (send message then refresh state)
And that's it! It can be time consuming but you could use GPO to push out certs. This can be done for all clusters and nodes at any time. I would advise that you modify the New-SelfSignedCertificates.ps1 script by adding a -NotAfter switch to change their lifespan, like so:
$certText = "New-SelfSignedCertificate $($argsList.ToArray() -join ' ') -NotAfter (Get-Date).AddMonths(60) "