Skip to content

Update Chaos jenkinsfiles #1010

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ebattat
Copy link
Collaborator

@ebattat ebattat commented Apr 7, 2025

Type of change

Note: Fill x in []

  • bug
  • enhancement
  • documentation
  • dependencies

Description

Update Choas Jenkinsfiles using Fedora VMs instead of Windows.
Removing extra code.

For security reasons, all pull requests need to be approved first before running any automated CI

@ebattat ebattat added the enhancement New feature or request label Apr 7, 2025
@ebattat ebattat requested a review from RobertKrawitz April 7, 2025 16:46
@ebattat ebattat self-assigned this Apr 7, 2025
@github-project-automation github-project-automation bot moved this to In progress in benchmark-runner Apr 7, 2025
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from 5e2775b to 983c495 Compare April 8, 2025 07:03
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from 983c495 to ab38bb7 Compare April 8, 2025 15:41
Copy link
Member

@RobertKrawitz RobertKrawitz left a comment

Choose a reason for hiding this comment

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

Have you tested this code and can confirm that it works with the quoting as is? A lot of it looks like it's wrong, but that may be groovy vs. bash.

@RobertKrawitz RobertKrawitz changed the title Update Chaos jenkisfiles Update Chaos jenkinsfiles Apr 9, 2025
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 6 times, most recently from 80b2bdd to ca5657c Compare April 18, 2025 04:20
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 3 times, most recently from 159f2e7 to 846d2a5 Compare April 28, 2025 05:52
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 2 times, most recently from 438d60d to dd46680 Compare April 28, 2025 13:35
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from dd46680 to 1f2bdad Compare April 28, 2025 13:40
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 2 times, most recently from cf9280d to 4ad0c56 Compare April 28, 2025 14:27
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 2 times, most recently from 8c86743 to ac96927 Compare April 28, 2025 15:14
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from ac96927 to e960460 Compare April 30, 2025 07:37
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from e960460 to 861233a Compare April 30, 2025 14:18
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 2 times, most recently from b68ee76 to f2c8143 Compare May 7, 2025 08:47
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 2 times, most recently from b6f9420 to 617e478 Compare May 20, 2025 16:40
Copy link
Member

@RobertKrawitz RobertKrawitz left a comment

Choose a reason for hiding this comment

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

"choas" => "chaos"

@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from 617e478 to 3a96ad9 Compare May 20, 2025 19:06
Copy link
Member

@RobertKrawitz RobertKrawitz left a comment

Choose a reason for hiding this comment

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

A few more "choas" typos.

@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 2 times, most recently from e4e0547 to f00cb1e Compare May 26, 2025 09:20
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from f00cb1e to af45c6b Compare May 29, 2025 11:55
@ebattat
Copy link
Collaborator Author

ebattat commented May 29, 2025

Hi @RobertKrawitz,
This is the final version.
I have added a README file for each sharing the Jenkinsfiles.
In addition, I have removed unnecessary environment variables.

Comment on lines 8 to 24
## 🔧 Optional Environment Variables

| Variable | Description |
|-----------------------------|-------------|
| `CONTACT_EMAIL1` | Jenkins job notification email (on job pass or fail). |
| `ELASTICSEARCH` | Elasticsearch URL. |
| `ELASTICSEARCH_PORT` | Elasticsearch port. |

## 🚨 Mandatory Environment Variables

