How to Install Releem on Enhance Control Panel
Step-by-step tutorial for easily installing Releem on the Enhance Control Panel.
Releem is a performance tuning tool for MySQL/MariaDB that recommends changes to your database configuration based on your current workload.
It collects metrics and suggests adjustments accordingly.
Releem offers both a free plan and a premium plan.
The free plan covers 10 essential MySQL/MariaDB variables and allows you to monitor the health status of the system, the InnoDB engine, memory, and queries through their dashboard.
You can also track system metrics and MySQL/MariaDB metrics such as latency, queries per second, slow queries, and IOPS r/w.
This tutorial will show you how to install Releem on the Enhance control panel.
Preparation
First, sign up for a Releem account.
After creating your account, click the Add new server button and choose the MySQL on Linux Server: Manual Installation in Docker option.
Next, you need to add a read-only user for Releem to collect metrics.
Access the server where the database role is installed using Enhance as root.
If you are using a sudo user, switch to the root user and run the mysql
command to enter the MySQL CLI.
Run the following commands:
CREATE USER 'releem'@'%' identified by '[Password]';
GRANT PROCESS, REPLICATION CLIENT, SHOW VIEW ON *.* TO 'releem'@'%';
GRANT SELECT ON performance_schema.events_statements_summary_by_digest TO 'releem'@'%';
FLUSH PRIVILEGES;
Replace [Password]
in the first command with a strong, complex password.
These commands create a new user named “releem” with the specified password, grant the necessary privileges, and reload the grant tables to apply the changes immediately.
%
in the previous commands acts as a wildcard, granting the “releem” user access from any host. This is important because Docker may change IP addresses. By providing global access, we prevent any issues that could arise from these IP changes.Exit the MySQL CLI by running the exit
command.
Before proceeding with the installation, we need to enable the performance schema and the slow query log.
To do this, access your Enhance panel, go to the Servers tab, and choose the server with the database role.
Under the Roles section, select the Database role and click the my.cnf button.
Then click the Edit configuration button and add the following lines to the end of the file:
performance_schema=1
slow_query_log=1
Save the changes. Enhance will prompt you to restart the MySQL container; please do so.
Now you are ready to proceed with the installation.
Installation
Now, we can install the Releem agent on the server where the database role is installed.
After selecting the MySQL on Linux Server: Manual Installation in Docker option, you’ll see an example Docker command provided by Releem for installing the agent.
However, this command won’t work directly with Enhance; we need to make some modifications.
From the provided Docker command, you need to extract your API key and the agent version.
The API key is found in the RELEEM_API_KEY
variable, and the agent version is at the end of the command. As of the time of writing this tutorial, the latest agent version is 1.16.0.
Now, access the server where the database role is installed using Enhance as root. If you are using a sudo user, switch to the root user.
We need to use the following command to install the Releem agent:
docker run -d -ti --restart unless-stopped --network=enhance-network --name 'releem-agent' -e DB_HOST="[server_public_ip]" -e DB_PORT="3306" -e DB_PASSWORD="[password]" -e DB_USER="releem" -e RELEEM_API_KEY="[your_api_key]" -e MEMORY_LIMIT=1000 -e RELEEM_HOSTNAME="[server_hostname]" -v /etc/mysql/releem.conf.d:/etc/mysql/releem.conf.d -v /opt/releem/conf:/opt/releem/conf releem/releem-agent:1.16.0
Replace [server_public_ip]
with your server’s public IP address, [password]
with the password you set for the “releem” user, and [your_api_key]
with your API key.
Set the MEMORY_LIMIT
to the amount of memory you want to allocate for the database in megabytes. This means that Releem will tune the database to use this amount of memory instead of the total RAM.
If you are running both the App and Database roles on the same server, it is not recommended to allocate the total RAM to the database.
A good rule of thumb is to allocate around 60% of the available RAM.
Replace [server_hostname]
with your server’s hostname.
Finally, ensure the agent version at the end of the command matches the current version.
Now run the command.
After the command finishes, you should receive an email from Releem confirming that the server is now connected.
Conclusion and Final Thoughts
I hope this tutorial has been helpful and that everything worked smoothly for you!
In this tutorial, you’ve learned how install Releem on Enhance control panel.
If you found value in this tutorial or have any questions or feedback, please don't hesitate to share your thoughts in the discussion section.
Your input is greatly appreciated, and you can also contact me directly if you prefer.
Discussion