Installing Add-Ons in High Availability

Now we can see how to install add-ons in a high-availability environment. We will take an in-depth look into the process of adding add-ons that have a service running on the servers. This includes the Sonata Suite, VitXi, OpenVPN, and Maintenance add-on modules. These add-ons require special steps for installation in high-availability environments.

Let’s begin with the Sonata Suite. The first application of Sonata Suite we will look into installing is Sonata Switchboard.

Before proceeding, make sure that the Primary Server is set as a Master. You can use the role command to verify this.

First, go to the Floating IP Address on your browser. There, install Sonata Switchboard as normal from Admin > Add-Ons > Add-Ons. Then, go to the Sonata Switchboard URL, which is https://FloatingIPAddress/switchboard by default. Follow the installation wizard and finish installing Sonata Switchboard.

Next, copy the files that we are going to replicate from the Primary Server to the Secondary Server. Run the following commands in the Primary Server.

Afterward, run the bascul command on the Primary Server to turn the Secondary Server into the Master.

Now, go back to the Floating IP Address on your browser. You will now be navigating on the Secondary Server. Here, install Sonata Switchboard as you did in the Primary Server by installing the add-on and following the Wizard.

Then, create the symbolic link for the settings.conf file in the Secondary Server.

Finally, execute the bascul command once again from the Primary Server to return the cluster back to normal where the Primary Server is set as the Master.

With this, you now have Sonata Switchboard installed in your high-availability environment.

Let’s move on to Sonata Recordings. The process will be very similar to the Sonata Switchboard. With the difference of adding the Sonata Recordings service automation at the end.

First, go to the Floating IP Address on your browser. Here, install Sonata Recordings from the add-ons module under Admin > Add-Ons > Add-Ons. Once installed, go to the Sonata Recordings URL, which is https://FloatingIPAddress/recordings by default. There, follow the wizard to finish with the installation.

Next, copy the files that we are going to replicate from the Primary Server to the Secondary Server. Run the following commands on the Primary Server.

Now, execute the bascul command on the Primary Server to turn the Secondary Server into the Master.

Afterward, go back to the Floating IP Address on your browser. You will now be navigating the Secondary Server. Here, install Sonata Recordings as you did on the Primary Server.

Then, create the symbolic link for the settings.conf file on the Secondary Server.

Now, execute the bascul command on the Primary Server to return the cluster to normal where the Primary Server is the Master.

Finally, add the Sonata Recordings service automation. Run the following commands on both servers.

Then, run the following commands on the Primary Server.

With this, you now have Sonata Recordings installed in your high-availability environment.

Let’s move towards Sonata Billing. The process will be exactly the same as the Sonata Switchboard.

First, go to the Floating IP Address and install Sonata Billing from the add-ons module under Admin > Add-Ons > Add-Ons. Once installed, go to the Sonata Billing URL, which is https://FloatingIPAddress/billing by default. There, follow the wizard and finish the installation.

Next, copy the files that we are going to replicate from the Primary Server to the Secondary Server. Run the following commands on the Primary Server.

Now, execute the bascul command on the Primary Server to turn the Secondary Server into the Master.

Go back to the Floating IP Address on your browser. You will now be navigating the Secondary Server. Here, install Sonata Billing as you did in the Primary Server.

Then, create the symbolic link for the settings.conf file on the Secondary Server.

Finally, execute the bascul command once again from the Primary Server to return the cluster back to normal where the Primary Server is set as the Master.

With this, you now have Sonata Billing installed in your high-availability environment.

Let’s continue with Sonata Stats. This process is similar to Sonata Recordings but has some additional files to copy.

First, go to the Floating IP Address on your browser and install Sonata Stats from the add-ons module under Admin > Add-Ons > Add-Ons. Then, go to the Sonata Stats URL which is https://FloatingIPAddress/stats by default. There, follow the wizard to finish with the installation. Next, copy the files that we are going to replicate from the Primary Server to the Secondary Server. Run the following commands on the Primary Server.

Now, execute the bascul command on the Primary Server to turn the Secondary Server into the Master.

Go back to the Floating IP Address on your browser. You will now be navigating the Secondary Server. Here, install Sonata Stats as you did in the Primary Server.

Then, create the symbolic link for the .env file on the Secondary Server.

Now, execute the bascul command on the Primary Server to return the cluster to normal where the Primary Server is the Master.

Finally, add the Sonata Stats service automation. Run the following commands on both servers.

Then, run the following commands in the Primary Server.

With this, you now have Sonata Billing installed in your high-availability environment.

Let’s finish with the Sonata Suite with Sonata Dialer. The process is similar to the Sonata Stats.

