Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari install without derby

SOLVED Go to solution
Highlighted

Ambari install without derby

New Contributor

What is the recommended way of installing HDP 2.3 with Ambari 2.2.1 and not use Derby?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Ambari install without derby

Contributor

@Michel Brown, here is the HDP documentation for using non-default databases in Ambari.

These are for Ambari 2.2.1.0: Using Non-Default Databases - Ambari <- For Ambari Server Using Non-Default Databases <- For other HDP services

We currently use Postgres as our backend DB for all of our services.

8 REPLIES 8

Re: Ambari install without derby

Contributor

@Michel Brown, here is the HDP documentation for using non-default databases in Ambari.

These are for Ambari 2.2.1.0: Using Non-Default Databases - Ambari <- For Ambari Server Using Non-Default Databases <- For other HDP services

We currently use Postgres as our backend DB for all of our services.

Re: Ambari install without derby

@Michel Brown Ambari doesn't need Derby, by default it uses Postgres database but if you want to use custom databases i.e. MySQL, Oracle etc. refer the documentation which @Jon Maestas has pointed you to.

Re: Ambari install without derby

New Contributor

At the end of the Ambari configuration during an HDP 2.3 install Ambari puts up a window that says you should not use Derby for an HA installation and shows you the options for other choices. However it appears that it is left to the user to setup those other databases. Is that just a misunderstanding on my part?

Re: Ambari install without derby

Yes you are correct, database setup has to be done by user unless using default embedded postgres database.

Re: Ambari install without derby

Guru

That Derby message is for oozie. Ambari by default picks derby for oozie and warns not to use it in production or HA situations.

Re: Ambari install without derby

New Contributor

Please point me to the documentation for setting up PostgreSQL for Oozie.

Re: Ambari install without derby

Guru

Documentation for setting up oozie with postgres is here

Re: Ambari install without derby

Expert Contributor

@Michel Brown

When install a test cluster, normally I would setup a MySQL instance to use for Ambari, Hive Metastore, oozie and Ranger. Below are the script I used to setup the process and most of them are copied from the document where you could find more details. All script are tested on centod6.5

Install MySQL before Ambari installation

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum -y install mysql mysql-server mysql-libs mysql-connector-java*

After After

After Ambari installation, setup the users in MySQL for Ambari, Hive, Oozie and Ranger

mysql -u root -p

CREATE USER 'ambari'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'localhost';
CREATE USER 'ambari'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE ambari;

CREATE USER 'hive'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost';
CREATE USER 'hive'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE hive;

CREATE USER 'oozie'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'oozie'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE oozie;

CREATE USER 'rangerdba'@'localhost' IDENTIFIED BY 'rangerdba';
GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'localhost';
CREATE USER 'rangerdba'@'%' IDENTIFIED BY 'rangerdba';
GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'rangerdba'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

mysql -u root -p ambari < /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

During Ambari setup after install Ambari server, choose not to used default database and point to the MySQL instance and setup java jdbc connector

ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

During Ambari install wizard for HDP, choose existing MySQL for Hive and Oozie and point to the MySQL instance you setup.