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

Make Windows runner subsystem production ready #4

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

amotl
Copy link
Member

@amotl amotl commented Jun 7, 2022

About

What the title says. 6cc13a8 was the first implementation, but it was just a prototype. Now, the necessary bells and whistles have been added and the feature graduated from postroj invoke to racker run.

Synopsis

$ racker --verbose run --rm --platform=windows/amd64 mcr.microsoft.com/windows/nanoserver:1809-amd64 \
  -- cmd /C echo Hello, world.

Documentation

See Racker Windows backend.

Examples

$ racker --verbose run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:ltsc2016 wmic os get caption
Microsoft Windows Server 2016 Standard Evaluation

$ racker --verbose run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:ltsc2019 wmic os get caption
Microsoft Windows Server 2019 Datacenter Evaluation

$ racker --verbose run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:ltsc2022 wmic os get caption
Microsoft Windows Server 2022 Datacenter

Backlog

@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2022

Codecov Report

Merging #4 (08a19b0) into main (fd3d4ff) will increase coverage by 0.42%.
The diff coverage is 73.52%.

❗ Current head 08a19b0 differs from pull request most recent head 26aee46. Consider uploading reports for the commit 26aee46 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   82.26%   82.68%   +0.42%     
==========================================
  Files          18       17       -1     
  Lines        1156     1161       +5     
==========================================
+ Hits          951      960       +9     
+ Misses        205      201       -4     
Flag Coverage Δ
unittests 82.68% <73.52%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
racker/cli.py 81.65% <71.87%> (-4.43%) ⬇️
postroj/cli.py 81.25% <100.00%> (-0.57%) ⬇️
postroj/exceptions.py 100.00% <100.00%> (ø)
postroj/util.py 77.29% <0.00%> (+1.74%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment on lines -33 to +52
cd {self.workdir}
git clone https://github.com/StefanScherer/windows-docker-machine
cd '{self.workdir}'
git clone https://github.com/cicerops/windows-docker-machine --branch racker
Copy link
Member Author

Choose a reason for hiding this comment

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

On this spot, we would like to bring in some adjustments to the upstream infrastructure and switch back to mainline afterwards. The corresponding patch is StefanScherer/windows-docker-machine#86.

Add support for Windows Server Core 2019 and friends.

- windows/servercore:ltsc2019
- windows/nanoserver:1809
…space

The GHA job output already croaked about this, like:

    You are running out of disk space. The runner will stop working when
    the machine runs out of disk space. Free space left: 0 MB
postroj/winrunner.py Outdated Show resolved Hide resolved
doc/winrunner.rst Show resolved Hide resolved
- windows/servercore:ltsc2016
- windows/servercore:ltsc2022
- windows/nanoserver:ltsc2022
- Don't manipulate $PATH. To make `git` available on the program search
  path, use the package parameter `/GitAndUnixToolsOnPath` instead.
- Rename native Windows programs like `curl.exe` and `convert.exe` to
  reduce ambiguity with their FOSS/GNU resp. Chocolatey-installed
  counterparts, also without needing to manipulate $PATH.
- Also install `busybox` and `nano`.
The new names are ``RACKER_WDM_VCPUS``, ``RACKER_WDM_MEMORY``, and
``RACKER_WDM_MACHINE``.

WDM means "Windows Docker Machine".
The new default values are:

- RACKER_WDM_VCPUS: 4
- RACKER_WDM_MEMORY: 4096 MB
This can be used to reconfigure the Vagrant virtualization backend
differently than VirtualBox.

Possible values are, in alphabetical order, `hyperv`, `virtualbox`,
`qemu`, `vmware_fusion`, `vmware_workstation`. It has been tested with
`virtualbox` only.
@amotl amotl marked this pull request as ready for review June 12, 2022 09:43
postroj/winrunner.py Outdated Show resolved Hide resolved
@amotl amotl force-pushed the windows branch 2 times, most recently from 857a261 to 08a19b0 Compare June 12, 2022 12:44
This aims to build Python wheels for PyTables in a DIY manner.

It uses Microsoft Visual C++ Build Tools 2015 and Anaconda, both
installed using Chocolatey, and `cibuildwheel`.
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