| Variable | Description |
|------------------------------------|-------------------------------------------------------------------------------------------------|
| `WORKLOAD` | bootstorm_vm for running fedora37 vms |
| `QUAY_BENCHMARK_RUNNER_REPOSITORY` | Benchmark-runner image from Quay.io (e.g., `quay.io/benchmark-runner/benchmark-runner:latest`). |
| `KUBEADMIN_PASSWORD` | Path to kubeadmin-password on bastion (e.g., `/home/jenkins/.kube/kubeadmin-password`). |
| `KUBECONFIG_PATH` | Path to kubeconfig on bastion (e.g., `/root/.kube/config`). |
| `WORKSPACE` | Jenkins workspace path on bastion (e.g., `/home/jenkins`). |
| `DELETE_ALL` | Set to `'False'` to avoid deleting running VMs. |
| `RUN_STRATEGY` | Set to `'True'` to use `Always` runStrategy for NHC/SNR operators. |
| `RUN_TYPE` | Run type, typically `'chaos_ci'` for logs stamp. |
| `SCALE_NODES` | List of workload nodes to scale on (e.g., `["node-0", "node-1", "node-2"]`). |
| `BOOTSTORM_SCALE/SACLE` | Number of VMs to scale during bootstorm (e.g., `120`). |
| `THREADS_LIMIT` | Maximum number of parallel threads, check bastion number of Physical CPUs (e.g., `20`). |
| `TIMEOUT` | Timeout in seconds for operations (e.g., `7200`). |
| `WORKSPACE_PATH` | Full Jenkins job workspace (e.g., `${env.WORKSPACE}/workspace/${env.JOB_NAME}/`). |
Copy link
Member

Choose a reason for hiding this comment

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

Put mandatory variables first. Also, within each group sort the variable names.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment on lines 11 to 52
## 🔧 Optional Environment Variables
| Variable | Description |
| ------------------------------- | -------------------------------------------------------------------------------------- |
| `CONTACT_EMAIL1` | Jenkins job notification email (sent on job success or failure). |
| `ELASTICSEARCH` | Elasticsearch server URL. |
| `ELASTICSEARCH_PORT` | Port number used by the Elasticsearch server. |
| `GOOGLE_DRIVE_PATH` | Base URL of the Google Drive folder (e.g., `https://drive.google.com/drive/folders/`). |
| `GOOGLE_DRIVE_CREDENTIALS_FILE` | Content of the Google Drive service account credentials JSON file. |
| `GOOGLE_DRIVE_TOKEN_FILE` | Content of the Google Drive OAuth token JSON file. |
| `GOOGLE_CREDENTIALS_FILE` | File name of the credentials JSON (e.g., `credentials.json`). |
| `GOOGLE_TOKEN_FILE` | File name of the token JSON (e.g., `token.json`). |
| `GOOGLE_DESTINATION_PATH` | Local path where logs or files are temporarily stored (e.g., `/tmp`). |
| `GOOGLE_DRIVE_SHARED_DRIVE_ID` | ID of the root Google Drive folder (Shared Drive) where all logs are saved. |

