database create
Registers an existing external database with Cloudbreak.
Sub-commands
mysql
Registers a MySQL database configuration
oracle11
Registers an Oracle 11 database configuration
oracle12
Registers an Oracle 12 database configuration
postgres
Registers a Postgres database configuration
Required options
--name <value>
Name for the database
--db-username <value>
Username for the JDBC connection
--db-password <value>
Password for the JDBC connection
--url <value>
JDBC connection URL in the form of jdbc:db-type://address:port/db
--type <value>
Name if the service that will use the database (AMBARI, DRUID, HIVE, OOZIE, RANGER,
SUPERSET, or other custom type)
If using MySQL and Oracle, the
--connector-jar-url value <value>
parameter is required in all cases except the following: If you are using a custom
image and you already placed the JAR file on the machine, then this parameter is not
required.
Options
--description <value>
Description for the database
--server <value>
Cloudbreak server address [$CB_SERVER_ADDRESS]
--username <value>
Cloudbreak user name (e-mail address) [$CB_USER_NAME]
--password <value>
Cloudbreak password [$CB_PASSWORD]
--workspace <value>
Name of the workspace holding the resource
--profile <value>
Selects a config profile to use [$CB_PROFILE]
--auth-type <value>
Authentication method to use. Values: oauth2, basic [$CB_AUTH_TYPE]
Examples
Registers an existing Postgres database called “test-postgres” with Cloudbreak:
cb database create postgres --name testpostgres --type HIVE --url jdbc:postgresql://test-db.cic6nusrpqec.us-west-2.rds.amazonaws.com:5432/testdb --db-username testuser --db-password MySecurePassword123
The connection URL includes three components db-type://address:port/db:
- Database type “jdbc:postgresql”
- Endpoint “test-db.cic6nusrpqec.us-west-2.rds.amazonaws.com:5432”
- Port “5432”
- Database name “testdb”
Registers an existing MySQL database called “testmysql” with Cloudbreak:
cb database create mysql --name testmysql --type OOZIE --url jdbc:mysql://test-db.cic6nusrpqec.us-west-2.rds.amazonaws.com:5432/testdb --db-username test --db-password test --connector-jar-url http://example-page/driver-file.JAR