You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Bash script is designed to set up and test environments for Data Science Pipelines Operator (DSPO)
98
+
using Kubernetes (K8s) or *OpenShift with RHOAI deployed*. It includes functionalities to deploy dependencies,
99
+
configure namespaces, build and deploy images, and execute integration tests.
100
+
101
+
## **Features**
102
+
1.**Environment Variables Declaration**:
103
+
The script requires and verifies environment variables such as `GIT_WORKSPACE`, `REGISTRY_ADDRESS`, and `K8SAPISERVERHOST`. These variables define the workspace, registry for container images, and K8s API server address.
104
+
105
+
2.**Deployment Functions**:
106
+
Functions like `deploy_dspo`, `deploy_minio`, and `deploy_mariadb` handle deploying necessary components (e.g., MinIO, MariaDB, PyPI server) to the cluster.
107
+
108
+
3.**Namespace Configuration**:
109
+
Functions like `create_opendatahub_namespace` and `create_dspa_namespace` create and configure Kubernetes namespaces required for DSPO and other dependencies.
110
+
111
+
4.**Integration Testing**:
112
+
The script provides commands to run integration tests for DSPO and its external connections using `run_tests` and `run_tests_dspa_external_connections`.
113
+
114
+
5.**Cleanup and Resource Removal**:
115
+
Includes options like `--clean-infra` to remove namespaces and resources before running tests.
116
+
117
+
6.**Conditional Execution**:
118
+
Supports setting up and testing environments for different targets:
119
+
-`kind` (local Kubernetes clusters)
120
+
-`rhoai` (Red Hat OpenShift AI)
121
+
122
+
7.**Customizable Parameters**:
123
+
Allows passing values for paths, namespaces, and K8s API server via command-line arguments.
124
+
125
+
## **Usage**
126
+
```bash
127
+
./tests.sh [OPTIONS]
128
+
```
129
+
130
+
### **Options**
131
+
-`--kind`
132
+
Targets local `kind` cluster.
133
+
-`--rhoai`
134
+
Targets RHOAI
135
+
-`--clean-infra`
136
+
Cleans existing resources before running tests.
137
+
-`--k8s-api-server-host <HOST>`
138
+
Specifies the Kubernetes API server host.
139
+
-`--dspa-namespace <NAMESPACE>`
140
+
Custom namespace for DSPA deployment.
141
+
-`--dspa-path <PATH>`
142
+
Path to DSPA resource YAML.
143
+
-`--endpoint-type <TYPE>`
144
+
Specifies endpoint type (`service` or `route`).
145
+
146
+
### **Example**
147
+
To deploy and test DSPA on a local `kind` cluster:
0 commit comments