Support Db2 storage class, accessmode & capacity settings via the CLI
We have an instance where we needed to add DB2 to a cluster with existing MAS instances already using Oracle database. The same storage classes that were used by the core installer (Mongodb, UDS, etc) were not working for DB2. To get DB2 to install, we had to use the OCS storage classes. So, we were unable to use the mas install command with parameters to setup the new instance and had run each task manually.
Reference: SF case TS016037927
It seems that exporting appropriate variables and then running mas install does not work for @pwcscott:
export DB2_LOGS_STORAGE_CLASS=xxx
export DB2_DATA_STORAGE_CLASS=xxx
export DB2_META_STORAGE_CLASS=xxx
export DB2_TEMP_STORAGE_CLASS=xxx
mas install
What storage classes were you using that didn't work specifically for Db2 only / in what way didn't they work?
Our Original installations used the following: RWO managed-premium RWX azure-file-sc
For DB2 to work, we had to configure OpenShift Container storage on Azure. RWO ocs-storagecluster-cephfs-rbd RWX ocs-storagecluster-cephfs
Interesting. We can look to add an advanced mode where users can customise the db2 storage classes to override the default rwx/rwo choices in the same prompt where we allow them to override the storage capacities.
e.g. this part of the CLI can be updated to be Customize storage and offer up capacity, accessmode, and storageclass prompts.
if self.yesOrNo("Customize storage capacity"):
self.promptForString(" + Data Volume", "db2_data_storage_size", default=self.getParam("db2_data_storage_size"))
self.promptForString(" + Temporary Volume", "db2_temp_storage_size", default=self.getParam("db2_temp_storage_size"))
self.promptForString(" + Metadata Volume", "db2_meta_storage_size", default=self.getParam("db2_meta_storage_size"))
self.promptForString(" + Transaction Logs Volume", "db2_logs_storage_size", default=self.getParam("db2_logs_storage_size"))
self.promptForString(" + Backup Volume", "db2_backup_storage_size", default=self.getParam("db2_backup_storage_size"))
We will then need some changes in the pipeline and task definitions to handle "use storage_class_rwx/o only if the specific db2 storage classes aren't defined"