|
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 |
3 | 2 |
|
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 |
| -[-red)](https://terraform-ibm-modules.github.io/documentation/#/badge-status) |
10 |
| -[](https://github.com/terraform-ibm-modules/terraform-ibm-cloudpak-data/releases/latest) |
| 3 | +[-green)](https://terraform-ibm-modules.github.io/documentation/#/badge-status) |
| 4 | +[](https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/releases/latest) |
11 | 5 | [](https://github.com/pre-commit/pre-commit)
|
12 | 6 | [](https://renovatebot.com/)
|
13 | 7 | [](https://github.com/semantic-release/semantic-release)
|
14 | 8 |
|
| 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 | +* [Submodules](./modules) |
| 24 | +* [Examples](./examples) |
| 25 | + * [Basic example](./examples/basic) |
| 26 | +* [Contributing](#contributing) |
| 27 | +<!-- END OVERVIEW HOOK --> |
| 28 | + |
| 29 | +## terraform-ibm-watsonx-self-managed-ocp |
| 30 | + |
| 31 | +### Usage |
| 32 | + |
| 33 | +```hcl |
| 34 | +module "watsonx_self_managed_ocp" { |
| 35 | + source = "terraform-ibm-modules/watsonx-self-managed-ocp/ibm" |
| 36 | + version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release |
| 37 | + ibmcloud_api_key = "xxxxxxxxxxxxxxxxx" # pragma: allowlist secret |
| 38 | + resource_group_id = "xxxxxxxxxxxxxxxxx" |
| 39 | + region = "us-south" |
| 40 | + prefix = "cp4d" |
| 41 | + cluster_name = "my-ocp-cluster" |
| 42 | + cluster_rg_id = "xxxxxxxxxxxxxxxxx" |
| 43 | + install_odf_cluster_addon = true |
| 44 | + watsonx_ai_install = true |
| 45 | + watsonx_data_install = true |
| 46 | + watson_assistant_install = true |
| 47 | + watson_discovery_install = true |
| 48 | + cpd_admin_password = "Passw0rd!" # pragma: allowlist secret |
| 49 | + cpd_entitlement_key = "entitlementKey" |
| 50 | + # Add other configuration options as needed |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +### Required IAM access policies |
| 55 | + |
| 56 | +You need the following permissions to run this module. |
| 57 | + |
| 58 | +* Account Management |
| 59 | + * **All Resource Groups** service |
| 60 | + * `Viewer` platform access |
| 61 | +* IAM Services |
| 62 | + * **Kubernetes Service** (OpenShift) |
| 63 | + * `Administrator` platform access |
| 64 | + * `Manager` service access |
| 65 | + * **VPC Infrastructure** |
| 66 | + * `Administrator` platform access |
| 67 | + * `Manager` service access |
| 68 | + * **Container Registry** |
| 69 | + * `Administrator` platform access |
| 70 | + * `Manager` service access |
| 71 | + |
| 72 | +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). |
| 73 | + |
| 74 | +<!-- Below content is automatically populated via pre-commit hook --> |
| 75 | +<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 76 | +### Requirements |
| 77 | + |
| 78 | +| Name | Version | |
| 79 | +|------|---------| |
| 80 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 | |
| 81 | +| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >=1.79.1 | |
| 82 | + |
| 83 | +### Modules |
| 84 | + |
| 85 | +| Name | Source | Version | |
| 86 | +|------|--------|---------| |
| 87 | +| <a name="module_build_cpd_image"></a> [build\_cpd\_image](#module\_build\_cpd\_image) | ./modules/cpd-image-build | n/a | |
| 88 | +| <a name="module_cloud_pak_deployer"></a> [cloud\_pak\_deployer](#module\_cloud\_pak\_deployer) | ./modules/cloud-pak-deployer | n/a | |
| 89 | +| <a name="module_config"></a> [config](#module\_config) | ./modules/cloud-pak-deployer/config | n/a | |
| 90 | +| <a name="module_watsonx_ai"></a> [watsonx\_ai](#module\_watsonx\_ai) | ./modules/watsonx-ai | n/a | |
| 91 | +| <a name="module_watsonx_data"></a> [watsonx\_data](#module\_watsonx\_data) | ./modules/watsonx-data | n/a | |
| 92 | + |
| 93 | +### Resources |
| 94 | + |
| 95 | +| Name | Type | |
| 96 | +|------|------| |
| 97 | +| [ibm_container_addons.odf_cluster_addon](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/container_addons) | resource | |
| 98 | +| [ibm_container_vpc_cluster.cluster_info](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_vpc_cluster) | data source | |
| 99 | + |
| 100 | +### Inputs |
| 101 | + |
| 102 | +| Name | Description | Type | Default | Required | |
| 103 | +|------|-------------|------|---------|:--------:| |
| 104 | +| <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 | |
| 105 | +| <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 | |
| 106 | +| <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 | |
| 107 | +| <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 | |
| 108 | +| <a name="input_cluster_rg_id"></a> [cluster\_rg\_id](#input\_cluster\_rg\_id) | Resource group id of the cluster | `string` | n/a | yes | |
| 109 | +| <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 | |
| 110 | +| <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 | |
| 111 | +| <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 | |
| 112 | +| <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 | |
| 113 | +| <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 | |
| 114 | +| <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 | |
| 115 | +| <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 | |
| 116 | +| <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 | |
| 117 | +| <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 | |
| 118 | +| <a name="input_odf_version"></a> [odf\_version](#input\_odf\_version) | Version of ODF to install. | `string` | `"4.16.0"` | no | |
| 119 | +| <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 | |
| 120 | +| <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 | |
| 121 | +| <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 | |
| 122 | +| <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 | |
| 123 | +| <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 | |
| 124 | +| <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 | |
| 125 | +| <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 | |
| 126 | +| <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 | |
15 | 127 |
|
16 |
| -This repository contains the following deployment on an Red Hat OpenShift cluster: |
17 |
| -- [IBM Cloud Pak for Data](./solutions/deploy) |
| 128 | +### Outputs |
18 | 129 |
|
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) |
| 130 | +| Name | Description | |
| 131 | +|------|-------------| |
| 132 | +| <a name="output_cloud_pak_deployer_image"></a> [cloud\_pak\_deployer\_image](#output\_cloud\_pak\_deployer\_image) | The Cloud Pak Deployer image used. | |
| 133 | +| <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. | |
| 134 | +| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | The name of the OpenShift cluster. | |
| 135 | +| <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 | |
| 136 | +<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
20 | 137 |
|
21 |
| -<!-- Leave this section as is so that your module has a link to local development environment set-up steps for contributors to follow --> |
| 138 | +<!-- Leave this section as is so that your module has a link to local development environment set up steps for contributors to follow --> |
22 | 139 | ## Contributing
|
23 | 140 |
|
24 | 141 | 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).
|
|
0 commit comments