Skip to content

Commit

Permalink
[docs] Run e2e tests in platform=none
Browse files Browse the repository at this point in the history
This commit adds section in HACKING.md to describe the process
of running the e2e tests on a platform-agnostic infrastructure.
  • Loading branch information
jrvaldes committed Jan 7, 2022
1 parent 0289df3 commit 2e46e27
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/HACKING.md
Expand Up @@ -117,6 +117,40 @@ hack/run-ci-e2e-test.sh -s -m 2 -c 1
```
Please note that you do not need to run `hack/olm.sh run` before `hack/run-ci-e2e-test.sh`.

### Running e2e tests on platform-agnostic infrastructure

To run the WMCO' e2e tests on a bare metal or other platform-agnostic infrastructure (platform=none), where there
is no cloud provider specification, the desired number of Windows instances must be available beforehand, and you
need provide the instance(s) information to the e2e test suite using an environment variable.

To deploy machines in any of the [infrastructure providers supported by WMCO](wmco-prerequisites.md#supported-cloud-providers-based-on-okdocp-version-and-wmco-version),
refer to the specific provider documentation. See Windows instance [pre-requisites](https://github.com/openshift/windows-machine-config-operator/blob/master/docs/byoh-instance-pre-requisites.md).

The information you need to collect from each Windows instance is:
- the internal IP address, and
- the Windows administrator username

Export `WINDOWS_INSTANCES_DATA` as an environment variable with the corresponding [windows-instances configMap](https://github.com/openshift/windows-machine-config-operator#adding-instances)
data section, and a new `windows-instances` configMap will be created during the execution of the e2e test suite.

For example:
```shell
export WINDOWS_INSTANCES_DATA='
data:
10.1.42.1: |-
username=Administrator
'
```
where `10.1.42.1` is the IP address and `Administrator` is the Windows' administrator username of the Windows instance.

Once the `WINDOWS_INSTANCES_DATA` environment variable is declared and exported you can run:
```shell
hack/run-ci-e2e-test.sh -m 0 -c 1
```
where, `-m 0` indicates no Windows instance will be configured by the Windows Machine controller and `-c 1`
accounts for the number of instances that will be configured by the ConfigMap controller, and must match the
number of entries in the `WINDOWS_INSTANCES_DATA` environment variable, in this example only one (1).

## Bundling the Windows Machine Config Operator
This directory contains resources related to installing the WMCO onto a cluster using OLM.

Expand Down

0 comments on commit 2e46e27

Please sign in to comment.