Support Questions

Find answers, ask questions, and share your expertise

Postgres as a external database with ssl on cloudbreak

avatar
New Contributor

There are some way to configure postgres external database on cloudbreak to use ssl?

I did not succeed with this jdbc string:

Connection URL: jdbc:postgresql://<pg-url>:5432/hive?ssl=true

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Helo,

You can configure Cloudbreak to use an external database. Also you can configure the cert for your database with the following 2 env vars:

-Dcb.db.env.ssl=true
-Dcb.db.env.cert.file=path_to_cert

However, your question suggests me that you want to use an external DB for Hive and not for CB, right? I that case it would be better to put the Hive tag on the question as well so Hive users can find the question.

View solution in original post

6 REPLIES 6

avatar
Super Collaborator

Helo,

You can configure Cloudbreak to use an external database. Also you can configure the cert for your database with the following 2 env vars:

-Dcb.db.env.ssl=true
-Dcb.db.env.cert.file=path_to_cert

However, your question suggests me that you want to use an external DB for Hive and not for CB, right? I that case it would be better to put the Hive tag on the question as well so Hive users can find the question.

avatar
New Contributor

Yes, you are right!

Many thanks for your advise, I added the tag

avatar
Cloudera Employee

@khorvath

Could you guide me on how to set the SSL enabled postgres to Cloudbreak , also I'm new to Cloudbreak so please provide some detailed steps as on which config , what's the parameted need to be included etc

avatar

For Cloudbreak, these variables that @khorvath mentioned are Java JVM opts that should be configured through CB_JAVA_OPTS variable in your Profile file. You can set these as in the following example:

export CB_JAVA_OPTS="-Dhttp.proxyHost=ec2-52-51-184-121.eu-west-1.compute.amazonaws.com -Dhttp.proxyPort=3128"

If you have a cert for SSL then you should place it into the etc folder of you deployment and replace the `path_to_cert` to the relative path of the cert from your deployment’s etc folder

avatar
Cloudera Employee

Hi @Dominika Bialek, I have tried as per your suggestion however its still throwing error.

FYI, I just specified like this, still issue exists, please guide me

export 
CB_JAVA_OPTS="-Dhttp.proxyHost=cbpostgres2134.postgres.database.azure.com 
-Dhttp.proxyPort=5432 -Dcb.db.env.ssl=true 
-Dcb.db.env.cert.file=/root/cloudbreak-deployment/certs/root.crt"

avatar

The steps for configuring an external database with SSL for Cloudbreak are described here

https://docs.hortonworks.com/HDPDocuments/Cloudbreak/Cloudbreak-2.9.0/configure/content/cb_configure...