EgorBaranovEnjoysTyping commented on code in PR #13607: URL: https://github.com/apache/ignite/pull/13607#discussion_r4142721731
########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. +2. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). In its settings: + * General: enable **Use the WSL 2 based engine**. + * Resources -> WSL Integration: enable integration for your Ubuntu distro. + * Resources: give Docker at least 6 GB of memory for small runs such as the smoke test. Running the default 13 containers needs much more. + +### Step 2. Prepare the distro + +Run these commands in the Ubuntu shell: + +```bash +# Tools for building Ignite and running the test scripts +sudo apt update && sudo apt install -y openjdk-17-jdk maven git python3 python3-venv python-is-python3 Review Comment: also make sure alias python for python3 is exported (it is used in docker build scripts ########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. Review Comment: It might be restricted by security policies. ########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. +2. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). In its settings: + * General: enable **Use the WSL 2 based engine**. + * Resources -> WSL Integration: enable integration for your Ubuntu distro. + * Resources: give Docker at least 6 GB of memory for small runs such as the smoke test. Running the default 13 containers needs much more. + +### Step 2. Prepare the distro + +Run these commands in the Ubuntu shell: + +```bash +# Tools for building Ignite and running the test scripts +sudo apt update && sudo apt install -y openjdk-17-jdk maven git python3 python3-venv python-is-python3 + +# Let your user run docker without sudo +sudo usermod -aG docker $USER +``` + +Close the Ubuntu window, run `wsl --shutdown` in PowerShell, and open Ubuntu again so the group change takes effect. Then check the setup: + +```bash +docker ps # must print a (possibly empty) container list, without sudo +python --version # must print Python 3.8 or newer; the scripts call `python`, not `python3` +``` + +### Step 3. Get the code and build it + +Clone into your Linux home directory, not into `/mnt/c`: + +```bash +cd ~ +git clone https://github.com/apache/ignite.git +cd ignite +mvn clean install -DskipTests Review Comment: javadoc generation also should be skipped (build could be failed) -Dmaven.javadoc.skip=true ########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. +2. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). In its settings: + * General: enable **Use the WSL 2 based engine**. + * Resources -> WSL Integration: enable integration for your Ubuntu distro. + * Resources: give Docker at least 6 GB of memory for small runs such as the smoke test. Running the default 13 containers needs much more. + +### Step 2. Prepare the distro + +Run these commands in the Ubuntu shell: + +```bash +# Tools for building Ignite and running the test scripts +sudo apt update && sudo apt install -y openjdk-17-jdk maven git python3 python3-venv python-is-python3 + +# Let your user run docker without sudo +sudo usermod -aG docker $USER +``` + +Close the Ubuntu window, run `wsl --shutdown` in PowerShell, and open Ubuntu again so the group change takes effect. Then check the setup: + +```bash +docker ps # must print a (possibly empty) container list, without sudo +python --version # must print Python 3.8 or newer; the scripts call `python`, not `python3` +``` + +### Step 3. Get the code and build it + +Clone into your Linux home directory, not into `/mnt/c`: + +```bash +cd ~ +git clone https://github.com/apache/ignite.git +cd ignite +mvn clean install -DskipTests +./scripts/build-module.sh ducktests Review Comment: it makes near-simillar job to previous string ########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. +2. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). In its settings: + * General: enable **Use the WSL 2 based engine**. + * Resources -> WSL Integration: enable integration for your Ubuntu distro. + * Resources: give Docker at least 6 GB of memory for small runs such as the smoke test. Running the default 13 containers needs much more. + +### Step 2. Prepare the distro + +Run these commands in the Ubuntu shell: + +```bash +# Tools for building Ignite and running the test scripts +sudo apt update && sudo apt install -y openjdk-17-jdk maven git python3 python3-venv python-is-python3 + +# Let your user run docker without sudo +sudo usermod -aG docker $USER +``` + +Close the Ubuntu window, run `wsl --shutdown` in PowerShell, and open Ubuntu again so the group change takes effect. Then check the setup: + +```bash +docker ps # must print a (possibly empty) container list, without sudo +python --version # must print Python 3.8 or newer; the scripts call `python`, not `python3` +``` + +### Step 3. Get the code and build it + +Clone into your Linux home directory, not into `/mnt/c`: + +```bash +cd ~ +git clone https://github.com/apache/ignite.git +cd ignite +mvn clean install -DskipTests +./scripts/build-module.sh ducktests Review Comment: May be you meant build.sh? (you should be in docker directory, may fail otherwise) ########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. +2. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). In its settings: + * General: enable **Use the WSL 2 based engine**. + * Resources -> WSL Integration: enable integration for your Ubuntu distro. + * Resources: give Docker at least 6 GB of memory for small runs such as the smoke test. Running the default 13 containers needs much more. + +### Step 2. Prepare the distro + +Run these commands in the Ubuntu shell: + +```bash +# Tools for building Ignite and running the test scripts +sudo apt update && sudo apt install -y openjdk-17-jdk maven git python3 python3-venv python-is-python3 + +# Let your user run docker without sudo +sudo usermod -aG docker $USER +``` + +Close the Ubuntu window, run `wsl --shutdown` in PowerShell, and open Ubuntu again so the group change takes effect. Then check the setup: + +```bash +docker ps # must print a (possibly empty) container list, without sudo +python --version # must print Python 3.8 or newer; the scripts call `python`, not `python3` +``` + +### Step 3. Get the code and build it + +Clone into your Linux home directory, not into `/mnt/c`: + +```bash +cd ~ +git clone https://github.com/apache/ignite.git +cd ignite +mvn clean install -DskipTests +./scripts/build-module.sh ducktests +``` + +If you run tests that need `ignite-extensions`, clone it next to `ignite` in the same directory (see [Testing with Ignite Extensions](#testing-with-ignite-extensions)). + +### Step 4. Run the smoke test + +From here, follow [Quick Start](#quick-start-local-docker-run) steps 3–6 in the Ubuntu shell. In short: + +```bash +cd ~/ignite/modules/ducktests/tests +python -m venv ~/.virtualenvs/ignite-ducktests-dev +source ~/.virtualenvs/ignite-ducktests-dev/bin/activate +pip install -r docker/requirements-dev.txt +pip install -e . + +./docker/run_tests.sh -t ./ignitetest/tests/smoke_test.py::SmokeServicesTest.test_ignite_start_stop -n 3 --global-json '{"cluster_size": 2}' Review Comment: run in docker directory ########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. Review Comment: Git bash also works ########## modules/ducktests/README.md: ########## @@ -101,6 +102,100 @@ Always clean up and tear down active background nodes after your test runs finis --- +## Running on Windows + +Ducktests run on Windows through Docker Desktop and WSL2. One rule decides whether tests pass: + +> **Keep the Ignite checkout inside the WSL2 filesystem (for example `~/ignite`), not on a Windows drive (`C:\...`, seen from WSL2 as `/mnt/c/...`).** + +Every container mounts your checkout as `/opt/ignite-dev` and builds the node classpath from it, so starting a node reads thousands of files. Across the boundary between Windows and Linux those reads are slow. + +### Step 1. Install WSL2 and Docker Desktop + +1. Open PowerShell as Administrator and run `wsl --install -d Ubuntu`. Reboot if asked, then open Ubuntu from the Start menu and create your Linux user. +2. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). In its settings: + * General: enable **Use the WSL 2 based engine**. + * Resources -> WSL Integration: enable integration for your Ubuntu distro. + * Resources: give Docker at least 6 GB of memory for small runs such as the smoke test. Running the default 13 containers needs much more. + +### Step 2. Prepare the distro + +Run these commands in the Ubuntu shell: + +```bash +# Tools for building Ignite and running the test scripts +sudo apt update && sudo apt install -y openjdk-17-jdk maven git python3 python3-venv python-is-python3 + +# Let your user run docker without sudo +sudo usermod -aG docker $USER +``` + +Close the Ubuntu window, run `wsl --shutdown` in PowerShell, and open Ubuntu again so the group change takes effect. Then check the setup: + +```bash +docker ps # must print a (possibly empty) container list, without sudo +python --version # must print Python 3.8 or newer; the scripts call `python`, not `python3` +``` + +### Step 3. Get the code and build it + +Clone into your Linux home directory, not into `/mnt/c`: + +```bash +cd ~ +git clone https://github.com/apache/ignite.git +cd ignite +mvn clean install -DskipTests +./scripts/build-module.sh ducktests +``` + +If you run tests that need `ignite-extensions`, clone it next to `ignite` in the same directory (see [Testing with Ignite Extensions](#testing-with-ignite-extensions)). + +### Step 4. Run the smoke test + +From here, follow [Quick Start](#quick-start-local-docker-run) steps 3–6 in the Ubuntu shell. In short: + +```bash +cd ~/ignite/modules/ducktests/tests +python -m venv ~/.virtualenvs/ignite-ducktests-dev +source ~/.virtualenvs/ignite-ducktests-dev/bin/activate +pip install -r docker/requirements-dev.txt +pip install -e . + +./docker/run_tests.sh -t ./ignitetest/tests/smoke_test.py::SmokeServicesTest.test_ignite_start_stop -n 3 --global-json '{"cluster_size": 2}' +``` + +The first run builds the Docker image, which takes several minutes. Later runs reuse it. Review Comment: May be we should propose to comment some strings to not pull previous ignite versions, kafka, etc? It is very slow. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
