Overview
This is a flavour containing the mariadb
database server.
It is assumed that a persistent directory containing the mysql
datadir is mounted in to /var/db/mysql
, optionally you could copy in your server.cnf
configuration if you do have specific needs not covered by the default configuration (see Installation chapter below).
Also, it supports parameters to regularly dump the content of the database into a SQL-file so you can create consistent backups from outside the jail.
To ensure that software and database file versions match, mysql_upgrade
is run on startup. That way, you should be able to upgrade your mariadb
installation by simply replacing the jail with a newer version as long as the database files are stored outside and mounted in (see above and examples below).
Installation
- Create a ZFS data set on the parent system beforehand
zfs create -o mountpoint=/mnt/mysqldata zroot/mysqldata
- Create your local jail from the image or the flavour files.
- Clone the local jail
- Mount in the ZFS data set you created
pot mount-in -p <jailname> -m /var/db/mysql -d /mnt/mysqldata
- Optionally export the ports after creating the jail:
pot export-ports -p <jailname> -e 3306:3306 -e 9104:9104
- Adjust to your environment:
sudo pot set-env -p <jailname> \ -E DATACENTER=<datacentername> \ -E NODENAME=<nodename> \ -E IP=<IP address of this system> \ -E CONSULSERVERS="<comma-deliminated list of consul server IP addresses>" \ -E GOSSIPKEY="<32 byte Base64 key from consul keygen>" \ -E DBROOTPASS=<database root password> \ -E DBSCRAPEPASS=<mysqld exporter user password> \ [ -E DUMPSCHEDULE="<cronschedule>" -E DUMPUSER=<backupuser> -E DUMPFILE=</insidejail/dumpfile.sql> ] \ [ -E SERVERID=<unique number> -E REPLICATEUSER=<replication username> -E REPLICATEPASS=<replication password> ] \ [ -E LOADBALANCER=<IP address of haproxy-sql image> ] \ [ -E REMOTELOG=<IP address of syslog-ng server> ]
Required Paramaters
DATACENTER defines a common datacenter.
NODENAME defines the name of this node.
IP is the IP address which will be used to access services.
CONSULSERVERS is a comma-deliminated list of consul server instances. Do not include spaces!
e.g. CONSULSERVERS="10.0.0.2"
or CONSULSERVERS="10.0.0.2,10.0.0.3,10.0.0.4,10.0.0.6,10.0.0.6"
GOSSIPKEY is the gossip encryption key for consul agent and must be passed in as a parameter.
DBROOTPASS is the root password for the mysql database, which must be passed in even if database exists and configured.
DBSCRAPEPASS is the password for the mysqld_exporter exporter
user.
Optional Parameters
DUMPSCHEDULE is a cron schedule is in the scheduling format of crontab, e.g. “*/5 * * * *”. (include quotes)
DUMPUSER defaults to root
and DUMPFILE defaults to /var/db/mysql/full_mariadb_backup.sql
if you set a DUMPSCHEDULE but do not specify one or both of these parameters.
SERVERID is a unique identifier. It defaults to 1
if not set. If setting up a second master, or a slave instance, this must be different, such as 2
.
REPLICATEUSER is the username for replication user and REPLICATEPASS is the password.
LOADBALANCER is the IP address of a haproxy-sql
instance which will provide loadbalancing between two or three mariadb
instances. A user called haproxy
is created with no password and no access to databases.
REMOTELOG is the IP address of a destination syslog-ng
server, such as with the loki
flavour, or beast-of-argh
flavour.
Usage
You can connect to the database server with a mariadb
client.
Master-Slave Replication
To enable master-slave replication, import a backup of the databases to the slave instance.
Then on the master server, run /root/bin/check-master-status.sh
to get the binlog filename and position to use on the slave.
On the slave server, run /root/bin/configure-mariadb-slave.sh
with the parameters for master server, replication user and pass, binlog name and position.
Master-Master Replication
To enable master-master replication, setup the first server, then import a backup of the databases to the second server.
Then on the first server, run /root/bin/check-master-status.sh
to get the binlog filename and position to use on the second server.
On the second server, run /root/bin/configure-mariadb-slave.sh
with the parameters for first server IP, replication user and pass, binlog name and position.
Ensure replication is taking place.
Then on the second server, run /root/bin/check-master-status.sh
to get the binlog filename and position to use on the first server.
Back on the the first server, run /root/bin/configure-mariadb-slave.sh
with the parameters for second server, replication user and pass, binlog name and position.
You can use a loadbalancing/failover TCP proxy such as the haproxy-sql
pot image to make use of this. Make sure to set the LOADBALANCER parameter to the IP of the loadbalancer well in advance.
Getting Started
- Image Readme
- How To Use The Ready-Made Image
- Alternatively: Create a Jail With This Flavour Yourself
- Version History
- Manual Image Download Links
- Jenkins Pot Creation Logs
How To Use The Ready-Made Image
FreeBSD 14.1:
pot import -p mariadb-amd64-14_1 -t 4.10.4 -U https://potluck.honeyguide.net/mariadb
With Signify Verification:
fetch https://potluck.honeyguide.net/potluck.pub; pot import -p mariadb-amd64-14_1 -t 4.10.4 -C potluck.pub -U https://potluck.honeyguide.net/mariadb
If you don’t want to use the default pot
bridged network configuration but instead need an individual network setup (e.g. assign a host IP address), after importing it you can simply clone the jail like that (em0 is the host network adapter in this example):
pot clone -P mariadb-amd64-14_1 -p my-cloned-jail -N alias -i "em0|10.10.10.10"
Note: Some images might require specific network configuration, double check the Overview-chapter at the top.
Alternatively: Create a Jail With This Flavour Yourself
1. Create Flavour Files
Save all files and directories from https://github.com/hny-gd/potluck/tree/master/mariadb to /usr/local/etc/pot/flavours/
2. Create Jail From Flavour
Run
pot create -b <FreeBSD Version> -p <jailname> -t single -N public-bridge -f fbsd-update
with your FreeBSD version (e.g. 14.1) and the name your jail should get.
Note: Some images might require specific network configuration, double check the Overview-chapter at the top.
Version History
4.10
- Version bump for new base image
- Enable milliseconds in syslog-ng for all log timestamps
- Update syslog-ng config to use modern config options
- Set mariadb expire_logs_days option
4.9
- Version bump for new base image 14.1
- Extra steps to trim image size
4.8
- Version bump for new base image
4.7
- Version bump for new base image
4.6
- Version bump for new base image
4.5
- Version bump for new base image
4.4
- Version bump for new base image
- Fix node_exporter zfs issue
4.3
- Version bump for new base image
- FBSD14 base image
4.2
- Version bump for new base image
4.1
- Version bump for new base image
4.0
- Version bump for new base image
3.9
- Version bump for new base image
3.8
- Version bump for new base image
3.7
- Version bump for introduction of replication
- Add parameters to setup server_id, replication credentials, and scripts for easy slave configuration
- Minor tweaks to ignore minor errors, also testing master-slave and master-master works
- Add –disable-log-bin in mysql_install_db_args in mysql-server rc script
- Fix error in changing mysql-server rc script
- Add GALERAHOST parameter to set an access rule for a loadbalancer host
- Rename GALERAHOST to LOADBALANCER, galera user to haproxy, to avoid confusion with galera package
- Add relay-log to avoid replication problems on hostname change
- Rename configure-galerauser.sh file and fix typos
- Fix parameter names in README
- mysqld_exporter runs as user nobody but config file with password has restrictive permissions, fixed
3.6
- Version bump for new base image
- mariadb105 to mariadb106
- Fix syslog-ng problems for 4.2 version, remove stats_freq option
- Add local unbound for consul DNS resolution
- Minor change to consul agent config to use retry_join instead of start_join
- Add service to consul setup
- Fix addition of services
- Add consul DNS info to README
- fix local_unbound dns resolution with missing parameters for access control
- Disable consul DNS option with local_unbound as is only practical in VNET jails with a localhost
- Duplicate mysqld_exporter mariadb user with localhost access for VNET jails
- Adjust above step for 127.0.0.1 and ::1
3.5
- Version bump for new base image
3.4
- Version bump for new base image
- Signified
- Fix nologin shell for nodeexport user
3.3
- Version increment for new feature
- Pass consul servers in as a comma-deliminated list of IP addresses
3.2
- Version bump for new base image
- Update syslog-ng.conf stats_freq(0); -> stats(freq(0));
- Remove quotes from variable as adjustment for list of consul servers to join
3.1
- Version bump for new base image
3.0
- Version bump for new base image
- New changelog format
2.0.12
- Version bump for rebuild
2.0.11
- Fix consul client hcl for new format
2.0.10
- Version bump for rebuild to fix missing images on potluck site
2.0.9
- Version bump for p3 rebuild
2.0.8
- Version bump for latest consul
- Add checklist
2.0.7
- Version bump for rebuild
2.0.6
- Version bump for new base image
- Adjustments to cook for disabling in nomad and .env.cook
- Remove ssh disable, done in base image
2.0.5
- Version bump for FreeBSD-13.1 image
2.0.4
- Need additional permissions for exporter user of mysqld_exporter to avoid errors filling up logs
2.0.3
- Fix access IP to passed in IP address for mysqld_exporter exporter user
2.0.2
- Fix error with mysqld_exporter credentials file preventing mariadb starting on pot image restart
2.0.1
- Rebuild for new format flavour image
- Include consul, node_exporter, mysql_exporter
1.0.2
- Rebuild for FreeBSD 12_3 and 13 & pot 13
1.0.1
- Rebuild for FreeBSD 13 & new packages
1.0
- Initial commit
These images were built on Thu Dec 5 16:45:44 UTC 2024
Manual Image Download Links
mariadb-amd64-14_1_4.10.4.xz (
)
mariadb-amd64-14_1_4.10.4.xz.skein (
)
mariadb-amd64-14_1_4.10.4.xz.skein.sig (
)
mariadb-amd64-14_1_4.10.4.xz.meta (
)
Jenkins Pot Creation Logs
mariadb-amd64-14_1_4.10.4:
mariadb/mariadb:
copy-in -s /usr/local/etc/pot/flavours/mariadb.d/local -d /root/.pot_local
mariadb/mariadb.sh:
#!/bin/sh
# Based on POTLUCK TEMPLATE v3.0
# Altered by Michael Gmelin
#
# EDIT THE FOLLOWING FOR NEW FLAVOUR:
# 1. RUNS_IN_NOMAD - true or false
# 2. If RUNS_IN_NOMAD is false, can delete the <flavour>+4 file, else
# make sure pot create command doesn't include it
# 3. Create a matching <flavour> file with this <flavour>.sh file that
# contains the copy-in commands for the config files from <flavour>.d/
# Remember that the package directories don't exist yet, so likely copy
# to /root
# 4. Adjust package installation between BEGIN & END PACKAGE SETUP
# 5. Adjust jail configuration script generation between BEGIN & END COOK
# Configure the config files that have been copied in where necessary
# Set this to true if this jail flavour is to be created as a nomad
# (i.e. blocking) jail.
# You can then query it in the cook script generation below and the script
# is installed appropriately at the end of this script
RUNS_IN_NOMAD=false
# set the cook log path/filename
COOKLOG=/var/log/cook.log
# check if cooklog exists, create it if not
if [ ! -e $COOKLOG ]
then
echo "Creating $COOKLOG" | tee -a $COOKLOG
else
echo "WARNING $COOKLOG already exists" | tee -a $COOKLOG
fi
date >> $COOKLOG
# -------------------- COMMON ---------------
STEPCOUNT=0
step() {
STEPCOUNT=$(("$STEPCOUNT" + 1))
STEP="$*"
echo "Step $STEPCOUNT: $STEP" | tee -a $COOKLOG
}
exit_ok() {
trap - EXIT
exit 0
}
FAILED=" failed"
exit_error() {
STEP="$*"
FAILED=""
exit 1
}
set -e
trap 'echo ERROR: $STEP$FAILED | (>&2 tee -a $COOKLOG)' EXIT
# -------------- BEGIN PACKAGE SETUP -------------
step "Bootstrap package repo"
mkdir -p /usr/local/etc/pkg/repos
# only modify repo if not already done in base image
# shellcheck disable=SC2016
test -e /usr/local/etc/pkg/repos/FreeBSD.conf || \
echo 'FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly" }' \
>/usr/local/etc/pkg/repos/FreeBSD.conf
ASSUME_ALWAYS_YES=yes pkg bootstrap
step "Touch /etc/rc.conf"
touch /etc/rc.conf
# this is important, otherwise running /etc/rc from cook will
# overwrite the IP address set in tinirc
step "Remove ifconfig_epair0b from config"
# shellcheck disable=SC2015
sysrc -cq ifconfig_epair0b && sysrc -x ifconfig_epair0b || true
step "Disable sendmail"
service sendmail onedisable
step "Create /usr/local/etc/rc.d"
mkdir -p /usr/local/etc/rc.d
step "Clean freebsd-update"
rm -rf /var/db/freebsd-update
mkdir -p /var/db/freebsd-update
# we need consul for consul agent
step "Install package consul"
pkg install -y consul
step "Install package openssl"
pkg install -y openssl
step "Install package sudo"
pkg install -y sudo
# necessary if installing curl now
step "Install package ca_root_nss"
pkg install -y ca_root_nss
step "Install package curl"
pkg install -y curl
step "Install package jq"
pkg install -y jq
step "Install package jo"
pkg install -y jo
step "Install package nano"
pkg install -y nano
step "Install package bash"
pkg install -y bash
step "Install package rsync"
pkg install -y rsync
step "Install package mariadb106-server"
pkg install -y mariadb106-server
step "Install package mariadb106-client"
pkg install -y mariadb106-client
step "Install package node_exporter"
pkg install -y node_exporter
step "Install package mysqld_exporter"
pkg install -y mysqld_exporter
step "Install package syslog-ng"
pkg install -y syslog-ng
step "Clean package installation"
pkg clean -ay
step "Create mysql directory"
mkdir -p /var/db/mysql
# -------------- END PACKAGE SETUP -------------
#
# Now generate the run command script "cook"
# It configures the system on the first run by creating the config file(s)
# On subsequent runs, it only starts sleeps (if nomad-jail) or simply exits
#
# this runs when image boots
# ----------------- BEGIN COOK ------------------
step "Clean cook artifacts"
rm -rf /usr/local/bin/cook /usr/local/share/cook
step "Install pot local"
tar -C /root/.pot_local -cf - . | tar -C /usr/local -xf -
rm -rf /root/.pot_local
step "Set file ownership on cook scripts"
chown -R root:wheel /usr/local/bin/cook /usr/local/share/cook
chmod 755 /usr/local/share/cook/bin/*
# ----------------- END COOK ------------------
# ---------- NO NEED TO EDIT BELOW ------------
step "Make cook script executable"
if [ -e /usr/local/bin/cook ]
then
echo "setting executable bit on /usr/local/bin/cook" | tee -a $COOKLOG
chmod u+x /usr/local/bin/cook
else
exit_error "there is no /usr/local/bin/cook to make executable"
fi
#
# There are two ways of running a pot jail: "Normal", non-blocking mode and
# "Nomad", i.e. blocking mode (the pot start command does not return until
# the jail is stopped).
# For the normal mode, we create a /usr/local/etc/rc.d script that starts
# the "cook" script generated above each time, for the "Nomad" mode, the cook
# script is started by pot (configuration through flavour file), therefore
# we do not need to do anything here.
#
# Create rc.d script for "normal" mode:
step "Create rc.d script to start cook"
echo "creating rc.d script to start cook" | tee -a $COOKLOG
# shellcheck disable=SC2016
echo '#!/bin/sh
#
# PROVIDE: cook
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
. /etc/rc.subr
name="cook"
rcvar="cook_enable"
load_rc_config $name
: ${cook_enable:="NO"}
: ${cook_env:=""}
command="/usr/local/bin/cook"
command_args=""
run_rc_command "$1"
' > /usr/local/etc/rc.d/cook
step "Make rc.d script to start cook executable"
if [ -e /usr/local/etc/rc.d/cook ]
then
echo "Setting executable bit on cook rc file" | tee -a $COOKLOG
chmod u+x /usr/local/etc/rc.d/cook
else
exit_error "/usr/local/etc/rc.d/cook does not exist"
fi
if [ "$RUNS_IN_NOMAD" != "true" ]
then
step "Enable cook service"
# This is a non-nomad (non-blocking) jail, so we need to make sure the script
# gets started when the jail is started:
# Otherwise, /usr/local/bin/cook will be set as start script by the pot
# flavour
echo "enabling cook" | tee -a $COOKLOG
service cook enable
fi
# -------------------- DONE ---------------
exit_ok
mariadb/mariadb+1:
mariadb/mariadb+1.sh:
mariadb/mariadb+2:
mariadb/mariadb+2.sh:
mariadb/mariadb+3:
mariadb/mariadb+3.sh:
mariadb/mariadb+4:
mariadb/mariadb+4.sh:
=====> Create conf dir (/mnt/srv/pot/jails/mariadb-amd64-14_1/conf)
=====> Cloning freebsd-potluck-amd64-14_1_0_0_31 with snap
=====> clone zroot/srv/pot/jails/freebsd-potluck-amd64-14_1_0_0_31/m@1730306249 into zroot/srv/pot/jails/mariadb-amd64-14_1/m
=====> Flavour: fbsd-update
=====> Starting mariadb-amd64-14_1 pot for the initial bootstrap
=====> mount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp
defaultrouter: 10.192.0.1 -> 10.192.0.1
===> Starting the pot mariadb-amd64-14_1
=====> Pot mariadb-amd64-14_1 jail params are: allow.set_hostname=false allow.raw_sockets allow.socket_af allow.chflags exec.clean mount.devfs enforce_statfs=2 sysvshm=new sysvsem=new sysvmsg=new children.max=0 devfs_ruleset=4 stop.timeout=10 name=mariadb-amd64-14_1 host.hostname=mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net osrelease=14.1-RELEASE-p6 path=/mnt/srv/pot/jails/mariadb-amd64-14_1/m persist vnet vnet.interface=epair0b
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg
32-bit compatibility ldconfig path: /usr/lib32 /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:56:c5:73:37:0b
inet 10.192.0.3 netmask 0xffc00000 broadcast 10.255.255.255
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Clearing /tmp (X related).
Updating /var/run/os-release done.
Creating and/or trimming log files.
Updating motd:.
Starting syslogd.
Starting sendmail_submit.
Starting cron.
Thu Dec 5 16:41:45 UTC 2024
/usr/local/etc/pot/flavours/fbsd-update.sh -> /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp/fbsd-update.sh
=====> Executing fbsd-update script on mariadb-amd64-14_1
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update2.freebsd.org... done.
Fetching metadata signature for 14.1-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
No updates needed to update system to 14.1-RELEASE-p6.
No updates are available to install.
=====> Stop the pot mariadb-amd64-14_1
=====> Remove p46751d7c8f50c epair network interfaces
=====> unmount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp
=====> unmount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/dev
=====> Flavour: mariadb
=====> Executing mariadb pot commands on mariadb-amd64-14_1
=====> mount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp
=====> Source /usr/local/etc/pot/flavours/mariadb.d/local copied in the pot mariadb-amd64-14_1
=====> unmount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp
=====> /mnt/srv/pot/jails/mariadb-amd64-14_1/m/dev is already unmounted
=====> Starting mariadb-amd64-14_1 pot for the initial bootstrap
=====> mount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp
defaultrouter: 10.192.0.1 -> 10.192.0.1
===> Starting the pot mariadb-amd64-14_1
=====> Pot mariadb-amd64-14_1 jail params are: allow.set_hostname=false allow.raw_sockets allow.socket_af allow.chflags exec.clean mount.devfs enforce_statfs=2 sysvshm=new sysvsem=new sysvmsg=new children.max=0 devfs_ruleset=4 stop.timeout=10 name=mariadb-amd64-14_1 host.hostname=mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net osrelease=14.1-RELEASE-p6 path=/mnt/srv/pot/jails/mariadb-amd64-14_1/m persist vnet vnet.interface=epair0b
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg
32-bit compatibility ldconfig path: /usr/lib32 /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:08:0e:d7:5c:0b
inet 10.192.0.3 netmask 0xffc00000 broadcast 10.255.255.255
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Clearing /tmp (X related).
Updating /var/run/os-release done.
Creating and/or trimming log files.
Updating motd:.
Starting syslogd.
Starting sendmail_submit.
Starting cron.
Thu Dec 5 16:42:19 UTC 2024
/usr/local/etc/pot/flavours/mariadb.sh -> /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp/mariadb.sh
=====> Executing mariadb script on mariadb-amd64-14_1
WARNING /var/log/cook.log already exists
Step 1: Bootstrap package repo
pkg already bootstrapped at /usr/local/sbin/pkg
Step 2: Touch /etc/rc.conf
Step 3: Remove ifconfig_epair0b from config
Step 4: Disable sendmail
sendmail disabled in /etc/rc.conf
sendmail_submit disabled in /etc/rc.conf
sendmail_msp_queue disabled in /etc/rc.conf
Step 5: Create /usr/local/etc/rc.d
Step 6: Clean freebsd-update
Step 7: Install package consul
Updating FreeBSD repository catalogue...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] Fetching data.pkg: .......... done
Processing entries: .......... done
FreeBSD repository update completed. 35561 packages processed.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
consul: 1.19.2
Number of packages to be installed: 1
The process will require 124 MiB more space.
24 MiB to be downloaded.
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching consul-1.19.2.pkg: .......... done
Checking integrity... done (0 conflicting)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Installing consul-1.19.2...
===> Creating groups
Creating group 'consul' with gid '469'
===> Creating users
Creating user 'consul' with uid '469'
===> Creating homedir(s)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting consul-1.19.2: ..... done
Step 8: Install package openssl
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 9: Install package sudo
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be UPGRADED:
sudo: 1.9.16 -> 1.9.16p1
Number of packages to be upgraded: 1
2 MiB to be downloaded.
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching sudo-1.9.16p1.pkg: .......... done
Checking integrity... done (0 conflicting)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Upgrading sudo from 1.9.16 to 1.9.16p1...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting sudo-1.9.16p1: .......... done
Step 10: Install package ca_root_nss
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 11: Install package curl
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 12: Install package jq
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 13: Install package jo
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 14: Install package nano
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 15: Install package bash
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 16: Install package rsync
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 17: Install package mariadb106-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 9 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
boost-libs: 1.85.0
galera26: 26.4.16_3
icu: 74.2_1,1
libedit: 3.1.20240808,1
libxml2: 2.11.9
mariadb106-client: 10.6.19
mariadb106-server: 10.6.19
pcre2: 10.43
unixODBC: 2.3.12_1
Number of packages to be installed: 9
The process will require 545 MiB more space.
79 MiB to be downloaded.
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Fetching libxml2-2.11.9.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Fetching libedit-3.1.20240808,1.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Fetching icu-74.2_1,1.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Fetching galera26-26.4.16_3.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Fetching boost-libs-1.85.0.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Fetching mariadb106-client-10.6.19.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Fetching pcre2-10.43.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Fetching mariadb106-server-10.6.19.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Fetching unixODBC-2.3.12_1.pkg: .......... done
Checking integrity... done (0 conflicting)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Installing icu-74.2_1,1...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Extracting icu-74.2_1,1: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Installing libedit-3.1.20240808,1...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Extracting libedit-3.1.20240808,1: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Installing boost-libs-1.85.0...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Extracting boost-libs-1.85.0: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Installing pcre2-10.43...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Extracting pcre2-10.43: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Installing libxml2-2.11.9...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Extracting libxml2-2.11.9: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Installing galera26-26.4.16_3...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Extracting galera26-26.4.16_3: ....... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Installing mariadb106-client-10.6.19...
===> Creating groups
Creating group 'mysql' with gid '88'
===> Creating users
Creating user 'mysql' with uid '88'
===> Creating homedir(s)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Extracting mariadb106-client-10.6.19: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Installing unixODBC-2.3.12_1...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Extracting unixODBC-2.3.12_1: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Installing mariadb106-server-10.6.19...
===> Creating groups
Using existing group 'mysql'
===> Creating users
Using existing user 'mysql'
===> Creating homedir(s)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Extracting mariadb106-server-10.6.19: .......... done
=====
Message from boost-libs-1.85.0:
--
You have built the Boost library with thread support.
Don't forget to add -pthread to your linker options when
linking your code.
=====
Message from galera26-26.4.16_3:
--
Find the Galera Cluster documentation at
https://galeracluster.com/library/documentation/index.html
=====
Message from mariadb106-client-10.6.19:
--
MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for
my.cnf. Please move existing my.cnf files from those paths to
/usr/local/etc/mysql or /usr/local/etc. Sample
configuration files are provided in /usr/local/etc/mysql
and /usr/local/etc/mysql/conf.d.
The rc(8) script no longer uses /var/db/mysql/my.cnf for configuration
nor /var/db/mysql for logs and PID-file.
This port does NOT include the mytop perl script, this is included in
the MariaDB tarball but the most recent version can be found in the
databases/mytop port
%%WSREP%%Using wsrep clustering requires adding a configuration file.
%%WSREP%%Copy /usr/local/etc/mysql/conf.d/wsrep.conf.sample to
%%WSREP%%/usr/local/etc/mysql/conf.d/wsrep.conf and change what you need there.
=====
Message from mariadb106-server-10.6.19:
--
MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for
my.cnf. Please move existing my.cnf files from those paths to
/usr/local/etc/mysql or /usr/local/etc. Sample
configuration files are provided in /usr/local/etc/mysql
and /usr/local/etc/mysql/conf.d.
The rc(8) script no longer uses /var/db/mysql/my.cnf for configuration
nor /var/db/mysql for logs and PID-file.
This port does NOT include the mytop perl script, this is included in
the MariaDB tarball but the most recent version can be found in the
databases/mytop port
Using wsrep clustering requires adding a configuration file.
Copy /usr/local/etc/mysql/conf.d/wsrep.conf.sample to
/usr/local/etc/mysql/conf.d/wsrep.conf and change what you need there.
Step 18: Install package mariadb106-client
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 19: Install package node_exporter
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
node_exporter: 1.8.2
Number of packages to be installed: 1
The process will require 11 MiB more space.
4 MiB to be downloaded.
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching node_exporter-1.8.2.pkg: .......... done
Checking integrity... done (0 conflicting)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Installing node_exporter-1.8.2...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting node_exporter-1.8.2: .......... done
=====
Message from node_exporter-1.8.2:
--
If upgrading from a version of node_exporter <0.15.0 you'll need to update any
custom command line flags that you may have set as it now requires a
double-dash (--flag) instead of a single dash (-flag).
The collector flags in 0.15.0 have now been replaced with individual boolean
flags and the -collector.procfs` and -collector.sysfs` flags have been renamed
to --path.procfs and --path.sysfs respectively.
Step 20: Install package mysqld_exporter
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
mysqld_exporter: 0.12.1_23
Number of packages to be installed: 1
The process will require 9 MiB more space.
3 MiB to be downloaded.
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching mysqld_exporter-0.12.1_23.pkg: .......... done
Checking integrity... done (0 conflicting)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Installing mysqld_exporter-0.12.1_23...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting mysqld_exporter-0.12.1_23: ..... done
Step 21: Install package syslog-ng
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 9 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
e2fsprogs-libuuid: 1.47.1
glib: 2.80.5,2
ivykis: 0.43.2
json-c: 0.18
libffi: 3.4.6
mpdecimal: 4.0.0
py311-packaging: 24.1
python311: 3.11.10
syslog-ng: 4.8.0_2
Number of packages to be installed: 9
The process will require 234 MiB more space.
32 MiB to be downloaded.
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Fetching ivykis-0.43.2.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Fetching mpdecimal-4.0.0.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Fetching py311-packaging-24.1.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Fetching glib-2.80.5,2.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Fetching syslog-ng-4.8.0_2.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Fetching libffi-3.4.6.pkg: ......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Fetching json-c-0.18.pkg: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Fetching e2fsprogs-libuuid-1.47.1.pkg: ....... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Fetching python311-3.11.10.pkg: .......... done
Checking integrity... done (0 conflicting)
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Installing mpdecimal-4.0.0...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Extracting mpdecimal-4.0.0: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Installing libffi-3.4.6...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Extracting libffi-3.4.6: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Installing python311-3.11.10...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Extracting python311-3.11.10: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Installing py311-packaging-24.1...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Extracting py311-packaging-24.1: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Installing ivykis-0.43.2...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Extracting ivykis-0.43.2: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Installing glib-2.80.5,2...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Extracting glib-2.80.5,2: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Installing json-c-0.18...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Extracting json-c-0.18: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Installing e2fsprogs-libuuid-1.47.1...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Extracting e2fsprogs-libuuid-1.47.1: .......... done
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Installing syslog-ng-4.8.0_2...
[mariadb-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Extracting syslog-ng-4.8.0_2: .......... done
==> Running trigger: glib-schemas.ucl
Compiling glib schemas
No schema files found: doing nothing.
==> Running trigger: gio-modules.ucl
Generating GIO modules cache
=====
Message from python311-3.11.10:
--
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:
py311-gdbm databases/py-gdbm@py311
py311-sqlite3 databases/py-sqlite3@py311
py311-tkinter x11-toolkits/py-tkinter@py311
=====
Message from syslog-ng-4.8.0_2:
--
syslog-ng is now installed! To replace FreeBSD's standard syslogd
(/usr/sbin/syslogd), complete these steps:
1. Create a configuration file named /usr/local/etc/syslog-ng.conf
(a sample named syslog-ng.conf.sample has been included in
/usr/local/etc). Note that this is a change in 2.0.2
version, previous ones put the config file in
/usr/local/etc/syslog-ng/syslog-ng.conf, so if this is an update
move that file in the right place
2. Configure syslog-ng to start automatically by adding the following
to /etc/rc.conf:
syslog_ng_enable="YES"
3. Prevent the standard FreeBSD syslogd from starting automatically by
adding a line to the end of your /etc/rc.conf file that reads:
syslogd_enable="NO"
4. Shut down the standard FreeBSD syslogd:
kill `cat /var/run/syslog.pid`
5. Start syslog-ng:
/usr/local/etc/rc.d/syslog-ng start
Step 22: Clean package installation
The following package files will be deleted:
/var/cache/pkg/e2fsprogs-libuuid-1.47.1~362f74ac69.pkg
/var/cache/pkg/libedit-3.1.20240808,1.pkg
/var/cache/pkg/galera26-26.4.16_3~8cac47b5b6.pkg
/var/cache/pkg/boost-libs-1.85.0~edb16c42b4.pkg
/var/cache/pkg/consul-1.19.2.pkg
/var/cache/pkg/sudo-1.9.16p1.pkg
/var/cache/pkg/py311-packaging-24.1.pkg
/var/cache/pkg/sudo-1.9.16p1~e6c9757e56.pkg
/var/cache/pkg/python311-3.11.10~286ca605ff.pkg
/var/cache/pkg/mpdecimal-4.0.0~355dbb0218.pkg
/var/cache/pkg/syslog-ng-4.8.0_2~cf5f9ee289.pkg
/var/cache/pkg/libxml2-2.11.9~128b31ea34.pkg
/var/cache/pkg/libxml2-2.11.9.pkg
/var/cache/pkg/mariadb106-client-10.6.19~7b0e4f0947.pkg
/var/cache/pkg/unixODBC-2.3.12_1~2c2f5d2f8c.pkg
/var/cache/pkg/galera26-26.4.16_3.pkg
/var/cache/pkg/pcre2-10.43.pkg
/var/cache/pkg/json-c-0.18.pkg
/var/cache/pkg/mysqld_exporter-0.12.1_23~369ef4ea95.pkg
/var/cache/pkg/glib-2.80.5,2.pkg
/var/cache/pkg/node_exporter-1.8.2.pkg
/var/cache/pkg/syslog-ng-4.8.0_2.pkg
/var/cache/pkg/json-c-0.18~4c2b04b9f9.pkg
/var/cache/pkg/mariadb106-server-10.6.19.pkg
/var/cache/pkg/e2fsprogs-libuuid-1.47.1.pkg
/var/cache/pkg/pcre2-10.43~d476f63222.pkg
/var/cache/pkg/python311-3.11.10.pkg
/var/cache/pkg/icu-74.2_1,1.pkg
/var/cache/pkg/ivykis-0.43.2.pkg
/var/cache/pkg/glib-2.80.5,2~909ca79520.pkg
/var/cache/pkg/ivykis-0.43.2~07934ae53e.pkg
/var/cache/pkg/mysqld_exporter-0.12.1_23.pkg
/var/cache/pkg/node_exporter-1.8.2~d3c8df78fe.pkg
/var/cache/pkg/libffi-3.4.6~e038c4b1cf.pkg
/var/cache/pkg/mpdecimal-4.0.0.pkg
/var/cache/pkg/icu-74.2_1,1~23bba2980f.pkg
/var/cache/pkg/py311-packaging-24.1~b3b408ec53.pkg
/var/cache/pkg/unixODBC-2.3.12_1.pkg
/var/cache/pkg/libffi-3.4.6.pkg
/var/cache/pkg/boost-libs-1.85.0.pkg
/var/cache/pkg/mariadb106-server-10.6.19~59a36f4046.pkg
/var/cache/pkg/consul-1.19.2~ffcc2d4893.pkg
/var/cache/pkg/mariadb106-client-10.6.19.pkg
/var/cache/pkg/libedit-3.1.20240808,1~f5ee367ad6.pkg
The cleanup will free 144 MiB
Deleting files: .......... done
Step 23: Create mysql directory
Step 24: Clean cook artifacts
Step 25: Install pot local
Step 26: Set file ownership on cook scripts
Step 27: Make cook script executable
setting executable bit on /usr/local/bin/cook
Step 28: Create rc.d script to start cook
creating rc.d script to start cook
Step 29: Make rc.d script to start cook executable
Setting executable bit on cook rc file
Step 30: Enable cook service
enabling cook
cook enabled in /etc/rc.conf
=====> Stop the pot mariadb-amd64-14_1
=====> Remove p46751d7eaf50c epair network interfaces
=====> unmount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/tmp
=====> unmount /mnt/srv/pot/jails/mariadb-amd64-14_1/m/dev
===> exporting mariadb-amd64-14_1 @ 1733417021 to /tmp/mariadb-amd64-14_1_4.10.4.xz