[SERVER-27182] Support MongoDB running in Windows Nanoserver, Windows Container Created: 25/Nov/16 Updated: 05/Apr/17 Resolved: 06/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Portability |
| Affects Version/s: | 3.2.11 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | stefanscherer [X] | Assignee: | Mark Benvenuto |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Platforms 2017-01-23 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
I recently helped to minimize the official Docker image "mongo" to run MongoDB in a Windows container: https://github.com/docker-library/mongo/blob/21a6f6cf3eff13a39b20c86224730a29823370ca/3.2/windows/windowsservercore/Dockerfile And then I tried to put MongoDB into a Windows Nanoserver container, but the binaries do not start. It would be great to have MongoDB running in Nanoserver as well. If there is some progress please let me know. Otherwise I can try to investigate what's wrong running MongoDB in Nanoserver. |
| Comments |
| Comment by stefanscherer [X] [ 05/Dec/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I'm fine with it closing this issue. Thanks for your help. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chad Kreimendahl [ 05/Dec/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I'd love to see a how-to guide on the main documentation website to go with this | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Mark Benvenuto [ 05/Dec/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for the work Stefan. I am planning to close the ticket since everything works with 3.4.0. Let me know if you would like to keep the ticket open. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by stefanscherer [X] [ 02/Dec/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Opened https://github.com/docker-library/mongo/issues/124 for an official Dockerfile and Docker image. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by stefanscherer [X] [ 02/Dec/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Added interim Docker images at https://hub.docker.com/r/stefanscherer/mongo-windows/ until we have an official mongo:3.4.0-nanoserver | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by stefanscherer [X] [ 02/Dec/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oh, that's great! Yes, indeed, I can confirm that. I missed the vcruntime140.dll yesterday. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Mark Benvenuto [ 02/Dec/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I validated that 3.4.0 with and without SSL starts successfully in Windows Nano Server image. As long as the binaries are linked against the Visual Studio 2015 runtime (vcruntime140), they will work fine. I am surprised even though the API scanner complains. I believe this is possible because the reverse forwarder is installed. The 3.2. and 3.0 binaries will not work since they are linked against the Visual Studio runtime (mscvcrt120.dll). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by stefanscherer [X] [ 30/Nov/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I did a short test with the OpenSSL 64bit binaries for Windows, and I put them into a nanoserver container. They seem to work, with warnings in the NanoServerApiScan tool. OK, I couldn't test the two DLL's that MongoDB uses with it. I think for a first step it would be sufficient to use the forwarder DLL's as they are part of the nanoserver container, so nobody would "uninstall" them from the base image.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Mark Benvenuto [ 30/Nov/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for detailed information. There are a few different types of programs included in the MongoDB distribution. They are in roughly three categories: C++ programs, Go programs, and third-party. These are all Go, and so these depend on the Go compiler runtime.
These are third-party dlls that we ship:
I do not know if MSVC 2013 supports nano server. MongoDB 3.4 is compiled with MSVC 2015 so this may be simply fixed in this later version. On the other hand, OpenSSL cannot be easily fixed, but we may move away from OpenSSL in the future. Otherwise, only a non-SSL build would work. In the C++ program category:
Most of the of problematic API calls come from our GPerfTools component, and need to work with gperftools to support Windows Nano Server. The MoveFileW call comes from WiredTiger and I opened | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by stefanscherer [X] [ 25/Nov/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I found the NanoServerApiScan tool https://blogs.technet.microsoft.com/nanoserver/2016/04/27/nanoserverapiscan-exe-updated-for-tp5/ and put it into a Docker image https://github.com/StefanScherer/dockerfiles-windows/tree/master/nanoserverapiscan Here is the output of the scan that shows with API's have to be updated to work in Nano Server.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by stefanscherer [X] [ 25/Nov/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is a good starting point how to port Win32 apps to Nanoserver https://blogs.technet.microsoft.com/windowsserver/2015/11/16/moving-to-nano-server-the-new-deployment-option-in-windows-server-2016/ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by stefanscherer [X] [ 25/Nov/16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is my setup to build minimal Docker images for both windowsservercore and nanoserver https://github.com/StefanScherer/dockerfiles-windows/tree/master/mongo/3.2
|