STAEDEAN FOOD Installation Documentation
Initialize FOOD
When deployed on premises a new database must be created, "build-up" with the Microsoft System Application and completed by the FOOD Application.
The process starts with completing an installation of the set as obtained from the Download Microsoft Business Central On-Premises site. Once the installation is completed and you have access through a modern client to the CRONUS demo company follow these steps (you can copy and paste the code to ISE):
NOTES 1
- The CreateDatabase.ps1 script assumes that the AL Development Environment is installed from the Dynamics 365 Business Central DVD. Copy the path to the $systemApp variable. The $systemApplication variable must point to the path from where the Setup was run.
- The CreateDatabase.ps1 script assumes a SQL server without instances, make sure when specifying the installation options in the Dynamics 365 Business Central setup the database instance is left blank.
- From your desktop run Windows PowerShell ISE as administrator.
CreateDatabase.ps1
# Import the NAV Management modules in ISE:
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Apps.Management.psd1"
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Management.psd1"
# Define the variables for the script (current values are provided as examples):
$serverInstance = 'BC150'
$databaseName = "ToIncrease"
$databaseServer = "localhost"
$applicationVersion = '15.2.39040.0'
$applicationFamily = 'W1'
$systemApp = "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\150\AL Development Environment\System.app"
$systemApplication = "C:\ ... \Applications\System Application\Source\Microsoft_System Application.app"
$companyName = 'Food Basic BC15'
# Create a new database:
New-NAVApplicationDatabase -DatabaseName $databaseName -DatabaseServer $databaseServer
Set-NAVServerConfiguration -KeyName DatabaseName -KeyValue $databaseName -ServerInstance $serverInstance
Restart-NAVServerInstance -ServerInstance $serverInstance
# Connect the new database to the Business Central service:
Set-NAVApplication -ApplicationVersion $applicationVersion -ServerInstance $serverInstance -Force
Set-NAVApplication -ApplicationFamily $applicationFamily -ServerInstance $serverInstance -Force
Sync-NAVTenant -ServerInstance $serverInstance -Mode Sync
# Import License File
Import-NAVServerLicense -LicenseFile c:\sw\license\BC-15-DEV.flf -ServerInstance BC150
Restart-NAVServerInstance -ServerInstance $serverInstance
# Publish the Microsoft system application in the database:
Publish-NAVApp -Path $systemApp -ServerInstance $serverInstance -PackageType SymbolsOnly
Publish-NAVApp -Path $systemApplication -ServerInstance $serverInstance
Sync-NAVApp -Name "System Application" -ServerInstance $serverInstance
# Install the Microsoft system application in the database and create a new Company:
Install-NAVApp -Path $systemApplication -ServerInstance $serverInstance
New-NAVCompany -CompanyName $companyName -ServerInstance $serverInstance -CompanyDisplayName $companyName
Install FOODapps.ps1
To prepare for this script you need to download the STAEDEAN FOOD Artifacts and unzip the downloaded folder on your desktop. Make sure to update your local path in the script (\ ... )
NOTES 2
- Upon succesful completion of the script Extension Management will list the published and installed the extensions. The System Application shows the Dynamics 365 Business Central build number, while the STAEDEAN applications show the STAEDEAN build number. Example: 15.3.41357.0
- 15 is the Business Central major version, must be the same between Microsoft and STAEDEAN.
- 3 is the Business Central minor version (update), must be the same between Microsoft and STAEDEAN.
- 41357 is the build number, will be different between Microsoft and STAEDEAN.
# When running this script in a seperate session in ISE we need to import the modules again
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Apps.Management.psd1"
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\Microsoft.Dynamics.Nav.Management.psd1"
# Set the variables before running the script
$serverInstance = 'BC150'
$version = '15.3.0.0'
$name = 'FOOD Application'
$appFolders = "C:\SW\FOOD\Base Application\app\To-Increase_FOOD Application_15.3.0.0.app"
Publish-NAVApp -Path $appFolders -ServerInstance $serverInstance -SkipVerification
Sync-NAVApp -Name $name -ServerInstance $serverInstance -Version $version
Install-NAVApp -Name $name -ServerInstance $serverInstance -Version $version
Install FOOD in Docker container
$containerName = "FOODNA20-2"
$artifactUrl = Get-BCArtifactUrl -version "20.2.41144.41423" -country us -type Onprem -select Latest
$credential = New-Object pscredential 'admin', (ConvertTo-SecureString -String 'Password' -AsPlainText -Force)
$licenseFile = "C:\RSP\Flf Files\BC-V20-Q3-2022-12-03-dev.flf"
$companyName = "CRONUS USA - TEST"
New-BCContainer -doNotCheckHealth `
-accept_eula `
-updateHosts `
-useBestContainerOS `
-containerName $containerName `
-artifactUrl $artifactUrl `
-auth "UserPassword" `
-Credential $credential `
-accept_outdated `
-assignPremiumPlan `
-includeAL `
-licenseFile $licenseFile `
-Shortcuts DesktopFolder `
-memoryLimit 10G
Clean-BcContainerDatabase -containerName $containerName -credential $credential
Restart-BcContainer -containerName $containerName
Publish-BcContainerApp -appFile "C:\RSP\FOODNA.20.2.202209.0\FOODNA.20.2.202209.0\15BASE\APP\To-Increase B.V._FOOD Application_20.2.202209.0.app" -containerName $containerName -credential $credential -install -scope Tenant -sync -useDevEndpoint
New-CompanyInBcContainer -companyName $companyName -containerName $containerName
Restart-BcContainer -containerName $containerName