1. Home
  2. Docs
  3. ConfigFiles
  4. User Guide2
  5. Servers
  6. Add New Server

Add New Server

Adding a new server with ConfigFiles is very simple and straightforward. Currently, there’s only one database that we support. See below for the supported database you can register.

MySQL

ConfigFiles only supports MySQL database as of this time. It can support any varied flavors of MySQL databases and versions. Whatever version of MySQL as long as the directives are correct, it shall be supported and understood by ConfigFiles. It shall work with Oracle MySQL, Percona Server for MySQL, Percona XtraDB Cluster, MariaDB/MariaDB Cluster, and Galera but the desired versions for which the ConfigFiles service is being tested must at least version >= 5.5 versions, while MariaDB has at least >= 10.0. See the Requirements section for details.

1) Adding Your MySQL Server

Registering or adding your MySQL server can be done by clicking the Add New Server button. The version of your MySQL at least has to comply with the desired path of your configuration files. It has to be in /etc/my.cnf or /etc/mysql/my.cnf system paths. Once you are ready, you are required to create a database user that the ConfigFiles agent (cm-agent system daemon service) will use to collect its database variables.

2) Create Database User

For the requirements of the database user, please see User and Privilege for MySQL.

At this stage, you will get a set of commands that need to be executed on the chosen database server to allow the cm-agent agent to access the database server and read variables and their values during runtime. If you would like to customize the database username, specify the name under Username textbox. Otherwise, ConfigFiles will use the default username, s9s-cm. The database username must be at least 3 characters with a maximum of 16 characters.

By default, ConfigFiles will generate a fairly strong random password. However, this might not satisfy the password policy of the target server. You may specify a custom password in the Password  textbox with a minimum of 8 characters and a maximum of 32 characters.

Attention

The provided commands must be executed by a database user that has the ability to create user, role, and grant privileges e.g, root user.

3) Installation

At this stage, you will be provided with a one-liner command to perform the agent installation. This agent is what you called the ConfigFiles agent or cm-agent (a binary file). Copy the generated command line and execute it on the target database server. You can customize some installation parameters depending on the selected database server:

Database Options Description
MySQL/MariaDB MySQL Port The default value is 3306. Specify the port number to which the database server is listening to.
MySQL Socket Default value is /var/lib/mysql/mysql.sock. Specify the path to the MySQL UNIX socket file of the database server. You can get the socket path by using  SELECT @@socket;

In some environments, you might need to run the above command as a non-root user. Click on the sudo user button and use the generated command instead.

The installation command follows the following format:

wget -q -O - {script-url} | \
  bash -s -- install \
  {security-token} \
  {database-connection-string}

Where:

  • {script-url} – The installer script URL.
  • {security-token} – Auto-generated security token that is assigned and associated with your ConfigFiles personal account.
  • {database-connection-string} – Database connection string that will be used by the agent to connect to the database node to perform a backup. The format is:
    {db-type}://{db-user}:{db-password}@{db-host}:{db-port}
Attention

Internet connection is required on the database node for this installation to succeed.

If you would like to see what the installation does, click on Check installation script source button.

For example, the following one-liner command is generated for a MySQL installation:

wget -q -O - https://configs.s9s.io/install/linux.sh | sudo bash -s -- install XXXXXXXX-XXXX-XXXX-bb6f-9b60bcfb741b mysql://s9s-cm:[email protected]:3306

Take note that the XXXXXXXX-XXXX-XXXX is just a dummy character to avoid using this security token from copying or using this in your own test. Instead, it’s a bunch or alpha-numeric combinations in real action. Once ready, simply copy the command line provided and paste it to your terminal for which is your target MySQL database has to be registered to ConfigFiles service. A ConfigFiles agent called cm-agent will be installed, configured, and started on the corresponding host. If the installation is successful, you should see the following lines:

The agent installation of Configuration Management has been successfully completed.
Please go back to your browser and check the Server Discovery step to
verify that this host has appeared which might take a few seconds.

If you have any issues getting the agent to install and be discovered then
please contact support at https://support.severalnines.com for assistance.

Click on Continue to proceed to the last step.

4) Host/Server Discovery

Here you will see the host discovery status whereby the ConfigFiles agent (cm-agent) will report its status back to the API gateway endpoints. It will display the host or server you have just set up or added as the target source for configuration management service. This means that it will show up only once the script for the installation of the agent is done successfully. Otherwise, it will always just keep in progress until the server is successfully added (cm-agent daemon service is successfully installed). After a while, the database node should appear in the list. Click on Finish Installation to complete the steps.

Adding a new server is now complete.

Note

The discovery process usually takes seconds and less than a minute. If you get into trouble at this phase, see Troubleshooting.

Was this article helpful to you? Yes No