Skip to content

Files

Latest commit

 

History

History

IBM Cloud Pak for Data module

Incubating (Not yet consumable) latest release pre-commit Renovate enabled semantic-release

Install IBM Cloud Pak for Data and its services onto an existing Red Hat OpenShift cluster. The following services are currently supported:

  • watsonx.ai
  • Watson Assistant
  • Watson Discovery

Overview

terraform-ibm-cloudpak-data

Usage

module "cloudpak_data" {
  source                      = "../../solutions/deploy"
  ibmcloud_api_key            = var.ibmcloud_api_key        #pragma: allowlist secret
  prefix                      = var.prefix
  region                      = var.region
  cluster_name                = <OpenShift cluster name>
  cpd_admin_password          = <A password you would like to set for CP4D UI>
  cpd_entitlement_key         =  <Cloud Pak for Data entitlement key for access to the IBM Entitled Registry>
}

Required access policies

You need the following permissions to run this module:

  • Service
    • Resource group only
      • Viewer access on the specific resource group
    • Kubernetes service
      • Viewer platform access
      • Manager service access
    • **Code Engine service
      • Administrator platform access
      • Manager service access
    • **Container Registry service
      • Administrator platform access
      • Manager service access

Requirements

Name Version
terraform >= 1.9.0
external >= 2.3.4
helm >= 2.8.0, <3.0.0
ibm 1.78.0
shell 1.7.10

Modules

Name Source Version
build_cpd_image ./cpd-image-build n/a
cloud_pak_deployer ./cloud-pak-deployer n/a
config ./cloud-pak-deployer/config n/a
watsonx_ai ./watsonx-ai n/a
watsonx_data ./watsonx-data n/a

Resources

Name Type
ibm_container_addons.odf_cluster_addon resource
external_external.schematics data source
ibm_container_cluster_config.cluster_config data source
ibm_container_vpc_cluster.cluster_info data source
ibm_iam_auth_token.tokendata data source

Inputs

Name Description Type Default Required
cloud_pak_deployer_image Cloud Pak Deployer image to use. If null, the image will be built using Code Engine. string null no
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.3" no
cloud_pak_deployer_secret Secret for accessing the Cloud Pak Deployer image. If null, a default secret will be created # pragma: allowlist secret.
object({
username = string
password = string
server = string
email = string
})
null no
cluster_name Name of Red Hat OpenShift cluster to install watsonx onto string n/a yes
cluster_rg_id Resource group id of the cluster string n/a yes
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
code_engine_project_name If the variable 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
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
cpd_admin_password Password for the Cloud Pak for Data admin user. string n/a yes
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
cpd_version Cloud Pak for Data version to install. Only version 5.x.x is supported string "5.0.3" no
ibmcloud_api_key The IBM Cloud API key to deploy resources. string n/a yes
install_odf_cluster_addon Install the ODF cluster addon. bool true no
odf_config Configuration for the ODF addon. map(string)
{
"addSingleReplicaPool": "false",
"billingType": "essentials",
"clusterEncryption": "false",
"disableNoobaaLB": "false",
"enableNFS": "false",
"encryptionInTransit": "false",
"hpcsBaseUrl": "",
"hpcsEncryption": "false",
"hpcsInstanceId": "",
"hpcsSecretName": "",
"hpcsServiceName": "",
"hpcsTokenUrl": "",
"ignoreNoobaa": "true",
"numOfOsd": "1",
"ocsUpgrade": "false",
"odfDeploy": "true",
"osdDevicePaths": "",
"osdSize": "512Gi",
"osdStorageClassName": "ibmc-vpc-block-metro-10iops-tier",
"prepareForDisasterRecovery": "false",
"resourceProfile": "balanced",
"taintNodes": "false",
"useCephRBDAsDefaultStorageClass": "false",
"workerNodes": "all",
"workerPool": ""
}
no
odf_version Version of ODF to install. string "4.16.0" no
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
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
resource_group Resource group to provision services within. If not defined, a resource group called {prefix}-cpd will be created. string null no
resource_group_exists Resource group exists or not within the account. bool false no
watson_assistant_install If watsonx.ai is being installed, also install watson assistant bool false no
watson_discovery_install If watsonx.ai is being installed, also install watson discovery bool false no
watsonx_ai_install Determine whether the watsonx.ai cartridge for the deployer will be installed bool false no
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)
[
"ibm-granite-13b-instruct-v2"
]
no
watsonx_data_install Determine whether the watsonx.data cartridge for the deployer will be installed bool false no

Outputs

Name Description
cloud_pak_deployer_image The Cloud Pak Deployer image used.
cloud_pak_deployer_secret The secret used for accessing the Cloud Pak Deployer image.
cluster_name The name of the OpenShift cluster.
code_engine_project_name The name of the code engine project that was created

Contributing

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.

To set up your local development environment, see Local development setup in the project documentation.