Repository: mesos Updated Branches: refs/heads/master adf4fa3f2 -> 3dc93d6fd
Updated Windows documentation. Removed outdated notes about administrative privileges being necessary due to symlinks, which was resovled in MESOS-7370. Added note about minimum supported Windows versions, including caveat that it will likely increase. Moved the Java and OpenSSL build examples from `cmake-examples.md` to `windows.md`, with additional note that the Java build is only for unit tests (to clarify that the `master` is not yet supported on Windows). Updated latest tested version of OpenSSL, and added note about dynamic linking and lack of bundled certificates. Review: https://reviews.apache.org/r/64431 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3dc93d6f Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3dc93d6f Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3dc93d6f Branch: refs/heads/master Commit: 3dc93d6fd70a10c3a601710e62d5d848554cabc8 Parents: adf4fa3 Author: Andrew Schwartzmeyer <[email protected]> Authored: Thu Dec 7 16:00:59 2017 -0800 Committer: Andrew Schwartzmeyer <[email protected]> Committed: Mon Dec 11 15:38:36 2017 -0800 ---------------------------------------------------------------------- docs/cmake-examples.md | 59 ------------------------------- docs/windows.md | 84 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 78 insertions(+), 65 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/3dc93d6f/docs/cmake-examples.md ---------------------------------------------------------------------- diff --git a/docs/cmake-examples.md b/docs/cmake-examples.md index e3149bf..e7274a4 100644 --- a/docs/cmake-examples.md +++ b/docs/cmake-examples.md @@ -357,62 +357,3 @@ libraries by default. On Windows, static libraries are the default. Building with shared libraries on Windows is not yet supported, as it requires code change to import symbols properly. - -## Building with Java - -When building with Java on Windows, you must add the [Maven][] build tool to -your path. The `JAVA_HOME` environment variable must also be manually set. -An installation of the Java SDK can be found form [Oracle][]. - -[maven]: https://maven.apache.org/guides/getting-started/windows-prerequisites.html -[oracle]: http://www.oracle.com/technetwork/java/javase/downloads/index.html - -As of this writing, Java 9 is not yet supported, but Java 8 has been tested. - -The Java build defaults to `OFF` because it is slow. To build the Java -components on Windows, turn it `ON`: - -```powershell -mkdir build; cd build -$env:PATH += ";C:\...\apache-maven-3.3.9\bin\" -$env:JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_144" -cmake .. -DENABLE_JAVA=ON -DENABLE_LIBEVENT=ON -G "Visual Studio 15 2017 Win64" -T "host=x64" -cmake --build . --target mesos-java -``` - -Note that the `mesos-java` library does not have to be manually built; as -`libmesos` will link it when Java is enabled. - -Unfortunately, on Windows the `FindJNI` CMake module will populate `JAVA_JVM_LIBRARY` with -the path to the static `jvm.lib`, but this variable must point to the shared -library, `jvm.dll`, as it is loaded at runtime. Set it correctly like this: - -``` -$env:JAVA_JVM_LIBRARY = "C:\Program Files\Java\jdk1.8.0_144\jre\bin\server\jvm.dll" -``` - -The library may still fail to load at runtime with the following error: - -> "The specified module could not be found." - -If this is the case, and the path to `jvm.dll` is verified to be correct, then -the error message actually indicates that the dependencies of `jvm.dll` could -not be found. On Windows, the DLL search path includes the environment variable -`PATH`, so add the `bin` folder which contains `server\jvm.dll` to `PATH`: - -``` -$env:PATH += ";C:\Program Files\Java\jdk1.8.0_144\jre\bin" -``` - -## Building with OpenSSL - -When building with OpenSSL on Windows, you must build or install a distribution -of OpenSSL for Windows. A commonly chosen distribution is [Shining Light -Productions' OpenSSL][openssl]. - -[openssl]: https://slproweb.com/products/Win32OpenSSL.html - -As of this writing, OpenSSL 1.1.x is not yet supported, but 1.0.2L has been -tested. - -Use `-DENABLE_SSL=ON` when running CMake to build with OpenSSL. http://git-wip-us.apache.org/repos/asf/mesos/blob/3dc93d6f/docs/windows.md ---------------------------------------------------------------------- diff --git a/docs/windows.md b/docs/windows.md index 6b6a742..cf2c7c2 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -39,9 +39,6 @@ Mesos 1.0.0 introduced experimental support for Windows. Following are the instructions for Windows 10. - # Start an administrative session of PowerShell - # (required for creating symlinks when using the agent). - # Clone (or extract) Mesos. git clone https://git-wip-us.apache.org/repos/asf/mesos.git cd mesos @@ -68,14 +65,89 @@ The current implementation is known to have the following limitations: * Only the agent should be run on Windows. The Mesos master can be launched, but only for testing as the master does not support high-availability setups on Windows. + * While Mesos supports NTFS long paths internally, tasks which do not support long paths must be run on agent whose `--work_dir` is a short path. -* The Mesos agent must be run as Administrator, mainly due to symlinks. -* The `MesosContainerizer` currently does not provide any actual - resource isolation (similar to running the Mesos agent on POSIX). + +* The minimum versions of Windows supported are: Windows 10 Creators Update (AKA + version 1703, build number 15063), and [Windows Server, version 1709][server]. + It is likely that this will increase, due to evolving Windows container + support and developer features which ease porting. + +[server]: https://docs.microsoft.com/en-us/windows-server/get-started/get-started-with-1709 ## Status For more information regarding the status of Windows support in Mesos, please refer to the [JIRA epic](https://issues.apache.org/jira/browse/MESOS-3094). + +## Build Configuration Examples + +### Building with Java + +This enables more unit tests, but we do not yet officially produce +`mesos-master`. + +When building with Java on Windows, you must add the [Maven][] build tool to +your path. The `JAVA_HOME` environment variable must also be manually set. +An installation of the Java SDK can be found form [Oracle][]. + +[maven]: https://maven.apache.org/guides/getting-started/windows-prerequisites.html +[oracle]: http://www.oracle.com/technetwork/java/javase/downloads/index.html + +As of this writing, Java 9 is not yet supported, but Java 8 has been tested. + +The Java build defaults to `OFF` because it is slow. To build the Java +components on Windows, turn it `ON`: + +```powershell +mkdir build; cd build +$env:PATH += ";C:\...\apache-maven-3.3.9\bin\" +$env:JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_144" +cmake .. -DENABLE_JAVA=ON -DENABLE_LIBEVENT=ON -G "Visual Studio 15 2017 Win64" -T "host=x64" +cmake --build . --target mesos-java +``` + +Note that the `mesos-java` library does not have to be manually built; as +`libmesos` will link it when Java is enabled. + +Unfortunately, on Windows the `FindJNI` CMake module will populate `JAVA_JVM_LIBRARY` with +the path to the static `jvm.lib`, but this variable must point to the shared +library, `jvm.dll`, as it is loaded at runtime. Set it correctly like this: + +``` +$env:JAVA_JVM_LIBRARY = "C:\Program Files\Java\jdk1.8.0_144\jre\bin\server\jvm.dll" +``` + +The library may still fail to load at runtime with the following error: + +> "The specified module could not be found." + +If this is the case, and the path to `jvm.dll` is verified to be correct, then +the error message actually indicates that the dependencies of `jvm.dll` could +not be found. On Windows, the DLL search path includes the environment variable +`PATH`, so add the `bin` folder which contains `server\jvm.dll` to `PATH`: + +``` +$env:PATH += ";C:\Program Files\Java\jdk1.8.0_144\jre\bin" +``` + +### Building with OpenSSL + +When building with OpenSSL on Windows, you must build or install a distribution +of OpenSSL for Windows. A commonly chosen distribution is +[Shining Light Productions' OpenSSL][openssl]. + +[openssl]: https://slproweb.com/products/Win32OpenSSL.html + +As of this writing, OpenSSL 1.1.x is not yet supported, but 1.0.2M has been +tested. + +Use `-DENABLE_SSL=ON` when running CMake to build with OpenSSL. + +Note that it will link to OpenSSL dynamically, so if the built executables are +deployed elsewhere, that machine also needs OpenSSL installed. + +Beware that the OpenSSL installation, nor Mesos itself, comes with a certificate +bundle, and so it is likely that certificate verification will fail.
