dbbot Configuration and Single-Node Deployment Demo

Main example: deploy MySQL standalone instances (8.4.9, port 3306) on three machines concurrently. A 5.7.39 / 3310 legacy example is kept near the end to show how to customize an older MySQL deployment.

Use a fresh environment for deployment demos whenever possible.

single_node.yml performs Linux initialization by default, including dependency installation, SELinux changes, stopping firewalld, and managed sysctl updates. It is not a good first run on an existing business host.

MySQL 9.7.x uses glibc2.28 packages and is not supported on the CentOS/RHEL 7 family; use MySQL 8.4.x on those systems.

1. Optional: Upload the installation package in advance

If fcs_auto_download_packages: true in common_config.yml, dbbot can download the package automatically. Offline environments can upload the package to:

/usr/local/dbbot/mysql_ansible/downloads

Current recommended example filename:

mysql-8.4.9-linux-glibc2.17-x86_64-minimal.tar.xz

2. Configure host inventory inventory/hosts.ini

[dbbot_mysql]
192.0.2.131 ansible_user=root ansible_ssh_pass="'<your_password>'"
192.0.2.132 ansible_user=root ansible_ssh_pass="'<your_password>'"
192.0.2.133 ansible_user=root ansible_ssh_pass="'<your_password>'"

Notes:

  • Currently only root is supported for deployment.
  • Keep the password form as "'password'".

3. Configure common parameters

Edit playbooks/common_config.yml:

mysql_version: "8.4.9"
mysql_port: 3306

advanced_config.yml is optional and can usually keep its defaults.

Default password notes:

  • dbbot’s public default passwords follow Dbbot_<user>@8888 / Dbbot_<linux_user>@9999.
  • The default is fcs_allow_dbbot_default_passwd: false, so if you do not change these passwords, the standalone demo is blocked by pre_tasks.
  • In production, change these passwords first and then run the standard command without -e.
  • Only for quick validation in a non-production environment should you explicitly allow the public default passwords.

4. Perform standalone deployment

If you have already replaced the public default passwords with your own, run:

cd /usr/local/dbbot/mysql_ansible/playbooks
ansible-playbook single_node.yml

If this is only a non-production demo and you temporarily keep dbbot’s public default passwords, run:

cd /usr/local/dbbot/mysql_ansible/playbooks
ansible-playbook single_node.yml -e '{"fcs_allow_dbbot_default_passwd": true}'

Notes:

  • The -e example above is only for non-production deployments.
  • If you run the command without -e, replace the public default passwords first. Otherwise the playbook fails and stops in pre_tasks.

For scripts, CI, or SSH one-liners, pass dbbot_confirmation_input: "confirm" explicitly. Writing confirm to standard input is not a substitute for this variable:

cd /usr/local/dbbot/mysql_ansible/playbooks
python3 /usr/local/dbbot/portable-ansible/ansible-playbook \
  single_node.yml \
  -e '{"fcs_allow_dbbot_default_passwd": true, "dbbot_confirmation_input": "confirm"}'

5. Validation example

mysql -uadmin -h127.0.0.1 -P3306 -pDbbot_admin@8888 -e "select @@version"

Quick login is enabled by default. You can also run:

su mysql
db3306

6. Legacy customization example: 5.7.39 / 3310

To demonstrate an older MySQL deployment, change the common parameters to:

mysql_version: "5.7.39"
mysql_port: 3310

The matching offline package filename is:

mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz

The deployment command stays the same:

cd /usr/local/dbbot/mysql_ansible/playbooks
ansible-playbook single_node.yml -e '{"fcs_allow_dbbot_default_passwd": true}'

Validate the legacy instance:

mysql -uadmin -h127.0.0.1 -P3310 -pDbbot_admin@8888 -e "select @@version"
su mysql
db3310

Pre-deployment checklist

  • inventory/hosts.ini host information is correct.
  • playbooks/common_config.yml common parameters are correct.
  • playbooks/vars/var_xxx.yml playbook-specific parameters are filled in.
  • Optional: playbooks/advanced_config.yml advanced parameters are confirmed.