Original cluster setup from https://github.com/mariadb-faisalsaeed/documentation
See issue comment: faizalrf/documentation#1 (comment)
Below is a basic guide to creating HA Maxscale (>= 2.5) using a pre-configured pacemaker configuration
| <?php | |
| namespace Deployer; | |
| require 'recipe/laravel.php'; | |
| // deployment configuration options. | |
| set('repository', 'git@github.com/username/repository.git'); | |
| // set('http_user', 'username'); // optionally set file user | |
| // set('bin/php', '/usr/local/bin/ea-php74'); // optionally set PHP path |
Original cluster setup from https://github.com/mariadb-faisalsaeed/documentation
See issue comment: faizalrf/documentation#1 (comment)
Below is a basic guide to creating HA Maxscale (>= 2.5) using a pre-configured pacemaker configuration
Requires the firebase_analytics package.
dependencies, add the Firebase Analytics package firebase_analytics: ^6.0.0flutter pub get to retrieve the package| #!/bin/bash | |
| # define our parameters | |
| hostArray=("mariadb-90" "mariadb-91" "mariadb-92") | |
| configPath="/etc/maxscale.cnf" | |
| service="maxscale" | |
| # auto variables | |
| currentHost=$(hostname) |
| #!/bin/bash | |
| printf "\n\nPerforming export of all databases to remote host via SSH" | |
| printf "\n\nMySQL username: " | |
| read mysqlUser | |
| printf "MySQL password: " | |
| read -s mysqlPassword |
This guide requires you have the original database directories handy. You may also struggle restoring InnoDB instances because of the way they work, however a guide can be found at the bottom of this gist.
Move your backup database folders to an appropriate location, a temporary folder is preferable as MariaDB will put its own data within this directory.
Within the directory, run the following docker command:
| <?php | |
| // create our service container | |
| $serviceContainer = [ | |
| TestClass::class => new TestClass('Matt') | |
| ]; | |
| // create our test class | |
| class TestClass { |
| <?php | |
| /** | |
| * A PHP trait which allows us to re-use logic | |
| * across classes. Note that in 'User', we are calling 'use HasPolicies;' | |
| * This allows the User class to utilise these methods. | |
| */ | |
| trait HasPolicies { | |
| /** | |
| * Checks if the user has ALL the passed abilities |
| const bearerToken = 'secretTokenGoesHere'; | |
| const httpPort = 80; | |
| // load in express & express fileUpload | |
| const express = require('express'), | |
| fileUpload = require('express-fileupload'), | |
| app = express(); | |
| // initialise fileUpload plugin | |
| app.use(fileUpload()); |