Skip to content

Commit 84a59c9

Browse files
Jordan-Williams2Jordan-Williams2
authored andcommitted
feat: watsonx self managed ocp
1 parent d65096f commit 84a59c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1123
-198
lines changed

.catalog-onboard-pipeline.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: v1
3+
offerings:
4+
- name: deploy-arch-ibm-watsonx-self-managed
5+
kind: solution
6+
catalog_id: 7df1e4ca-d54c-4fd0-82ce-3d13247308cd
7+
offering_id: 86425cf1-a763-4d17-9bb9-75276274a5f6
8+
variations:
9+
- name: fully-configurable
10+
mark_ready: true
11+
install_type: fullstack
12+
pre_validation: "tests/scripts/pre-validation-deploy-ocp-instances.sh"
13+
post_validation: "tests/scripts/post-validation-destroy-ocp-instances.sh"
14+
scc:
15+
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
16+
region: us-south

.releaserc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
}],
1111
["@semantic-release/exec", {
1212
"successCmd": "echo \"SEMVER_VERSION=${nextRelease.version}\" >> $GITHUB_ENV"
13+
}],
14+
["@semantic-release/exec",{
15+
"publishCmd": "./ci/trigger-catalog-onboarding-pipeline.sh --version=v${nextRelease.version}"
1316
}]
1417
]
1518
}

README.md

Lines changed: 129 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,140 @@
1-
<!-- Update this title with a descriptive name. Use sentence case. -->
2-
# IBM Cloud Pak for Data deployment on OpenShift
1+
# Watsonx (Self-Managed) on Red Hat OpenShift
32

