Follow the steps below to deploy the ACP Cluster Version (v1.4 and above)
The ACP is now fully clustered. This necessitates some changes in deployment. Follow all steps, including confirmatory checks:
Overview
(1) ACP Cluster comes with three bootable binaries, ACP Primary, ACP Secondary and ACP Tertiary
(2) Deploy ACP Primary onlyh if you want to run a single non-clustered mode
(3) Deploy ACP Primary first, then deploy the ACP Secondary and ACP Tertiary for propert clustering and horizontal scaling. 1 ACP Primary, 1 ACP Secondary and 1 ACP Tertiary Host is the recommended minimum cluster size to avoid possible arbitration issues in the ACP Cluster.
(4) To deploy more than 3 hosts in the cluster, simply use the ACP Tertiary image and change the hostnames and ssh keys and a few other config (see below)
(5) ACP Primary is named io and is configured to cluster with ACP Secondary named europa, and ACP Tertiary named ganymede. Additional cluster members are named callisto, amalthea, himalia, elara, pasiphae. Yes those are jupiter’s moons in order of naming.
We use Star Cluster Architecture.
Deploy ACP Primary
(1) Deploy the bootable ACP Primary image
(2) Bootstrap mysql cluster –
– in /var/lib/mysql/grastate.dat, check that safe_to_bootstrap: 1
– start mysql bootstrap mode: sudo systemctl start mysql@bootstrap.service
Checkpoint 1: sudo systemctl status mysql@bootstrap.service returns “Active: active (running)”
(3) Add ACP Plugin and ACP Pro Plugin.
(4) Set up SMTP config.
Checkpoint 2: Sending a test email from the SMTP Plugin works
(5) Register a user using a valid email
(6) Once user is registered, login and create a guest server
Checkpoint 3: (i) Can ping guest server and (ii) Can log into guest server
Deploy ACP Secondary
(1) Deploy the bootable ACP Secondary image
(2) Make sure ACP Secondary image is accessible via its DNS name, europa or via its assigned IP AND
(3) ACP Secondary (europa) can ping ACP Primary (io) AND vice versa
(4) Make sure ssh host authentication works
– From ACP Primary (DNS name io), ssh into into ACP Secondary (europa): sudo ssh root@europa
– From ACP Secondary (DNS name europa), ssh into into ACP Primary (io): sudo ssh root@io
– Accept/Save host key as needed
Checkpoint 4: ssh into the other host as root should work without password challenge
(5) Start mysql on ACP Secondary (europa)
– sudo systemctl start mysql
– Status should show Active/Running AND
– mysql -u root -p -e “show status like ‘%local%'” should show wsrep_local_state_comment=synced
(6) Make sure file sync from Primary is working by deleting binaries:
– sudo rm -f /opt/acclaim/bin/*
– they should be synced up from Primary after about 1 minute
(7) Make sure ACP Secondary has joined ACP Cluster
– tail -f /opt/acclaim/log/centauri.log should show cluster size of 2
(8) Create new guest host in ACP Web GUI
– The new guest should be hosted on the ACP Secondary
(9) Repeat steps 1-98 above for ACP Tertiary
Deploy Additional ACP Hosts
Follow all steps in Deploying ACP Tertiary except
(1) Rename host from ganymede to next name on the list {callisto, amalthea, himalia, elara, pasiphae}
– Change host name: sudo hostnamectl set-hostname <new name>
– Change server-id AND node name to match in: /etc/mysql/mysql.conf.d/mysqld.cnf
– Reboot server: sudo reboot
(2) Because the SSH Key that comes in the Tertiary Image is specific to host ganymede, we need to replace it by generating new ssh keys specific to this ACP Host
– sudo ssh-keygen (overwrite existing key_id)
– Copy sudo cat /root/.ssh/id_rsa.pub to other hosts’ /root/.ssh/authorized_keys
– Test pair-wise SSH authentication as described in step (2) above