Created attachment 195772 [details]
galera_new_cluster and galera_recovery scripts from Debian
The official Debian (and possible other OS) packages for MariaDB 10.x include a pair of scripts to help with managing Galera clusters. These would be handy for the FreeBSD port, since there appears to be no other officially documented way to bootstrap a Galera cluster with the FreeBSD binaries.
Alternatively, some OSes have the "service mysql bootstrap" command, but there is no "service mysql-server bootstrap" command on the FreeBSD port.
The official docs for MariaDB also list "mysqld --wsrep-new-cluster" as the direct method to start a new cluster, however FreeBSD only has the mysqld_safe binary, and not mysqld (it works the same way, but will be confusing to new users)
More details at: https://mariadb.com/kb/en/library/getting-started-with-mariadb-galera-cluster/
For the bootstrap functionality I got part of the rc.d script of mysql and it works fine:
# Bootstrap the cluster, start the first node that initiate the cluster
check_startmsgs && echo "Bootstrapping cluster"
Put this one into your /usr/local/etc/rc.d/mysql-server
Then you can do bootstrap on your cluster with the rc.d script.
This however has to be ported into the package.