Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
- name: Run tests
# FIXME: Can this be run without elevated privileges?
run: |
sudo $(command -v pytest)
coverage xml
sudo --preserve-env $(command -v pytest)
coverage xml --omit postroj/winrunner.py

- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v3
Expand Down
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ in progress
- Improve platform guards and naming things
- Improve central command invocation function
- Improve documentation
- Make Windows runner subsystem production ready.
- Add support for Windows Server Core 2019 and friends, like
``windows/servercore:ltsc2019``, ``windows/nanoserver:1809``, or
``eclipse-temurin:17-jdk``.
- Add support for Windows Server Core 2016, 2022 and friends, like
``windows/servercore:ltsc2016``, ``windows/servercore:ltsc2022``, or
``windows/nanoserver:ltsc2022``.
- Improve documentation about the Windows backend
- Rename environment variables used to control the Windows Docker Machine
subsystem. The new names are ``RACKER_WDM_VCPUS``, ``RACKER_WDM_MEMORY``,
and ``RACKER_WDM_MACHINE``.
- Add environment variable ``RACKER_WDM_PROVIDER`` to reconfigure the
Vagrant virtualization backend differently than VirtualBox.


2022-05-20 0.2.0
Expand Down
29 changes: 29 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ another one for Windows.
`systemd-nspawn`_. Provisioning of additional software is performed using the
native package manager of the corresponding Linux distribution.

- For running Windows operating systems containers, Racker uses `Vagrant`_,
`Docker`_, and `Windows Docker Machine`_. The virtual machine base image is
acquired from `Vagrant Cloud`_, container images are acquired from the
`Microsoft Container Registry`_. For provisioning additional software, the
`Chocolatey`_ package manager is used. All of cmd, PowerShell and Bash are
pre-installed on the container images.


Operating system coverage
-------------------------
Expand All @@ -132,6 +139,11 @@ Linux
- SUSE SLES 15 and BCI:latest
- Ubuntu LTS 20 and 22 (focal, jammy)

Windows
.......
- Windows Server Core LTSC 2016, 2019, and 2022
- Windows Nano Server 1809 and LTSC 2022


Prior art
---------
Expand Down Expand Up @@ -212,6 +224,8 @@ Racker
The ``racker`` program aims to resemble the semantics of Docker by providing a
command line interface compatible with the ``docker`` command.

Linux
-----
::

# Invoke the vanilla Docker `hello-world` image.
Expand Down Expand Up @@ -244,6 +258,20 @@ command line interface compatible with the ``docker`` command.
time echo "hello world" | racker run -it --rm fedora:37 cat /dev/stdin > hello
cat hello

Windows
-------

An example of a basic command line invocation should get you started,
especially if you are familiar with the ``docker`` command::

racker --verbose run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:ltsc2022 -- wmic os get caption

Caption
Microsoft Windows Server 2022 Datacenter

More extensive information, including many examples, can be found at the
`Racker Windows backend`_ documentation.


Postroj
=======
Expand Down Expand Up @@ -429,6 +457,7 @@ Troubleshooting
.. _Packer: https://www.packer.io/
.. _Podman: https://podman.io/
.. _Racker sandbox installation: https://github.com/cicerops/racker/blob/main/doc/sandbox.rst
.. _Racker Windows backend: https://github.com/cicerops/racker/blob/main/doc/winrunner.rst
.. _skopeo: https://github.com/containers/skopeo
.. _systemd: https://www.freedesktop.org/wiki/Software/systemd/
.. _systemd-nspawn: https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html
Expand Down
30 changes: 25 additions & 5 deletions doc/cratedb.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
#########################
Using postroj for CrateDB
#########################
#######################################
Using Racker and Postroj for CrateDB CI
#######################################

.. note::

This is still a work in progress.
**********
racker run
**********

Purpose: Invoke programs in a Java/OpenJDK environment, within a
virtualized/dockerized, volatile/ephemeral Windows environment.

Run the CrateDB test suite on OpenJDK 18 (Eclipse Temurin)::

time racker --verbose run --rm --platform=windows/amd64 eclipse-temurin:18-jdk \
"sh -c 'mkdir /c/src; cd /c/src; git clone https://github.com/crate/crate --depth=1; cd crate; ./gradlew --no-daemon --parallel -PtestForks=2 :server:test -Dtests.crate.run-windows-incompatible=false --stacktrace'"

Use the same image, but select a specific operating system version::

export RACKER_WDM_MACHINE=2019-box
racker --verbose run --rm --platform=windows/amd64 eclipse-temurin:18-jdk -- wmic os get caption

Invoke a Java command prompt (JShell) with OpenJDK 18::

racker --verbose run -it --rm --platform=windows/amd64 eclipse-temurin:18-jdk jshell
System.out.println("OS: " + System.getProperty("os.name") + ", version " + System.getProperty("os.version"))
System.out.println("Java: " + System.getProperty("java.vendor") + ", version " + System.getProperty("java.version"))


****************
Expand Down
Loading