After you install Db2, you can
optionally create more Db2 service instances in the operands project.
If you are a IBM® Software
Hub user, you can use the
web client to create service instances. The web client guides you through the process of creating
service instances.
- Who needs to complete this task?
- To create a service instance from the web client, you must have the Create service
instances permission in IBM Software
Hub.
- When do you need to complete this task?
- Complete this task only if you want to create a service instance from the web client.
Alternative methods for creating a service instance
Before you begin
This task assumes that the following prerequisites are met:
| Prerequisite |
Where to find more information |
| Db2 is installed. |
If this task is not complete, see Installing Db2. |
| If you plan to deploy on a dedicated node, you must label the node. You will enter the
label during the deployment process. |
If this task is not complete, see Setting up dedicated nodes for your Db2 deployment. |
Optional: You can upgrade your license from Db2 Community Edition to Db2 Advanced Edition.
With Db2 Advanced Edition, you can get the following benefits:
-
No Resource Limits
Db2 Advanced Edition has no restrictions on
resources including CPU and memory.
-
Support High Availability and Disaster Recovery (HADR)
Advanced Edition supports HADR which is not available in the Community Edition.
-
Access IBM Support
Unlike the Community Edition, Db2 Advanced
Edition provides access to IBM's support services.
|
To learn more about upgrading your license, see Upgrading the license before you deploy Db2. |
Procedure
To create a service instance:
- From the navigation menu, select .
- Click Create a database.
- Select the database type and version. Click Next.
- On the Configure page, specify the number of nodes, memory per
node, and CPU per node.
Attention: If you use
Portworx or
OpenShift
Data Foundation storage, you must select
4K sector size. For more information, see
Storage
requirements.
The console checks your OpenShift cluster
for adequate memory and CPU resources to meet your specifications. An error message displays if
inadequate resources are found. If this occurs, you must either reduce the amounts that you
specified or add more resources to the cluster.
- If you are using a dedicated node, click Deploy database on dedicated
nodes and enter the node label in the Value for node label
box.
Note: The following warning
banner might show up:
A valid dedicated node with label "{label}" was not found. No
available nodes are labeled and tainted.
On occasion, this warning banner might be
translucent and the message hard to read. If so, refresh the page.
For more information, see Setting up dedicated nodes for your Db2 deployment.
- On the Advanced configuration page:
- If vault is enabled, the Credentials page will automatically
appear. Clusters without vault enabled default to generating a Kubernetes secret for each instance created. If you would like
to still deploy an instance that uses the default method, select Generate a Kubernetes
secret. If you would like to use existing credentials in a secret you have added to an external
HashiCorp or CyberArk vault, or existing credentials in a secret you have created in the internal
vault, select Use secrets from a vault.
Follow one of the following options that match your environment:
- You have no existing secrets, but you have an existing vault: An Add secret button will show with disabled dropdowns. If you
select Add secret, it will open a new tab and take you to the
Configuration page where you should see a Vaults and
secrets tab. Select Secrets on that tab, and then Add
secret.
Ask
your administrator to share a secret with you.
- You have no existing secrets or existing vaults, but you do have permission to add vaults: In the first option, it does not matter if you have this permission because a vault already
exists. In this option, you must either ask your administrator to share a secret with you and then
click Reload, or you can select the Add vault button.
This will open a new tab to the page where you can add an external HashiCorp or CyberArk vault, and
then either add a secret on that tab or click Reload on the first tab, which
will reload to the first situation.
- You have no existing secrets or existing vaults, and you do not have permission to add
vaults: In this case, you can only ask your administrator to share a secret with you. Once a secret is
shared, click Reload to enable dropdowns.
The dropdowns that might be visible are Password and/or SSL
certificate, depending on what is enabled in your environment. All dropdowns available
must select a secret in order to continue.
When creating or adding a new secret, ensure it follows these guidelines, which are also present
in the informational tips next to each dropdown:
- The Password dropdown is filtered to display only credential secrets. The
selected credential must include a password key.
- The SSL certificate dropdown is filtered to display only generic secrets.
The selected generic secret must include three name-value pairs with the keys:
ca.crt, tls.crt, and tls.key.
On the Finalize page, ensure all the information under the
Credentials section is correct.
For more information on creating and managing secrets in a vault, see Configuring vault usage.
- You can choose to keep your system data, user data, backup data, transaction logs,
archive logs, and temporary table space data together in a single storage location, or put
them in separate locations. System data contains the information that is used by Db2 to manage and configure the database. User
data is the main database data. Backup data is the storage for saving Db2 backup images. Transaction logs storage is
the location to save main database transaction logs. Archive logs storage is the location to
save database archive logs. Temporary table space storage is the location where main database
temporary table spaces are created.
Remember:
meta is the shared (RWX) volume for Db2 metadata, also
referenced as System Data.
data is the non-shared (RWO) volume for database storage, also referenced as
User data.
- Specify the storage to use for the database.
- Click Next.
- Optional: Specify a new display name for the database. The new name must be
unique amongst all existing database deployments.
- Ensure that the summary is correct and click
Create.
The database is ready when it shows up as
Available on the Databases tab.
- Optional: After deploying, if you want to upgrade the Db2 license from Db2 Community Edition to Db2 Advanced Edition, follow the steps in Upgrading the license of a deployed Db2 service.
What to do next
As a database administrator, you can: