Closed jithendra415 closed 1 year ago
The reason, why we have experienced, is that the powershell module has been changed. New parameters were added in order to give the possibility to work with multiple business central version on one server. Unfortunately, we were not aware of those changes and that background. Nowadays every serverinstance needs to the linked to own AlOps services (with it own portnumber).
We are facing problem in installing ALOps pipelines in new customer environments. since few days.
Error:
What we have done:
Script:
1, Import NAV/BC Module
Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\170\Service\NavAdminTool.ps1' ## Change to correct folder
2, Set variables.
Change to desired target instance and extension.
$PipelineInstance = 'BC170_PROD_Pipeline' $Extension = '_ExcludeAPIV1' $DefaultInstance = 'BC170_PROD'
2.5, Disable Design button to prevent Pipeline errors with conflicting extensions (deze stap zet Task Scheduler uit op de instance)
Set-NAVWebServerInstanceConfiguration -WebServerInstance $DefaultInstance -KeyName Designer -KeyValue false
3, Check Extensions (APIV1)
If installed go to step 6!!
Get-NAVAppInfo -ServerInstance $PipelineInstance -Name $Extension | Out-GridView
4, Publish Extension
File is in installation file (...\Applications\APIV1\Source\Microsoft__ExcludeAPIV1.app)
Publish-NAVApp -ServerInstance $PipelineInstance -Path '<PATH TO .APP FILE HERE>'
5, Install App
Install-NAVApp -ServerInstance $PipelineInstance -Name $Extension
6, Install & Import ExternalDeployer Module (ONLY HAS TO BE EXECUTED ONCE!!)
If already installed, go to step 8!!
Install-Module ALOps.ExternalDeployer -Force Import-Module ALOps.ExternalDeployer
7, Install ALOpst External Deployer (ONLY HAS TO BE EXECUTED ONCE!!)
Install-ALOpsExternalDeployer
8, Create new deployer
New-ALOpsExternalDeployer -ServerInstance $PipelineInstance
9, Restart NST.
restart-NAVServerInstance -ServerInstance $PipelineInstance
NOTE: This is similar to the https://github.com/HodorNV/ALOps-External-Deployer/issues/5 And we following https://www.waldo.be/2020/06/15/deploying-from-devops-the-right-way-enabling-external-deployment-in-onprem-business-central-environments/