DB - MariaDB
Table of Content
Diagram of the Resources to Create
graph LR
MariaDBUser -- CAN_READ --> MariaDBDatabase
MariaDBUser -- CAN_WRITE --> MariaDBDatabase
MariaDBUser -- CAN_ADMIN --> MariaDBDatabase
MariaDBDatabase -- INSTALLED_ON --> MariaDBServer
MariaDBServer -- RUN_AS --> UnixUser
MariaDBServer -- INSTALLED_ON --> Machine
Diagram of the Generated Resources
The MariaDBServer creates an application which is installed on the chosen Machine and runs as the chosen UnixUser.
Databases, users and their permission are put in a configuration file in the application and when it changes, a management application makes the changes in the database.
graph LR
A[Application MariaDB]
A -- RUN_AS --> UnixUser
A -- INSTALLED_ON --> Machine
Create the Unix user of the database
Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list ) and click on Unix User
Choose the owner
Enter the name
For Installed on , choose the machine
Click on Create
Create the database server
Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list ) and click on MariaDB Server
Choose the owner
Enter the server name
Put the version 10.5.6-1.1.1-3 or more recent (check via the link in the editor)
For Running as , choose the previously created Unix user
For Installed on , choose the same machine as the one where the Unix user is installed
Click on Create
Create the database
Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list ) and click on MariaDB Database
Choose the owner
Enter the name of the database
For Installed on , choose the MariaDB server
Click on Create
Create the database user
Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list ) and click on MariaDB User
Choose the owner
Enter user name
Enter password
For Is admin on , choose the MariaDB database
For Can read , choose the MariaDB database
For Can write , choose the MariaDB database
Click on Create
Create the database attachment
Used to attach a local redirect (e.g: 127.0.0.1:3306) to a database for Apache PHP sites as well as Composable Applications .
Go to Foilen Infra in the Plugin tab (https://infra.foilen.com/plugin/list ) and click on Attachable MariaDB
Choose the owner
Enter a name (the name of the MariaDB server is a good idea)
Leave the default port at 3306
For MariaDB Server , choose the MariaDB server