## 🚨 Mandatory Environment Variables
| Variable | Description |
|-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `WORKLOAD` | Workload type; use `bootstorm_vm` to run Fedora 37 VMs. |
| `UPGRADE_OCP_VERSION` | Target OpenShift version for upgrade. (e.g. full version 4.18.13) |
| `CNV_VERSION` | Target version for the CNV Operator upgrade. (e.g. major version 4.18) |
| `LSO_VERSION` | Target version for the LSO Operator upgrade. (e.g. major version 4.18) |
| `ODF_VERSION` | Target version for the ODF Operator upgrade. (e.g. major version 4.18) |
| `UPGRADE_CHANNEL` | Upgrade channel: `stable` (default) or `candidate`. |
| `EXPECTED_NODES` | JSON defining expected master and worker node names after upgrade, e.g., `{ "master": ["node-0", "node-1", "node-2"], "worker": ["node-0", "node-1", "node-2"] }`. |
| `QUAY_BENCHMARK_RUNNER_REPOSITORY` | Benchmark-runner image from Quay.io (e.g., `quay.io/benchmark-runner/benchmark-runner:latest`). |
| `KUBEADMIN_PASSWORD` | Path to `kubeadmin-password` on the bastion host (e.g., `/home/jenkins/.kube/kubeadmin-password`). |
| `KUBECONFIG_PATH` / `PROVISION_KUBECONFIG_PATH` | Path to `kubeconfig` on the bastion host (e.g., `/root/.kube/config`). |
| `WORKSPACE` | Jenkins workspace path on the bastion host (e.g., `/home/jenkins`). |
| `DELETE_ALL` | Set to `'False'` to retain running VMs. |
| `RUN_STRATEGY` | Set to `'True'` to apply `Always` runStrategy for NHC/SNR operators. |
| `RUN_TYPE` | Run type identifier, typically `'chaos_ci'` for log stamping. |
| `SCALE_NODES` | List of workload nodes to scale on (e.g., `["node-0", "node-1", "node-2"]`). |
| `BOOTSTORM_SCALE/SACLE` | Number of VMs to scale during bootstorm (e.g., `120`). |
| `THREADS_LIMIT` | Maximum number of parallel threads; based on the number of physical CPUs on bastion, to verify vm status in parallel (e.g., `20`). |
| `TIMEOUT` | Timeout for operations in seconds (e.g., `7200`). |
| `WORKSPACE_PATH` | Full Jenkins job workspace path (e.g., `${env.WORKSPACE}/workspace/${env.JOB_NAME}/`). |
| `SAVE_ARTIFACTS_LOCAL` | `'True'` or `'False'` to save logs locally (default is `'False'`). |
| `VERIFICATION_ONLY` | `'True'` or `'False'`; when `'True'`, only verification is performed (default is `'True'`). |
| `KRKNHUB_MASTER_1_CPU_HOG_ENVIRONMENT_VARIABLES` | Environment variables for master CPU hog using krkn-hub:<br>[https://krkn-chaos.dev/docs/scenarios/hog-scenarios/cpu-hog-scenario/cpu-hog-scenario-krkn-hub/](https://krkn-chaos.dev/docs/scenarios/hog-scenarios/cpu-hog-scenario/cpu-hog-scenario-krkn-hub/) |
| `KRKNHUB_MASTER_0_NODE_FAILURE_ENVIRONMENT_VARIABLES` | Environment variables for master node failure using krkn-hub:<br>[https://krkn-chaos.dev/docs/scenarios/node-scenarios/](https://krkn-chaos.dev/docs/scenarios/node-scenarios/) |
| `KRKNHUB_WORKER_1_CPU_HOG_ENVIRONMENT_VARIABLES` | Environment variables for worker CPU hog using krkn-hub:<br>[https://krkn-chaos.dev/docs/scenarios/hog-scenarios/cpu-hog-scenario/cpu-hog-scenario-krkn-hub/](https://krkn-chaos.dev/docs/scenarios/hog-scenarios/cpu-hog-scenario/cpu-hog-scenario-krkn-hub/) |
| `KRKNHUB_WORKER_0_NODE_FAILURE_ENVIRONMENT_VARIABLES` | Environment variables for worker node failure using krkn-hub:<br>[https://krkn-chaos.dev/docs/scenarios/node-scenarios/](https://krkn-chaos.dev/docs/scenarios/node-scenarios/) |
Copy link
Member

Choose a reason for hiding this comment

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

Put mandatory variables first. Also, why is the email address CONTACT_EMAIL1 rather than CONTACT_EMAIL?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done,
CONTACT_EMAIL1 because we can have more than one CONTACT_EMAIL

Copy link
Member

Choose a reason for hiding this comment

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

What other contact emails would there be?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently I have added only my email, we can add more emails in the future

Copy link
Member

Choose a reason for hiding this comment

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

Would additional emails be used for different purposes? If it's just to allow for multiple addresses, allow CONTACT_EMAIL to be a comma or space separated list of email addresses.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated in all the places CONTACT_EMAIL1 => CONTACT_EMAIL

@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch 2 times, most recently from 8a6bbbc to 3273532 Compare May 30, 2025 18:17
@ebattat ebattat force-pushed the update_chaos_jenkisfiles branch from 3273532 to ddda202 Compare May 30, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants