-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Test] Add a feature to start workspaces in separate namespaces (#22901)
- Loading branch information
1 parent
817ddaf
commit bc658b5
Showing
6 changed files
with
172 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
# Overview | ||
This script tests how well OpenShift environment can handle running simultaneously many of workspaces. It evaluates the performance of the system under test by checking the average results across all pods and identifying failures that occur during the testing process. | ||
This script tests the performance of an OpenShift environment by running multiple workspaces simultaneously. It evaluates the system under test by checking the average results across all pods and identifying any failures that occur during the testing process. | ||
|
||
## Prerequisites | ||
What do you need to run those tests | ||
- `kubectl` client installed | ||
- Openshift cluster with running Openshift DevSpaces | ||
- test user logged into DevSpaces Dashboard(this quaranies that user namespaces are created) | ||
To run these tests, you will need: | ||
- The `kubectl` client installed | ||
- An OpenShift cluster with running OpenShift DevSpaces | ||
- A test user logged into the DevSpaces Dashboard (this ensures that user namespaces are created) | ||
|
||
## Running load tests | ||
1. Log in to Openshift cluster with Openshift DevSpaces or Eclipse Che deployed from terminal | ||
2. Start `load-test.sh` script from `test/e2e/performance/load-tests`. Set number of started workspaces by -c parameter(like ./load-test.sh -c 5). Set timeout for waiting workspaces to start by -t parameter in seconds(like ./load-test.sh -t 240). | ||
3. This script uses local dewvorspace.yaml to starts workspaces. | ||
4. Also it is possible to get test devworkspace yam file by link using -l option(like `./load-test.sh -l https://gist.githubusercontent.com/SkorikSergey/1856af20514ecce6c0dbb71f44fc0bcb/raw/3f6a38f0f6adf017dcecf6486ffe507ebe6cfc31/load-test-devworkspace.yaml)`. | ||
5. As results there are average time of workspace starting and number of failed workspaces. | ||
|
||
Follow these steps to run the load tests: | ||
1. Log in to the OpenShift cluster with OpenShift DevSpaces or Eclipse Che deployed from the terminal. | ||
2. Start the `load-test.sh` script from `test/e2e/performance/load-tests`. Set the number of workspaces to start using the `-c` parameter (e.g., `./load-test.sh -c 5`). Set the timeout for waiting for workspaces to start using the `-t` parameter in seconds (e.g., `./load-test.sh -t 240`). | ||
3. This script uses the local `example.yaml` file to start the workspaces. | ||
4. Alternatively, you can provide a link to the test devworkspace YAML file using the `-l` argument (e.g., `./load-test.sh -l https://raw.githubusercontent.com/eclipse/che/main/tests/performance/load-tests/samples/simple-with-editor-pvc.yaml`). | ||
5. If you want to start workspaces in separate namespaces (one workspace per namespace), use the `-s` as flag option (e.g., `./load-test.sh -s `). | ||
6. The script will provide the average time for workspace starting and the number of failed workspaces. | ||
|
||
## Results and logs | ||
If workspace failed to start, logs are saved in current directory. | ||
If a workspace fails to start, the logs will be saved in the `logs` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
kind: DevWorkspace | ||
apiVersion: workspace.devfile.io/v1alpha2 | ||
metadata: | ||
name: code-latest | ||
spec: | ||
started: true | ||
template: | ||
components: | ||
- name: dev | ||
container: | ||
image: quay.io/devfile/universal-developer-image:latest |
22 changes: 22 additions & 0 deletions
22
tests/performance/load-tests/samples/simple-with-editor-ephemeral.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
kind: DevWorkspace | ||
apiVersion: workspace.devfile.io/v1alpha2 | ||
metadata: | ||
name: code-latest | ||
spec: | ||
started: true | ||
template: | ||
attributes: | ||
controller.devfile.io/storage-type: ephemeral | ||
components: | ||
- name: dev | ||
container: | ||
image: quay.io/devfile/universal-developer-image:latest | ||
contributions: | ||
- name: che-code | ||
uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml | ||
components: | ||
- name: che-code-runtime-description | ||
container: | ||
env: | ||
- name: CODE_HOST | ||
value: 0.0.0.0 |
20 changes: 20 additions & 0 deletions
20
tests/performance/load-tests/samples/simple-with-editor-pvc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
kind: DevWorkspace | ||
apiVersion: workspace.devfile.io/v1alpha2 | ||
metadata: | ||
name: code-latest | ||
spec: | ||
started: true | ||
template: | ||
components: | ||
- name: dev | ||
container: | ||
image: quay.io/devfile/universal-developer-image:latest | ||
contributions: | ||
- name: che-code | ||
uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml | ||
components: | ||
- name: che-code-runtime-description | ||
container: | ||
env: | ||
- name: CODE_HOST | ||
value: 0.0.0.0 |