Home

Setting up Azure MySQL for Unravel (Optional)

Step 1: Create Azure MySQL 5.7 instance.

We recommend using Memory Optimized type.

AzureMySQL-CreateAzureInstance.png
Step 2: Disable SSL Enforce in Azure MySQL instance.
AzureMySQL-DisableSSLEnforce.png
AzureMySQL-DisableSSLEnforceSave.png
Step 3: (Optional) Update Azure MySQL service parameters.
AzureMySQL-Parameters.png

Tune the following MySQL parameters for better performance for Unravel.

max_allowed_packet: 32000000 and beyond
sort_buffer_size: 32000000 and beyond or maximum allowed value
query_cache_size: 64000000 and beyond or maximum allowed value
max_connections: 500 and beyond
max_connect_errors: 2000000000 and beyond
character_set_server: UTF8
innodb_file_per_table: ON
innodb_buffer_pool_size: maximum allowed value
innodb_lock_wait_timeout: 50
innodb_thread_concurrency: 20
innodb_read_io_threads: 16
innodb_write_io_threads: 4
innodb_io_capacity: 4000
innodb_io_capacity_max: 4000
Step 4: Set up VNET rule to allow Unravel server to access the database via port 3306.
AzureMySQL-SetupVNET.png
AzureMySQL-SetupVNET-2.png
AzureMySQL-SetupVNET-2.png
AzureMySQL-SetupVNET-2.png

Select the subscription, Virtual Network, Subnet that Unravel server located and click OK.

AzureMySQL-SetupVNET3.png
Step 5: Log into the Unravel node and install the MySQL Client.
sudo yum install mysql 
Step 6: Update /usr/local/unravel/etc/unravel.properties with the JDBC URL to Azure MySQL instance.
  • Check MySQL JDBC driver is located in Unravel Java classpath /usr/local/unravel/share/java/

    wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.47.tar.gz -O /tmp/mysql-connector-java-5.1.47.tar.gz
    cd /tmp
    tar xvzf /tmp/mysql-connector-java-5.1.47.tar.gz
    sudo mkdir -p /usr/local/unravel/share/java
    sudo cp /tmp/mysql-connector-java-5.1.47/mysql-connector-java-5.1.47.jar /usr/local/unravel/share/java
    sudo cp /tmp/mysql-connector-java-5.1.47/mysql-connector-java-5.1.47.jar /usr/local/unravel/dlib/unravel
  • Construct the JDBC URL for Unravel.

    AzureMySQL-ConstructJDBC-URL.png

    Modify above properties in /usr/local/unravel/etc/unravel.properties.

    Example:

    unravel.jdbc.username=<Server admin login name>
    unravel.jdbc.password=<admin password>
    unravel.jdbc.url=jdbc:mysql://<Server name>:3306/unravel_mysql_prod
    unravel.jdbc.url.params=useSSL=true&requireSSL=false
  • Restart Unravel daemons.

    /etc/init.d/unravel_all.sh restart
  • Create database/tables for Unravel

    mysql --host=Server name --port=3306 --user Server admin login name -padmin password -e 'create database unravel_mysql_prod'/usr/local/unravel/dbin/db_schema_upgrade.sh
  • Create the default admin user for Unravel UI.

    sudo /usr/local/unravel/install_bin/db_initial_inserts.sh | sudo /usr/local/unravel/install_bin/db_access.sh