Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
# This script run jetlag installer
echo "Update version: ansible/vars/ibmcloud.yml"
source /root/jetlag/bootstrap.sh
Expand All @@ -7,6 +8,8 @@ echo "CLEANUP >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
podman ps | awk '{print $1}' | xargs -I % podman stop %; podman ps -a | awk '{print $1}' | xargs -I % podman rm %; podman pod ps | awk '{print $1}' | xargs -I % podman pod rm %
echo "create ci pod"
/PerfDisk/ci_pod/./create_ci_pod.sh 1>/dev/null 2>&1
echo create inventory file should be done only once by the user
# ansible-playbook ansible/create-inventory.yml
echo "SETUP BASTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
ansible-playbook -i ansible/inventory/ibmcloud.local ansible/ibmcloud-setup-bastion.yml 2>&1 | tee jetlag.log
echo "INSTALLATION START >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# PerfCI Chaos OpenShift Deployment Environment Setup

This project automates the deployment of OpenShift cluster.

To run the deployment pipeline successfully, configure the required environment variables listed below.
1. Clone the Jetlag repository on the bastion server under `/root`. [https://github.com/redhat-performance/jetlag]
2. Copy run_jetlag.sh to the bastion server `/root/jetlag/` directory. [https://github.com/redhat-performance/benchmark-runner/blob/main/benchmark_runner/common/assisted_installer/jetlag/run_jetlag.sh]
3. Ensure the Jenkins agent has access to the bastion server with the necessary SSH keys and configurations.
4. Set up the environment variables as specified in the sections below.
5. Run first Jetlag installation using run_jetlag.sh and verify that no issues occur during installation.
6. All the steps including 'ansible-playbook ansible/create-inventory.yml' should be done manually for the first time.
- **Important:** Run the Jenkins agent on the bastion server.

---

## 🚨 Mandatory Environment Variables

| Variable | Description |
|------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| `INSTALL_OCP_VERSION` | Install OCP version, constant version `4.20.0` or latest-4.20.0-ec (dev)/ latest-4.20/ latest-4.20.0-rc (ga) |
| `OCP_BUILD` | Set to `'ga'/'dev'`. |
| `PROVISION_PRIVATE_KEY_FILE` | provision private key path (e.g. `/root/.ssh/id_rsa` ) |
| `PROVISION_IP` | provision ip |
| `PROVISION_USER` | provision user |
| `CLUSTER_TYPE` | cluster type `SNO` or MNO (default '' for MNO) |
| `EXPECTED_NODES` | expected nodes (e.g. { "master": ["master-0", "master-1", "master-2"], "worker": ["worker-0", "worker-1", "worker-2" ] }) |
| `OCP_CLIENT_VERSION` | ocp client version (e.g., `4.20.0`). |
| `QUAY_BENCHMARK_RUNNER_REPOSITORY` | benchmark-runner quay.io container (quay.io/benchmark-runner/benchmark-runner:latest) |
| `WORKSPACE` | Jenkins workspace `/home/jenkins` |
| `PROVISION_PORT` | provision port (e.g., `22`). |
| `KUBEADMIN_PASSWORD_PATH` | kubeadmin password path (e.g., `/root/.kube/kubeadmin-password`) |
| `KUBECONFIG_PATH` | kubeconfig path (e.g.,`/root/.kube/config`). |
| `PROVISION_INSTALLER_PATH` | provision installer path (e.g.,`/root/jetlag/./run_jetlag.sh`). |
| `PROVISION_INSTALLER_CMD` | provision installer cmd (e.g.,`pushd /root/jetlag;/root/jetlag/./run_jetlag.sh 1>/dev/null 2>&1;popd`). |
| `PROVISION_INSTALLER_LOG` | provision installer log for identify pass/fail installation (e.g.,`tail -100 /root/jetlag/jetlag.log`). |
| `INSTALLER_VAR_PATH` | provision installer vars (e.g.,`/root/jetlag/ansible/vars`). |
| `PRIVATE_KEY_PATH` | provision private key path (e.g.,`/home/jenkins/.ssh/provision_private_key`). |
| `CONFIG_PATH` | provision config path for remote connection (e.g.,`/home/jenkins/.ssh/config`). |
| `CONTAINER_PRIVATE_KEY_PATH` | benchmark-runner container private key path (e.g.,`/root/.ssh/provision_private_key`). |
| `CONTAINER_CONFIG_PATH` | benchmark-runner container config path (e.g.,`/root/.ssh/config`). |
| `ANSIBLE_TMP_PATH` | ansible tmp path for jetlag (e.g.,`/root/.ansible/tmp/`). |
| `PROVISION_TIMEOUT` | provision timeout (e.g.,`7200`). |
---
** For more environment details, refer to:
https://github.com/redhat-performance/benchmark-runner/blob/main/benchmark_runner/main/environment_variables.py---

## 🔧 Optional Environment Variables

| Variable | Description |
|-----------------------------|-------------|
| `CONTACT_EMAIL` | Jenkins job notification email (on job pass or fail). |

## 📌 Notes

- Use Jenkins credentials bindings to securely handle secret values.
- Ensure all paths and IPs are accessible from the Jenkins host.
- Always validate your environment variables before running the deployment pipeline.


---
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# PerfCI Chaos Operators Deployment Environment Setup

This project automates the deployment of operators on OpenShift clusters.

To run the deployment pipeline successfully, configure the required environment variables listed below.

- **Important:** Run the Jenkins agent on the bastion server.

---

## 🚨 Mandatory Environment Variables

| Variable | Description |
|------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `INSTALL_OCP_RESOURCES` | `'True'` for install operators |
| `CNV_NIGHTLY_CHANNEL` | Set to `'False'/'True'` to install cnv nightly, false for install stable cnv |
| `CNV_VERSION` | CNV version (e.g., `4.20`). |
| `LSO_VERSION` | LSO version (e.g., `4.20`). |
| `ODF_VERSION` | ODF version (e.g., `4.20`). |
| `PROVISION_USER` | bastion server user (e.g., `root`). |
| `PROVISION_IP` | bastion server ip. |
| `WORKER_DISK_IDS` | List of ODF disks per worker node (e.g., ` { "worker-0": ["62cea7f08e1581002d419c2310a03225" ], "worker-1": ["62cea7f05dfe4c002d419952a27cb38e"], "worker-2": ["62cea7f08df680002d419bc00c5b7bad"]}`). |
| `EXPECTED_NODES` | expected nodes for cluster nodes verification (e.g., `{ "master": ["master-0", "master-1", "master-2"], "worker": ["worker-0", "worker-1", "worker-2" ] }`). |
| `QUAY_BENCHMARK_RUNNER_REPOSITORY` | Default benchmark-runner quay.io image `quay.io/benchmark-runner/benchmark-runner:latest` . |
| `BMC_USER` | bastion server bmc user |
| `BMC_IPS` | bastion ips dictionary {} for 'nhc_far' operator |
| `KUBEADMIN_PASSWORD` | kubeadmin password ( e.g. `/home/jenkins/.kube/kubeadmin-password`) |
| `KUBEADMIN_PASSWORD_PATH` | kubeadmin password path ( e.g. `/home/jenkins/.kube/kubeadmin-password`) |
| `KUBECONFIG_PATH` | kubeaconfig path ( e.g. `/root/.kube/config`) |
| `PRIVATE_KEY_PATH` | provision private key path ( e.g. `/home/jenkins/.ssh/provision_private_key`) |
| `CONFIG_PATH` | provision config path ( e.g. `/home/jenkins/.ssh/config`) |
| `WORKSPACE` | provision workspace path ( e.g. `/home/jenkins`) |
| `CONTAINER_PRIVATE_KEY_PATH` | benchmark-runner container private key path ( e.g. `/root/.ssh/provision_private_key`) |
| `WORKER_DISK_IDS_PREFIX` | disk id prefix (e.g., `wwn-0x`) |
| `PROVISION_PORT` | provision part (e.g., `22`) |
| `NUM_ODF_DISK` | number of odf disks per worker node (e.g., `6`) |
| `PROVISION_TIMEOUT` | provision timeout (e.g., `3600`) |
---
** For more environment details, refer to:
https://github.com/redhat-performance/benchmark-runner/blob/main/benchmark_runner/main/environment_variables.py
---

## 🔧 Optional Environment Variables

| Variable | Description |
|-----------------------------|-------------|
| `CONTACT_EMAIL` | Jenkins job notification email (on job pass or fail). |

## 📌 Notes

- Use Jenkins credentials bindings to securely handle secret values.
- Ensure all paths and IPs are accessible from the Jenkins host.
- Always validate your environment variables before running the deployment pipeline.


---