Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-NavContainer outputs the wrong vsix download url when using traefik #1832

Open
DanielGoehler opened this issue Mar 24, 2021 · 1 comment
Assignees

Comments

@DanielGoehler
Copy link
Contributor

Describe the issue
The download url of the AL Language extension (http://dockerhub.mycompany.com:8080/ALLanguage.vsix) should be changed to https://dockerhub.mycompany.com/mydockerdl/ALLanguage.vsix when using traefik.

Scripts used to create container and cause the issue

New-NavContainer -accept_eula -containername mydocker -artifactUrl "https://bcpublicpreview.azureedge.net/sandbox/18.0.23013.23434/de" -PublicDnsName dockerhub.mycompany.com -useTraefik -shortcuts None -auth NavUserPassword -Credential $credential -assignPremiumPlan -licenseFile "C:\dockerFiles\dev.flf" -sqlMemoryLimit "1G"

Full output of scripts

BcContainerHelper version 2.0.2
BcContainerHelper is version 2.0.2
BcContainerHelper is running as administrator
Host is Microsoft Windows Server 2019 Standard - ltsc2019
Docker Client Version is 19.03.14
Docker Server Version is 19.03.14
Fetching all docker images
Enabling SSL as otherwise all clients will see mixed HTTP / HTTPS request, which will cause problems e.g. on the mobile and modern windows clients
Using image mcr.microsoft.com/businesscentral:10.0.17763.1817
PublicDnsName is dockerhub.mycompany.com
Creating Container mydocker
Version: 18.0.23013.23434-DE
Style: sandbox
Multitenant: Yes
Platform: 18.0.22893.23390
Generic Tag: 1.0.1.4
Container OS Version: 10.0.17763.1817 (ltsc2019)
Host OS Version: 10.0.17763.1817 (ltsc2019)
Using process isolation
Using locale de-DE
Adding special CheckHealth.ps1 to enable Traefik support
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\dockerFiles\dev.flf
--hostname dockerhub
-e webserverinstance=mydocker
-e publicdnsname=dockerhub.mycompany.com
-l "traefik.protocol=https"
-l "traefik.web.frontend.rule=PathPrefix:/mydocker"
-l "traefik.web.port=443"
-l "traefik.soap.frontend.rule=PathPrefix:/mydockersoap;ReplacePathRegex: ^/mydockersoap(.*) /BC$1"
-l "traefik.soap.port=7047"
-l "traefik.rest.frontend.rule=PathPrefix:/mydockerrest;ReplacePathRegex: ^/mydockerrest(.*) /BC$1"
-l "traefik.rest.port=7048"
-l "traefik.dev.frontend.rule=PathPrefix:/mydockerdev;ReplacePathRegex: ^/mydockerdev(.*) /BC$1"
-l "traefik.dev.port=7049"
-l "traefik.dl.frontend.rule=PathPrefixStrip:/mydockerdl"
-l "traefik.dl.port=8080"
-l "traefik.dl.protocol=http"
-l "traefik.enable=true"
-l "traefik.frontend.entryPoints=https"
--env customNavSettings=PublicODataBaseUrl=https://dockerhub.mycompany.com/mydockerrest/odata,PublicSOAPBaseUrl=https://dockerhub.mycompany.com/mydockersoap/ws,PublicWebBaseUrl=https://dockerhub.mycompany.com/mydocker
Files in C:\ProgramData\BcContainerHelper\Extensions\mydocker\my:
- AdditionalOutput.ps1
- CheckHealth.ps1
- license.flf
- MainLoop.ps1
- prismaSSL2020.PFX
- SetupCertificate.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatecontainerhosts.ps1
Creating container mydocker from image mcr.microsoft.com/businesscentral:10.0.17763.1817
87e5ef8165cc7fb40fde351ebf7ce3d9118ff73ca639342d4bee32b2fe870be5
Waiting for container mydocker to be ready
Using artifactUrl https://bcpublicpreview.azureedge.net/sandbox/18.0.23013.23434/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server

Starting Internet Information Server

Copying Service Tier Files

Copying PowerShell Scripts
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules

Determining Database Collation from c:\dl\sandbox\18.0.23013.23434\de\BusinessCentral-DE.bak
Restoring CRONUS Demo Database

Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS

Exporting Application to CRONUS

Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Copying Web Client Files
Copying Client Files
Copying ModernDev Files
Copying additional files
Copying ConfigurationPackages
Copying Test Assemblies
Copying Extensions
Copying Applications
Copying Applications.DE
Starting Business Central Service Tier

Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files

Attaching files as new Database default

Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False

Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 370 seconds
Installation complete
Initializing...
Setting host.containerhelper.internal to 172.30.176.1 in container hosts file
Starting Container
Hostname is dockerhub
PublicDnsName is dockerhub.mycompany.com
Using NavUserPassword Authentication
Certificate File Thumbprint 6ACA6C1529F27493A8915CD0215D9DA9339EB27E
Import Certificate to LocalMachine\my
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting PublicODataBaseUrl to https://dockerhub.mycompany.com/mydockerrest/odata
Setting PublicSOAPBaseUrl to https://dockerhub.mycompany.com/mydockersoap/ws
Setting PublicWebBaseUrl to https://dockerhub.mycompany.com/mydocker

Starting Service Tier

Registering event sources
Creating DotNetCore Web Server Instance
Enabling Financials User Experience
Enabling rewrite rule: Don't rewrite system files
Enabling rewrite rule: Already have tenant specified
Enabling rewrite rule: Hostname (without port) to tenant
Using license file 'c:\run\my\license.flf'
Import License

Dismounting Tenant

Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False

Sync'ing Tenant
Tenant is Operational
Creating http download site

Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.

Creating SUPER user
WARNING: This license is not compatible with this version of Business Central.

WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ADMIN
Container IP Address: 172.30.185.135
Container Hostname  : dockerhub
Container Dns Name  : dockerhub.mycompany.com
Web Client          : https://dockerhub.mycompany.com/mydocker/?tenant=default
Dev. Server         : https://dockerhub.mycompany.com
Dev. ServerInstance : BC
Dev. Server Tenant  : default

Files:
http://dockerhub.mycompany.com:8080/ALLanguage.vsix

Container Total Physical Memory is 16.0Gb
Container Free Physical Memory is 9.4Gb

Initialization took 77 seconds
Ready for connections!

Reading CustomSettings.config from mydocker
Set SQL Server memory limit to 1024 MB
Container mydocker successfully created
Because of Traefik, the following URLs need to be used when accessing the container from outside your Docker host:
Web Client:        https://dockerhub.mycompany.com/mydocker
SOAP WebServices:  https://dockerhub.mycompany.com/mydockersoap
OData WebServices: https://dockerhub.mycompany.com/mydockerrest
Dev Service:       https://dockerhub.mycompany.com/mydockerdev
File downloads:    https://dockerhub.mycompany.com/mydockerdl

Use:
Get-BcContainerEventLog -containerName mydocker
 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName mydocker
 to get debug information about the container
Enter-BcContainer -containerName mydocker
 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName mydocker
 to remove the container again
docker logs mydocker
 to retrieve information about URL's again
...
@freddydk
Copy link
Contributor

Yeah, the URL's for traefik are listed later - this is really a fix in the generic image.
I have it on my todo list (but it has been there for a long time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants