You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/05/26 01:25:04 UTC

[2/4] mesos git commit: Windows: Updated build documentation.

Windows: Updated build documentation.

This (long overdue) documentation update bumps the dependencies
to the correct versions and updates the associated build commands.
Some of the limitations of the Windows work have also been addressed.

Review: https://reviews.apache.org/r/59556/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/171ba944
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/171ba944
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/171ba944

Branch: refs/heads/master
Commit: 171ba9449b6f3470bda77194e84acbe2d2d24cca
Parents: d22bbb7
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Thu May 25 13:37:42 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu May 25 14:18:42 2017 -0700

----------------------------------------------------------------------
 docs/windows.md | 105 +++++++++++++++++++++++++++------------------------
 1 file changed, 56 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/171ba944/docs/windows.md
----------------------------------------------------------------------
diff --git a/docs/windows.md b/docs/windows.md
index b070c64..d596158 100644
--- a/docs/windows.md
+++ b/docs/windows.md
@@ -13,77 +13,84 @@ Mesos 1.0.0 introduced experimental support for Windows.
 
 ### System Requirements
 
-1. Install the latest version of [Visual Studio Community 2015](https://www.visualstudio.com/post-download-vs?sku=community).
-   Make sure to select the Common Tools for Visual C++ and the Windows 10 SDK.
-   Start Visual Studio Community to complete the setup and configuration.
-2. Install [CMake 3.6.3 or later](https://cmake.org/files/v3.6/cmake-3.6.3-win32-x86.msi).
-   Do not run CMake before finishing the Visual Studio Community setup.
-3. Install [Gnu Patch 2.5.9-7 or later](http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-setup.exe).
-4. If building from git, make sure you have Windows-style line endings.
-   i.e. `git config core.autocrlf true`.
-5. Make sure there are no spaces in your build directory.
+1. Install the latest [Visual Studio 2017](https://www.visualstudio.com/downloads/):
+   The "Community" edition is sufficient (and free).
+   During installation, you install either the "Desktop development with C++"
+   workload or choose the following "Individual components":
+    * VC++ 2017 v141 toolset
+    * Windows 10 SDK (10.0.15036.0, currently) for Desktop C++
+    * Windows Universal CRT SDK
+    * Windows Universal C Runtime
+    * C++ profiling tools (optional, for profiling)
+    * Visual Studio C++ core features (optional, for IDE)
+
+2. Install [CMake 3.8.0](https://cmake.org/download/) or later.
+   During installation, choose to "Add CMake to the system PATH for all users".
+
+3. Install [GNU patch for Windows](http://gnuwin32.sourceforge.net/packages/patch.htm).
+
+4. If building from source, install [Git](https://git-scm.com/download/win).
+   During installation, keep the defaults to "Use Git from the Windows
+   Command Prompt", and "Checkout Windows-style, commit Unix-style
+   line endings" (i.e. `git config core.autocrlf true`).
+
+5. Enable filesystem long path support by running the following
+   in an administrative PowerShell prompt:
+   `Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1`
+   And then reboot.  Alternatively this can be set manually through `regedit`.
+   For more details, see this
+   [MSDN article](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx).
+   NOTE: This requirement is in the process of being deprecated!
+
+6. Make sure there are no spaces in your build directory.
    For example, `C:/Program Files (x86)/mesos` is an invalid build directory.
-6. **Optional**: Install [`python 2.6+`](https://www.python.org/downloads/windows/) and [`virtualenv`](https://pypi.python.org/pypi/virtualenv)
-   This is only necessary when developing Mesos on Windows (specifically for automated linting of python files).
 
-### Build Instructions
-
-Following are the instructions for stock Windows 10 and Windows Server 2012 or newer.
+7. If developing Mesos, install [Python 2](https://www.python.org/downloads/)
+   (not Python 3), in order to use our support scripts (e.g. to post and apply
+   patches, or lint source code).
 
-    # Start a VS2015 x64 Native Tool command prompt.
-    # This can be found by opening VS2015 and looking under the "tools"
-    # menu for "Visual Studio Command Prompt".
 
-    # Change working directory.
-    $ cd mesos
+### Build Instructions
 
-    # If you are developing on Windows, we recommend running the bootstrap.
-    # This requires administrator privileges.
-    $ .\bootstrap.bat
+Following are the instructions for Windows 10.
 
-    # Generate the solution and build.
-    $ .\support\windows-build.bat
+    # Start an administrative session of PowerShell
+    # (required for creating symlinks).
 
-    # Set the `PreferredToolArchitecture` environment variable to `x64`.
-    # NOTE: `PreferredToolArchitecture` can be set system-wide via Control Panel.
-    $ SET PreferredToolArchitecture=x64
+    # Clone (or extract) Mesos.
+    git clone https://git-wip-us.apache.org/repos/asf/mesos.git
+    cd mesos
 
-    # After generating the Visual Studio solution you can use the IDE to open
-    # the project and skip this step.
-    $ msbuild Mesos.sln /m
+    # Configure using CMake for an out-of-tree build.
+    mkdir build
+    cd build
+    cmake .. -G "Visual Studio 15 2017 Win64" -T "host=x64" -DENABLE_LIBEVENT=1 -DHAS_AUTHENTICATION=0
 
-    # mesos-agent.exe can be found in the <repository>\build\src folder.
-    $ cd src
+    # Build Mesos.
+    # To build just the Mesos agent, add `--target mesos-agent`.
+    cmake --build .
 
     # The Windows agent exposes new isolators that must be used as with
     # the `--isolation` flag. To get started point the agent to a working
     # master, using eiher an IP address or zookeeper information.
-    $ mesos-agent.exe --master=<master> --work_dir=<work folder> --launcher_dir=<repository>\build\src
+    src\mesos-agent.exe --master=<master> --work_dir=<work folder> --launcher_dir=<repository>\build\src
 
 
 ## Known Limitations
 
 The current implementation is known to have the following limitations:
 
-* At this point, only the agent is capable of running on Windows,
-  the Mesos master must run on a Posix machine.
+* 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.
 * Due to the 260 character `MAX_PATH` limitation on Windows,
-  it is required to set the configuration option `--launcher_dir`
-  to be a root path, e.g. `C:\`.
-  In addition, the `TASK_ID` that is passed to Mesos should be short,
-  up to about 40 characters. **NOTE**: If you schedule tasks via Marathon,
-  your Marathon task id should be up to four characters long since Marathon
-  generates Mesos `TASK_ID` by appending a UUID (36 characters) onto
-  the Marathon task id.
-* Currently runs as Administrator (mainly due to symlinks).
-* Only the `MesosContainerizer` is currently supported,
-  which does not provide resource isolation on Windows.
-  Resource isolation will be provided via the `DockerContainerizer`
-  (e.g. Windows Containers) in the future.
-* Most of the tests are not ported to Windows.
+  it is required to enable the NTFS long path support.
+* 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).
 
 
 ## 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).
+please refer to the [Jira epic](https://issues.apache.org/jira/browse/MESOS-3094).
\ No newline at end of file