HodorNV / ALOps-External-Deployer

Enables external deployment in Microsoft Business Central (API Deploy)
3 stars 1 forks source link

"ServiceTier [bc] not found" error when installing ALOPsExternalDeployer #6

Closed jithendra415 closed 1 year ago

jithendra415 commented 1 year ago

We are facing problem in installing ALOps pipelines in new customer environments. since few days.

Error: image

What we have done:

  1. Install BC20 CU5
  2. add new instances (OTAP)
  3. add new Pipeline instances
  4. configure Pipeline instances in BC administration panel
  5. link instance to database
  6. start the instances
  7. Run script (which will be attached)
  8. Error comes up at step 7 of the script.

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/

acjdekorte commented 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).