Setting Up MySQL or PostgreSQL
A database server can be installed on the same host as Altus Director and DNS, or you can add your database server to a different host in the same virtual network as Altus Director and the cluster. The supported databases are MySQL and PostgreSQL.
A dedicated database server is required for production clusters. The following steps are optional for non-production, proof-of-concept clusters.
Database Server Requirements
- It must be JDBC accessible both locally and remotely.
- The credentials provided to Altus Director must have superuser/administrator privileges.
- Increase the connection count according to Cloudera documentation on MySQL Database or PostgreSQL Database.
- Ensure sufficient CPU, memory, IOs, and bandwidth for the database server, especially if the database server is shared between multiple clusters.
Example for MySQL Installation
- Your MySQL server must be in the same virtual network as the rest of the cluster.
- Reference your MySQL server host by private IP address or an internal fully-qualified domain name (FQDN) that resolves to a private IP address.
- To reference the MySQL server by internal FQDN, make sure the MySQL server internal FQDN is registered with the DNS server you configured in Setting Up Dynamic DNS on Azure.
Setting up Azure Database for MySQL
Beginning with Altus Director 6.2 you can use an Azure Database for MySQL instance for the Altus Director database, Cloudera Manager databases, and CDH component databases.
-
Create the database server in your Azure subscription.
You must create an Azure Database for MySQL server in your Azure subscription in order to use it in Altus Director. You can use the Azure portal or the Azure CLI to create the Azure Database for MySQL server in your Azure subscription. For information about creating the server, see the instructions in the Azure Database for MySQL documentation.
-
Configure the VNet and subnets that access the database.
Add the VNets or subnets that will need to access the MySQL instance to the Microsoft.Sql service endpoint.
The following screenshot shows subnets added to the Microsoft.Sql service endpoint:
-
Configure the connectivity for the MySQL instance.
-
On the Connection security page, set the following properties:
- Allow access to Azure services. Set this property to OFF.
- Enforce SSL connection. Set this property to DISABLED.
Use the Add existing virtual network link to add the VNets or subnets you want to use. You must have configured these VNets and subnets in the previous step.
The following screenshot shows the properties in the Connection security page that you need to set on the Azure portal:
-
On the Server parameters page, set the wait_timeout property to 28800.
Setting the wait_timeout property to 28800 enables Cloudera Manager and CDH components to re-use existing database connections as expected.
The following screenshot shows the Server parameters page with the wait_timeout property set to 28800:
-
-
Configure Altus Director or Cloudera Manager or CDH to use the Azure Database for MySQL instance.
For instructions on configuring Altus Director to use the Azure Database for MySQL instance, see Configuring Altus Director Server to use the MySQL Database.
For instructions on configuring the database for Cloudera Manager or CDH, see Defining External Databases.