Skip to content

Add prototype of ANCM - #2868

Closed
richlander wants to merge 3 commits into
dotnet:mainfrom
richlander:ancm
Closed

richlander wants to merge 3 commits into
dotnet:mainfrom
richlander:ancm

Conversation

@richlander

@richlander richlander commented Jun 8, 2021 •

Copy link
Copy Markdown
Member

Context: #2814

This is a WIP to determine a plan. This model works.

Open issues:

  • Should the aspnet Windows Server Core image be configured to use IIS, just like the .NET Framework ASP.NET one is? That's the model I started with, not a suggestion I prefer it.
  • Perhaps we should add IIS and servicemonitor to the aspnet image and leave the IIS configuration to the app? That puts IIS and Kestrel on equal footing. There's asymmetry with the .NET Framework image but that's probably a fine tradeoff. That seems like the right model to me.
  • We'll need to ensure that we can download ANCM by version like we do ASP.NET Core.
  • Are we getting the latest servicemonitor? It's a hard-coded value (both here and in other Dockerfiles.
  • The original plan was to only enable this for 6.0. That still seems like the right model. People can copy what we've done for 3.1.

Notes:

  • I realize that these changes should be made in a template (I assume). I made these changes to get feedback.
  • I assumed that the two RUN statements should be coalesced. That can be fixed later.
  • The mis-match between 5.0 and 6.0 and the use of DOTNET_ROLL_FORWARD is just to make the sample work w/o changing it.
  • I just noticed now that the file names I used are 2.1.x while the ANCM is 6.0. I just copied this code and made the minimum changes. That needs to be changed.

Relevant .NET Framework assets:

/cc @shirhatti @BrennanConroy

@ghost

ghost commented Jun 8, 2021

Copy link
Copy Markdown

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

$ErrorActionPreference = 'Stop'; `
$ProgressPreference = 'SilentlyContinue'; `
New-Item -Type Directory C:\Setup | powershell -Command Out-Null ; `
Invoke-WebRequest 'https://download.visualstudio.microsoft.com/download/pr/2728666c-860b-4a78-ba42-8ec7b2167d42/72b9c82be95a013e2c15a1fc182e2fc4/dotnet-hosting-6.0.0-preview.4.21253.5-win.exe' -UserAgent '' -OutFile C:/setup/dotnet-hosting-2.1.3-win.exe ; `

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


EXPOSE 80

ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I'm most unsure about. I understand that in non-IIS cases, the app's Dockerfile would override this ENTRYPOINT. I would consider that to be the typical case. And it just feels weird for the typical case to be overriding something. If someone attempts to run the aspnet image directly, what is the experience? Are they going to be guided to thinking that IIS is the way to go?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a specific design question called out up top. I come to the same conclusion as you and am asking if people agree.

@mthalman

Copy link
Copy Markdown
Member

Are we getting the latest servicemonitor? It's a hard-coded value (both here and in other Dockerfiles.

Yes. There hasn't exactly been a lot of churn on that front: https://github.com/microsoft/IIS.ServiceMonitor/releases

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants