db_create
Creates a new database. A database with this name or UUID must not already exist.
Mandatory parameters
Parameter name | Data type | Description |
---|---|---|
db_name | string | Unique name of the new database |
version | string | Version of the database, e.g. "8.0.0" |
data_volume_name | string | Volume name for the database data. The volume must be created beforehand. This parameter may be substituted by data_volume_id. |
mem_size | string | Amount of memory (RAM) allocated to the database in MiB, GiB, or TiB, e.g. "2048 MiB" |
nodes | list | List of active and reserved node IDs for this database. The node IDs are integers. |
num_active_nodes | integer | Number of active nodes in the database |
Optional parameters
Parameter name | Data type | Description |
---|---|---|
db_uuid | string | UUID for the database cluster in base64 format. Name is used as fallback if it is a valid UUID. |
data_volume_id | integer | Volume ID for the database data. data_volume_id can substitute data_volume_name. If both data_volume_id and data_volume_name are specified, data_volume_id is used instead. |
port | integer | Port that the database is reachable on. If no port is specified, the database is created with port 8563 |
owner | tuple, list | Owner of the new database, either (user id, group id) or (user name, group name). Defaults to ("exadefusr", "exausers"). |
params | string | A space-seperated list of extra database parameters that are set when the database is created. In general, parameters are in the format "-param=value", e.g. "-param1=1 -param2=0" |
enable_auditing | boolean | Enables or disables auditing for the database. The default value is True. |
ldap_server | string | Comma-separated list of LDAP Servers to use for remote database authentication, e.g. "ldap[s]://192.168.16.10". Each server must start with "ldap://" or "ldaps://". |
cloud_data_volume_name | string | The name of the cloud-based storage volume to use (e.g. "DataVolume3"). The volume must be created beforehand. |
snapshot_sync_volume | string | The name of the cloud-based snapshot sync volume to use (e.g. "SnapshotSyncVolume1"). The volume must be created beforehand. |
cache_volume_disk | string | Specify disks to use for cache in the format <diskname>:<volumesize>, e.g. "disk1:7 GiB". |
interfaces | string | Comma-seperated list of network interfaces to use for the database. Leave empty to use all possible network interfaces. The default value is "". |
volume_quota | integer | Maximum size of the data volume in GiB. If the quota is reached, the database tries to shrink the volume on start-up if required and possible. |
volume_move_delay | integer | Specifies the delay in seconds after which the volume on a failed node is moved to the reserve node automatically. When no value is set, there is no delay. |
master_database | string | The name of the master database if a worker database is being created. |
auto_start | boolean | Specifies if the database starts on cluster boot automatically. The default value is True. |
default_sys_passwd_hash | string | The hash used to set the default SYS password during database creation. |
additional_sys_passwd_hashes | string | A semi-colon seperated list of password hashes that allow authentication as SYS independent of the SYS password set. |
jdbc_urls | tuple, list | List of URLs used to search for JDBC drivers, like: bucketfs://bfs2/bucket3/jdbcdir or file:///exa/etc/jdbc_drivers. |
oracle_url | string | An URL used to search for oracle instant client, like: bucketfs://bfs2/bucket3/oracle_dir. |
initial_sql | string | Absolute path to a YAML file with SQL statements to run during the first database startup. |
Substitute parameters
The following table describes what parameters can be substituted for another parameter.
Parameter name | Substitute parameter |
---|---|
data_volume_id | data_volume_name |
data_volume_name | data_volume_id |
Allowed users
The following users are allowed to run this job:
- root
Allowed groups
The following groups are allowed to run this job:
- root
- exaadm
- exadbadm
Examples
The following examples show how to run this job in a Python program using XML-RPC or on the command line using confd_client.
conn.job_exec('db_create', {'params': {'db_name': 'exa_db', 'version': '8.0.0', 'data_volume_name': 'DataVolume1', 'mem_size': '2048 MiB', 'port': 8564, 'nodes': [11, 12], 'num_active_nodes': 2, 'owner': [500, 500]}})
conn.job_exec('db_create', {'params': {'db_name': 'exa_db2', 'version': '8.0.0', 'data_volume_name': 'DataVolume2', 'mem_size': '2048 MiB', 'port': 8565, 'nodes': [11, 12], 'num_active_nodes': 2, 'owner': [500, 500], 'params': '-forceProtocolEncryption=1', 'enable_auditing': False, 'ldap_server': 'ldap://192.168.16.10:389', 'snapshot_sync_volume': 'SnapshotSyncVolume1', 'initial_sql': '/tmp/initial_sql.yaml'}})
confd_client db_create db_name: exa_db version: 8.0.0 data_volume_name: DataVolume1 mem_size: '2048 MiB' port: 8564 nodes: '[11, 12]' num_active_nodes: 2 owner: '[500, 500]'
confd_client db_create db_name: exa_db2 version: 8.0.0 data_volume_name: DataVolume2 mem_size: '2048 MiB' port: 8565 nodes: '[11, 12]' num_active_nodes: 2 owner: '[500, 500]' params: -forceProtocolEncryption=1 enable_auditing: false ldap_server: ldap://192.168.16.10:389 snapshot_sync_volume: SnapshotSyncVolume1 initial_sql: /tmp/initial_sql.yaml