4-
<!--
5-
Update status and "latest release" badges:
6-
1. For the status options, see https://terraform-ibm-modules.github.io/documentation/#/badge-status
7-
2. Update the "latest release" badge to point to the correct module's repo. Replace "terraform-ibm-module-template" in two places.
8-
-->
9-
[![Incubating (Not yet consumable)](https://img.shields.io/badge/status-Incubating%20(Not%20yet%20consumable)-red)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
10-
[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-cloudpak-data?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-cloudpak-data/releases/latest)
3+
[![Stable (With quality checks)](https://img.shields.io/badge/Status-Stable%20(With%20quality%20checks)-green)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
4+
[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/releases/latest)
115
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
126
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
137
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
148

9+
Deploy Watsonx services on an existing Red Hat OpenShift cluster.
10+
11+
<!--
12+
If this repo contains any reference architectures, uncomment the heading below and links to them.
13+
(Usually in the `/reference-architectures` directory.)
14+
See "Reference architecture" in Authoring Guidelines in the public documentation at
15+
https://terraform-ibm-modules.github.io/documentation/#/implementation-guidelines?id=reference-architecture
16+
-->
17+
<!-- ## Reference architectures -->
18+
19+
<!-- Below content is automatically populated via pre-commit hook -->
20+
<!-- BEGIN OVERVIEW HOOK -->
21+
## Overview
22+
* [terraform-ibm-watsonx-self-managed-ocp](#terraform-ibm-watsonx-self-managed-ocp)
23+
* [Examples](./examples)
24+
* [Basic example](./examples/basic)
25+
* [Contributing](#contributing)
26+
<!-- END OVERVIEW HOOK -->
27+
28+
## terraform-ibm-watsonx-self-managed-ocp
29+
30+
### Usage
31+
32+
```hcl
33+
module "watsonx_self_managed_ocp" {
34+
source = "terraform-ibm-modules/watsonx-self-managed-ocp/ibm"
35+
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
36+
ibmcloud_api_key = "xxxxxxxxxxxxxxxxx" # pragma: allowlist secret
37+
resource_group_id = "xxxxxxxxxxxxxxxxx"
38+
region = "us-south"
39+
prefix = "cp4d"
40+
cluster_name = "my-ocp-cluster"
41+
cluster_rg_id = "xxxxxxxxxxxxxxxxx"
42+
install_odf_cluster_addon = true
43+
watsonx_ai_install = true
44+
watsonx_data_install = true
45+
watson_assistant_install = true
46+
watson_discovery_install = true
47+
cpd_admin_password = "Passw0rd!" # pragma: allowlist secret
48+
cpd_entitlement_key = "entitlementKey"
49+
# Add other configuration options as needed
50+
}
51+
```
52+
53+
### Required IAM access policies
54+
55+
You need the following permissions to run this module.
56+
57+
* Account Management
58+
* **All Resource Groups** service
59+
* `Viewer` platform access
60+
* IAM Services
61+
* **Kubernetes Service** (OpenShift)
62+
* `Administrator` platform access
63+
* `Manager` service access
64+
* **VPC Infrastructure**
65+
* `Administrator` platform access
66+
* `Manager` service access
67+
* **Container Registry**
68+
* `Administrator` platform access
69+
* `Manager` service access
70+
71+
For more information on access and permissions, see [IBM Cloud IAM service roles and actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions).
72+
73+
<!-- Below content is automatically populated via pre-commit hook -->
74+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
75+
### Requirements
76+
77+
| Name | Version |
78+
|------|---------|
79+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
80+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >=1.79.1 |
81+
82+
### Modules
83+
84+
| Name | Source | Version |
85+
|------|--------|---------|
86+
| <a name="module_build_cpd_image"></a> [build\_cpd\_image](#module\_build\_cpd\_image) | ./deploy/cpd-image-build | n/a |
87+
| <a name="module_cloud_pak_deployer"></a> [cloud\_pak\_deployer](#module\_cloud\_pak\_deployer) | ./deploy/cloud-pak-deployer | n/a |
88+
| <a name="module_config"></a> [config](#module\_config) | ./deploy/cloud-pak-deployer/config | n/a |
89+
| <a name="module_watsonx_ai"></a> [watsonx\_ai](#module\_watsonx\_ai) | ./deploy/watsonx-ai | n/a |
90+
| <a name="module_watsonx_data"></a> [watsonx\_data](#module\_watsonx\_data) | ./deploy/watsonx-data | n/a |
91+
92+
### Resources
93+
94+
| Name | Type |
95+
|------|------|
96+
| [ibm_container_addons.odf_cluster_addon](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/container_addons) | resource |
97+
| [ibm_container_vpc_cluster.cluster_info](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_vpc_cluster) | data source |
98+
99+
### Inputs
100+
101+
| Name | Description | Type | Default | Required |
102+
|------|-------------|------|---------|:--------:|
103+
| <a name="input_cloud_pak_deployer_image"></a> [cloud\_pak\_deployer\_image](#input\_cloud\_pak\_deployer\_image) | Cloud Pak Deployer image to use. If `null`, the image will be built using Code Engine. | `string` | `null` | no |
104+
| <a name="input_cloud_pak_deployer_release"></a> [cloud\_pak\_deployer\_release](#input\_cloud\_pak\_deployer\_release) | Release of Cloud Pak Deployer version to use. View releases at: https://github.com/IBM/cloud-pak-deployer/releases. | `string` | `"v3.1.8"` | no |
105+
| <a name="input_cloud_pak_deployer_secret"></a> [cloud\_pak\_deployer\_secret](#input\_cloud\_pak\_deployer\_secret) | Secret for accessing the Cloud Pak Deployer image. If `null`, a default secret will be created # pragma: allowlist secret. | <pre>object({<br/> username = string<br/> password = string<br/> server = string<br/> email = string<br/> })</pre> | `null` | no |
106+
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of Red Hat OpenShift cluster to install watsonx onto | `string` | n/a | yes |
107+
| <a name="input_cluster_rg_id"></a> [cluster\_rg\_id](#input\_cluster\_rg\_id) | Resource group id of the cluster | `string` | n/a | yes |
108+
| <a name="input_code_engine_project_id"></a> [code\_engine\_project\_id](#input\_code\_engine\_project\_id) | If you want to use an existing project, you can pass the code engine project ID and the Cloud Pak Deployer build will be built within the existing project instead of creating a new one. | `string` | `null` | no |
109+
| <a name="input_code_engine_project_name"></a> [code\_engine\_project\_name](#input\_code\_engine\_project\_name) | If `cloud_pak_deployer_image` is `null`, it will build the image with code engine and store it within a private ICR registry. Provide a name if you want to set the name. If not defined, default will be `{prefix}-cpd-{random-suffix}`. | `string` | `null` | no |
110+
| <a name="input_cpd_accept_license"></a> [cpd\_accept\_license](#input\_cpd\_accept\_license) | When set to 'true', it is understood that the user has read the terms of the Cloud Pak license(s) and agrees to the terms outlined. | `bool` | `true` | no |
111+
| <a name="input_cpd_admin_password"></a> [cpd\_admin\_password](#input\_cpd\_admin\_password) | Password for the Cloud Pak for Data admin user. | `string` | n/a | yes |
112+
| <a name="input_cpd_entitlement_key"></a> [cpd\_entitlement\_key](#input\_cpd\_entitlement\_key) | Cloud Pak for Data entitlement key for access to the IBM Entitled Registry. Can be fetched from https://myibm.ibm.com/products-services/containerlibrary. | `string` | n/a | yes |
113+
| <a name="input_cpd_version"></a> [cpd\_version](#input\_cpd\_version) | Cloud Pak for Data version to install. Only version 5.x.x is supported, latest versions can be found [here](https://www.ibm.com/docs/en/cloud-paks/cp-data?topic=versions-cloud-pak-data). | `string` | `"5.0.3"` | no |
114+
| <a name="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | The IBM Cloud API key to deploy resources. | `string` | n/a | yes |
115+
| <a name="input_install_odf_cluster_addon"></a> [install\_odf\_cluster\_addon](#input\_install\_odf\_cluster\_addon) | Install the ODF cluster addon. | `bool` | `true` | no |
116+
| <a name="input_odf_config"></a> [odf\_config](#input\_odf\_config) | Configuration for the ODF addon. | `map(string)` | <pre>{<br/> "addSingleReplicaPool": "false",<br/> "billingType": "essentials",<br/> "clusterEncryption": "false",<br/> "disableNoobaaLB": "false",<br/> "enableNFS": "false",<br/> "encryptionInTransit": "false",<br/> "hpcsBaseUrl": "",<br/> "hpcsEncryption": "false",<br/> "hpcsInstanceId": "",<br/> "hpcsSecretName": "",<br/> "hpcsServiceName": "",<br/> "hpcsTokenUrl": "",<br/> "ignoreNoobaa": "true",<br/> "numOfOsd": "1",<br/> "ocsUpgrade": "false",<br/> "odfDeploy": "true",<br/> "osdDevicePaths": "",<br/> "osdSize": "512Gi",<br/> "osdStorageClassName": "ibmc-vpc-block-metro-10iops-tier",<br/> "prepareForDisasterRecovery": "false",<br/> "resourceProfile": "balanced",<br/> "taintNodes": "false",<br/> "useCephRBDAsDefaultStorageClass": "false",<br/> "workerNodes": "all",<br/> "workerPool": ""<br/>}</pre> | no |
117+
| <a name="input_odf_version"></a> [odf\_version](#input\_odf\_version) | Version of ODF to install. | `string` | `"4.16.0"` | no |
118+
| <a name="input_prefix"></a> [prefix](#input\_prefix) | A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 16 or fewer characters. | `string` | `null` | no |
119+
| <a name="input_region"></a> [region](#input\_region) | Region where resources will be created. To find your VPC region, use `ibmcloud is regions` command to find available regions. | `string` | n/a | yes |
120+
| <a name="input_resource_group"></a> [resource\_group](#input\_resource\_group) | Resource group to provision services within. If not defined, a resource group called `{prefix}-cpd` will be created. | `string` | `null` | no |
121+
| <a name="input_watson_assistant_install"></a> [watson\_assistant\_install](#input\_watson\_assistant\_install) | If watsonx.ai is being installed, also install watson assistant | `bool` | `false` | no |
122+
| <a name="input_watson_discovery_install"></a> [watson\_discovery\_install](#input\_watson\_discovery\_install) | If watsonx.ai is being installed, also install watson discovery | `bool` | `false` | no |
123+
| <a name="input_watsonx_ai_install"></a> [watsonx\_ai\_install](#input\_watsonx\_ai\_install) | Determine whether the watsonx.ai cartridge for the deployer will be installed | `bool` | `false` | no |
124+
| <a name="input_watsonx_ai_models"></a> [watsonx\_ai\_models](#input\_watsonx\_ai\_models) | List of watsonx.ai models to install. Information on the foundation models including pre-reqs can be found here - https://www.ibm.com/docs/en/cloud-paks/cp-data/5.0.x?topic=install-foundation-models. Use the ModelID as input | `list(string)` | <pre>[<br/> "ibm-granite-13b-instruct-v2"<br/>]</pre> | no |
125+
| <a name="input_watsonx_data_install"></a> [watsonx\_data\_install](#input\_watsonx\_data\_install) | Determine whether the watsonx.data cartridge for the deployer will be installed | `bool` | `false` | no |
15126

16-
This repository contains the following deployment on an Red Hat OpenShift cluster:
17-
- [IBM Cloud Pak for Data](./solutions/deploy)
127+
### Outputs
18128

19-
**NB:** These solutions are not intended to be called by one or more other modules since they contain a provider configurations, meaning they are not compatible with the `for_each`, `count`, and `depends_on` arguments. For more information see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers)
129+
| Name | Description |
130+
|------|-------------|
131+
| <a name="output_cloud_pak_deployer_image"></a> [cloud\_pak\_deployer\_image](#output\_cloud\_pak\_deployer\_image) | The Cloud Pak Deployer image used. |
132+
| <a name="output_cloud_pak_deployer_secret"></a> [cloud\_pak\_deployer\_secret](#output\_cloud\_pak\_deployer\_secret) | The secret used for accessing the Cloud Pak Deployer image. |
133+
| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | The name of the OpenShift cluster. |
134+
| <a name="output_code_engine_project_name"></a> [code\_engine\_project\_name](#output\_code\_engine\_project\_name) | The name of the code engine project that was created |
135+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
20136

21-
<!-- Leave this section as is so that your module has a link to local development environment set-up steps for contributors to follow -->
137+
<!-- Leave this section as is so that your module has a link to local development environment set up steps for contributors to follow -->
22138
## Contributing
23139

24140
You can report issues and request features for this module in GitHub issues in the module repo. See [Report an issue or request a feature](https://github.com/terraform-ibm-modules/.github/blob/main/.github/SUPPORT.md).

chart/cloud-pak-deployer/templates/install-job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
App: {{ .Values.deployer.prefix }}
88
annotations:
9-
# https://github.com/terraform-ibm-modules/terraform-ibm-cloudpak-data/issues/14
9+
# https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/issues/14
1010
checkov.io/skip1: CKV_K8S_10
1111
checkov.io/skip2: CKV_K8S_11
1212
checkov.io/skip3: CKV_K8S_12

chart/cloud-pak-deployer/templates/uninstall-job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
"helm.sh/hook": pre-delete
1010
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
1111
"helm.sh/hook-weight": "4"
12-
# https://github.com/terraform-ibm-modules/terraform-ibm-cloudpak-data/issues/14
12+
# https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/issues/14
1313
checkov.io/skip1: CKV_K8S_21
1414
checkov.io/skip2: CKV_K8S_30
1515
checkov.io/skip3: CKV_K8S_28

cra-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ CRA_TARGETS: [] # disable CRA since no SCC instance exists in the test account
1313
# # SCC_INSTANCE_ID: "" # The SCC instance ID to use to download profile for CRA scan. If not provided, a default global value will be used.
1414
# # SCC_REGION: "" # The IBM Cloud region that the SCC instance is in. If not provided, a default global value will be used.
1515
# CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs.
16-
# TF_VAR_prefix: "roks-cpd"
16+
# TF_VAR_prefix: "ocp-cpd"
1717
# TF_VAR_region: "au-syd"

solutions/deploy/cloud-pak-deployer/config/variables.tf renamed to deploy/cloud-pak-deployer/config/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ variable "cluster_name" {
44
}
55

66
variable "cpd_version" {
7-
default = "5.0.2"
8-
description = "Cloud Pak for Data version to install"
7+
default = "5.1.1"
8+
description = "Cloud Pak for Data version to install. Only version 5.x.x is supported, latest versions can be found [here](https://www.ibm.com/docs/en/cloud-paks/cp-data?topic=versions-cloud-pak-data)."
99
type = string
1010
}
1111

0 commit comments

Comments
 (0)