First, go to the Floating IP Address on your browser, and install Sonata Dialer from the add-ons module under Admin > Add-Ons > Add-Ons. Once installed, go to the Sonata Dialer URL which is https://FloatingIPAddress/dialer by default. There, follow the wizard to finish the installation.

Next, copy the files that we are going to replicate from the Primary Server to the Secondary Server. Run the following commands on the Primary Server.

Now, execute the bascul command on the Primary Server to turn the Secondary Server into the Master.

Go back to the Floating IP Address on your browser. You will now be navigating the Secondary Server. Here, install Sonata Stats as you did in the Primary Server.

Then, create the symbolic links for the .env file on the Secondary Server.

Now, execute the bascul command on the Primary Server to return the cluster to normal where the Primary Server is the Master.

Finally, add the Sonata Dialer service automation. Run the following commands on both servers

Then, run the following commands in the Primary Server.

With this, you now have Sonata Dialer installed in your high-availability environment. Now all of the Sonata Suite is up and running in your high-availability environment!

Let’s move towards VitXi, our WebRTC solution.

Beforehand, make sure that your cluster is normalized with the Primary Server set as the Master. You can use the role command to verify this.

First, go to the Floating IP Address on your browser, and follow the installation procedure for VitXi from VitXi’s manual. VitXi installation requires you to install the add-on from Admin > Add-Ons > Add-ons, make various VitalPBX configurations, and follow the installation wizard from VitXi’s URL which is https://FloatingIPAddress/webrtc by default. This process is detailed in VitXi’s manual.

With VitXi completely installed and VitalPBX configured, copy the files that we are going to replicate from the Primary Server to the Secondary Server. Run the following commands on the Primary Server.

Run the bascul command on the Primary Server to turn the Secondary Server into the Master.

Go back to the Floating IP Address on your browser. You will now be navigating the Secondary Server. Here, install Sonata Stats as you did in the Primary Server.

Then, create the symbolic links for the .env file on the Secondary Server.

Now, execute the bascul command on the Primary Server to return the cluster to normal where the Primary Server is the Master.

Finally, add the Sonata Dialer service automation. Run the following commands on both servers.

Then, run the following commands in the Primary Server.

With this, you now have VitXi installed in your high-availability environment!

We can now move towards the OpenVPN add-on module.

First, go to the Floating IP Address on your browser, and install the OpenVPN add-on from the add-ons module under Admin > Add-Ons > Add-Ons.

Once installed, copy the files that we are going to replicate from the Primary Server to the Secondary Server. Run the following commands on the Primary Server.

Run the bascul command on the Primary Server to turn the Secondary Server into the Master.

Go back to the Floating IP Address on your browser. You will now be navigating the Secondary Server. Here, install the OpenVPN add-on as you did in the Primary Server.

Then, create the symbolic link for the OpenVPN Path on the Secondary Server.

Finally, add the OpenVPN service automation. Run the following commands on both servers.

Then, run the following commands in the Primary Server.

With this, you now have OpenVPN installed in your high-availability environment!

Let’s move toward the Maintenance add-on. This is the final add-on that requires special steps for installation in a high-availability environment.

First, go to the Floating IP Address on your browser and install the Maintenance add-on module from the add-ons module under Admin > Add-Ons > Add-Ons.

Once installed, execute the bascul command on the Primary Server to turn the Secondary server into the Master.

Go back to the Floating IP Address on your browser. You will now be navigating the Secondary Server. Install the Maintenance add-on as you did on the Primary Server.

Afterward, run the bascul command on the Primary Server once again to return the cluster to normal, where the Primary Server is set as the Master.

Because the Maintenance cron file is copied to a shared directory at /etc/cron.d/vpbx_maintenace that has other system cron services active, we recommend first creating the Maintenance on the Primary Server first, then using the bascul command to switch the server roles, and finally create the same maintenance on the Secondary Server.

Since the databases are synchronized, it is only necessary to go to Admin > Tools > Maintenance and click on Save and Apply Changes.

With this, you now have the Maintenance add-on installed in a high-availability environment.

These are all the add-ons that require special attention and steps for installation in a High Availability environment. The rest of the add-ons can be installed similarly to how the Maintenance add-on was installed. The general steps for the rest of the add-ons are as follows.

  1. Verify that the server cluster is normalized where the Primary Server is set as the Master. This can be verified with the role command.
  2. Go to the Floating IP Address on your browser.
  3. Install the add-on on the Primary Server from the add-ons module under Admin > Add-Ons > Add-Ons.
  4. Use the bascul command to switch the servers’ roles.
  5. Install the add-on on the Secondary Server from the add-ons module under Admin > Add-Ons > Add-Ons.
  6. Use the bascul command again to normalize the server cluster and have the Primary Server as the Master.

With this done, you now have a full high-availability environment with add-ons in VitalPBX 4!

What are your feelings
Updated on December 16, 2023