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

You can install a database server on the same host as the Altus Director server, a different host in the same Virtual Network as Altus Director and the cluster, or configure an existing database. Whichever method you choose, these are requirements for the database server:
  • 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

For MySQL, follow the instructions in Using MySQL for Altus Director Server. Use the instructions for your specific version of MySQL, and keep in mind these additional requirements:
  • 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.

To use an Azure Database for MySQL instance in Altus Director, complete the following steps:
  1. 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.

  2. 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:



  3. Configure the connectivity for the MySQL instance.

    1. 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:



    2. 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:



  4. 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.