How to Rapidly Deploy an Ubuntu Server, High-Availability Cluster with LinuxHA
This tutorial will guide you how to configure the Ubuntu Server platform necessary for running LinuxHA. These instructions are written for installing VirtualBox Ubuntu Server virtual machines (VMs).
Create two VirtualBox VMs of identical size.
Enable four network adapters per VM.
Start the Ubuntu Server installation on both VMs.
After installation is complete, set a root password with the sudo passwd root command, unless you chose F6 Other Options/Expert mode at the beginning of Ubuntu Server installation and already have this root password set.
Login as root to change your user account directory path. For example, use the command usermod ubuntu-admin --move-home --home /ubuntu-admin to move /home/ubuntu-admin to /ubuntu-admin. This is necessary, as LinuxHA mounts a DRBD volume onto the /home directory. After moving your user account directory, add the ubuntu-admin user to the sudo group with usermod -aG sudo ubuntu-admin.
Logout root, and login this time with your user account before you run LinuxHA.
Take a snapshot (press HOST + T on your keyboard) of your VMs before proceeding. This will allow you to quickly revert to a fresh Ubuntu Server image before testing an updated LinuxHA revision.
Transfer LinuxHA to your VMs. Issue a ip addr show command, and take note of what your VM's IP
address is. For example, if your VM is set to IP address 192.168.0.1, and you moved your user account directory
from /home/ubuntu-admin to /ubuntu-admin, use the following command to copy LinuxHA to your VM:
Set LinuxHA to executable with sudo chmod u+x LinuxHA.sh, and start the script with sudo sh LinuxHA.sh on both VMs at the same time. If there is a delay starting the script on a VM, LinuxHA is designed to wait until the second VM is connected.
LinuxHA uses functions that only work with Bash. To switch from Dash to Bash, use the following command:
If you are using a slow computer, make sure you close all web browsers, email programs, etc. before you run LinuxHA on a VM. The DRBD replicated storage is sensitive to a high load average and will issue a fencing routine if too many tasks bog down your computer while LinuxHA is running.
Save time and bandwidth when testing LinuxHA by installing and configuring Apt-Cacher-Server.
|Home | Services | Contact|
Copyfree T.L. Bean. All Rights Reversed.