Skip to content

[minor] Add external database support for AIService - #2427

Merged
whitfiea merged 22 commits into
masterfrom
masaib-2388
Jul 6, 2026
Merged

[minor] Add external database support for AIService#2427
whitfiea merged 22 commits into
masterfrom
masaib-2388

Conversation

@Divyesh-Khokhar

@Divyesh-Khokhar Divyesh-Khokhar commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds support for external databases (Oracle, SQL Server, external DB2) to AI Service installation commands, allowing users to bring their own database instead of requiring in-cluster DB2 installation. And fix test failure as well for AIService.

Changes

New CLI Flags

Standalone Command: mas aiservice-install

--db2-aiservice                      # Install DB2 in-cluster (optional flag)
--aiservice-db-jdbc-url <url>        # External database JDBC URL
--aiservice-db-username <username>   # External database username
--aiservice-db-password <password>   # External database password
--aiservice-db-ca-cert <pem-cert>    # External database CA certificate content in PEM format (optional)

Combined Command: mas install

Same flags available when installing AI Service via mas install command.

Usage Examples

Install with in-cluster DB2 (default - no flags needed):

mas aiservice-install \
  --mas-instance-id mymas \
  --aiservice-instance-id aiservice1

Install with in-cluster DB2 (explicit):

mas aiservice-install \
  --mas-instance-id mymas \
  --aiservice-instance-id aiservice1 \
  --db2-aiservice

Install with external database (Oracle, SQL Server, or DB2):

mas aiservice-install \
  --mas-instance-id mymas \
  --aiservice-instance-id aiservice1 \
  --aiservice-db-jdbc-url "jdbc:oracle:thin:@//oracle.example.com:1521/ORCL" \
  --aiservice-db-username aiservice_user \
  --aiservice-db-password "mypassword" \
  --aiservice-db-ca-cert "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----"

Note: The same command structure works for SQL Server and DB2 - just change the JDBC URL:

  • SQL Server: jdbc:sqlserver://hostname:1433;databaseName=aiservice
  • DB2: jdbc:db2://hostname:50000/aiservice

Interactive Mode Support

Step 1: Database Configuration Choice

14) Database Configuration
By default, DB2 will be installed in-cluster (suitable for development and testing).
Alternatively, you can connect to an external database (Oracle, SQL Server, or DB2).

Do you want to use an external database? [y/n]

If user selects 'n' (In-cluster DB2):

Db2 Universal Operator for v12 onwards requires a License activation key
If you don't have a license, press enter to continue.

If user selects 'y' (External Database):

14.1) External Database Configuration
Provide connection details for your external database.

JDBC URL Examples:
  Oracle:     jdbc:oracle:thin:@//hostname:1521/servicename
  SQL Server: jdbc:sqlserver://hostname:1433;databaseName=aiservice
  DB2:        jdbc:db2://hostname:50000/database

Database JDBC URL: [user input]
Database Username: [user input]
Database Password: [hidden input]
Does the database use SSL/TLS with a self-signed certificate? [y/n]

If SSL/TLS with self-signed certificate is selected:

Database CA Certificate (PEM format): [user input - paste PEM certificate content directly]

Test results

AIService with MAS and Manage install pipeline:
Screenshot 2026-06-25 at 7 06 09 PM

Standalone AIService install pipeline:
Screenshot 2026-06-25 at 7 27 03 PM

Related PRs

ibm-mas/ansible-devops#2336
ibm-mas/python-devops#404

Related Issues

https://jsw.ibm.com/browse/MASAIB-2388

@Divyesh-Khokhar Divyesh-Khokhar changed the title [patch] Add external database support for CLI [patch] Add external database support for AIService Jun 24, 2026
@Divyesh-Khokhar
Divyesh-Khokhar marked this pull request as ready for review July 2, 2026 08:46
@Divyesh-Khokhar
Divyesh-Khokhar requested a review from a team as a code owner July 2, 2026 08:46
@Divyesh-Khokhar
Divyesh-Khokhar requested a review from whitfiea July 2, 2026 08:58
@whitfiea whitfiea changed the title [patch] Add external database support for AIService [minor] Add external database support for AIService Jul 6, 2026
@whitfiea
whitfiea merged commit f51f839 into master Jul 6, 2026
11 checks passed
@whitfiea
whitfiea deleted the masaib-2388 branch July 6, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants