Skip to content
This repository was archived by the owner on Jun 17, 2019. It is now read-only.

Commit a304a2e

Browse files
committed
Pass installer config via template (NAV version fix).
- Solve issue #18 using installer config. template. - Documentation fix.
1 parent 1a2c9ee commit a304a2e

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

root/__content/NAV/configs/Install-NavComponentConfig.xml renamed to root/__content/NAV/configs/Install-NavComponentConfig.tmpl.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
<Component Id="RoleTailoredClient" State="Absent" ShowOptionNode="yes"/>
1515
<Component Id="ExcelAddin" State="Absent" ShowOptionNode="yes"/>
1616
<Component Id="ClassicClient" State="Absent" ShowOptionNode="yes"/>
17-
<Parameter Id="TargetPath" Value="[WIX_ProgramFilesFolder]\Microsoft Dynamics NAV\100"/>
18-
<Parameter Id="TargetPathX64" Value="[WIX_ProgramFilesX64Folder]\Microsoft Dynamics NAV\100"/>
17+
<Parameter Id="TargetPath" Value="[WIX_ProgramFilesFolder]\Microsoft Dynamics NAV\[DOCKER.NAV_VERSION]"/>
18+
<Parameter Id="TargetPathX64" Value="[WIX_ProgramFilesX64Folder]\Microsoft Dynamics NAV\[DOCKER.NAV_VERSION]"/>
1919
<Parameter Id="NavServiceSQMOption" Value="false"/>
2020
<Parameter Id="NavServiceServerName" Value="localhost"/>
21-
<Parameter Id="NavServiceInstanceName" Value="SampleDynamicsNAV100"/>
21+
<Parameter Id="NavServiceInstanceName" Value="SampleDynamicsNAV[DOCKER.NAV_VERSION]"/>
2222
<Parameter Id="NavServiceAccount" Value="NT AUTHORITY\NETWORK SERVICE"/>
2323
<Parameter Id="NavServiceAccountPassword" IsHidden="yes" Value=""/>
2424
<Parameter Id="NavServiceClientServicesPort" Value="37046"/>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[CmdletBinding()]
2+
param (
3+
4+
[Parameter(Mandatory=$true)]
5+
[String]$NavConfigTmplFullPath,
6+
7+
[Parameter(Mandatory=$true)]
8+
[String]$NavConfigDestFullPath
9+
10+
)
11+
12+
$navVersion = & (Join-Path $PSScriptRoot Get-NavVersionMajor.ps1)
13+
$navVersion = -join ($navVersion, "0")
14+
15+
(Get-Content $NavConfigTmplFullPath).replace('[DOCKER.NAV_VERSION]', $navVersion) | Set-Content $NavConfigDestFullPath -Force

root/build/nav/InstallNav.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ WORKDIR C:\\install\\content
1818

1919
# Add missing registry to be able run main setup.exe (to cheat prerequisite checks).
2020
RUN powershell c:\install\content\Scripts\Add-MissingRegistry.ps1; \
21+
# Set product version (convert installation config file template to the real config file).
22+
c:\install\content\Scripts\Convert-NavInstallConfigTmpl.ps1 c:\install\content\configs\Install-NavComponentConfig.tmpl.xml c:\install\content\configs\Install-NavComponentConfig.xml; \
2123
# Install NAV prerequisites (or at least pretend to), NAV Server and NAV default instance (will be stopped and disabled).
2224
Import-Module c:\install\content\DynamicsNavDvd\NavInstallationTools.psm1 -Force; \
2325
Install-NAVComponent -ConfigFile c:\install\content\configs\Install-NavComponentConfig.xml;

root/build/nav/InstallWeb.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ WORKDIR C:\\install\\content
1414

1515
# Add missing registry to be able run main setup.exe (to cheat prerequisite checks).
1616
RUN powershell c:\install\content\Scripts\Add-MissingRegistry.ps1; \
17+
# Set product version (convert installation config file template to the real config file).
18+
c:\install\content\Scripts\Convert-NavInstallConfigTmpl.ps1 c:\install\content\configs\Install-NavComponentConfig-web.tmpl.xml c:\install\content\configs\Install-NavComponentConfig-web.xml; \
1719
# Add IIS and related features.
1820
c:\install\content\Scripts\Install-IIS.ps1; \
1921
# Install NAV prerequisites (or at least pretend to), NAV Server and NAV default instance (will be stopped and disabled).

root/run/nav/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Instantiate independent NAV containers (right now an example with SQL authentica
1010
* Please, just change all necessary parameters (*-e* values) in the script, eventually, you also change the network driver and remove port mappings etc.
1111
* `_run.winAuth.ps1`
1212
* Creates an independent NAV container on the default network (we are considering to be a **nat** network).
13-
* This container requires an existing and accessible SQL server instance. The authentication betwen NAV and SQL server will be provided via **Windows Authentication** so you have to create a *Windows login* on the SQL server with *db_owner* privileges on the target database.
13+
* This container requires an existing and accessible SQL server instance. The authentication between NAV and SQL server will be provided via **Windows Authentication** so you have to create a *Windows login* on the SQL server with *db_owner* privileges on the target database.
1414
* NAV user authentication uses **Windows**. This must be properly created in the target database.
1515
* **This demo requires gMSA to be active and properly configured.**

0 commit comments

Comments
 (0)