[How-to] Host PBXact or PBXact SaaS on Azure
This step-by-step guide aims to help anyone install and start using PBXact or PBXact SaaS on the Azure hosting platform.
Info |
---|
NOTICE While no incompatibilities between the FreePBX ISO and Azure's hosting platform have been detected at the time of writing this guide, Sangoma does not officially Support hosting FreePBX/PBXact on platforms other than Sangoma Cloud. This means that, while Sangoma Support Services may still be accessed, any platform-related issue will not be covered. |
...
Create the Virtual Machine:
Action > New > Virtual Machine...Specify Name and Location: give your VM any Name (example: PBXact)
Specify Generation: Generation 2
Assign Memory: depends on your PBX processing needs (number of users, concurrent calls, etc.). As examples of general approximates: 2GB could prove to be enough for up to 25 users, while 4GB could prove to be enough for up to 100 users
Connect Virtual Hard Disk: set the Size of the virtual hard disk drive file
Note: the size will depend on your PBX storage needs, 10GB minimum are recommended for basic PBXact operation. If calls are to be recorded, the disk size would need to be accordingly bigger, considering that each minute of recorded SIP audio consumes ~1MB of disk space. The size here should be in accordance with Azure's plan which we'll select later
Installation Options: for the Media, select the previously downloaded FreePBX .iso file
Click Finish to create the VM
Edit the Settings of the VM:
right-click on the VM name > Settings...Security: make sure the option "Enable Secure Boot" is disabled
Click OK to save an apply the changes
...
Start the VM: double-click on the VM name and then click on Start in the VM window that will be displayed
The first screen of the FreePBX installation will get displayed, select:
FreePBX 15 Advanced Installation > Advanced Installation with Normal Video > Advanced Install with Asterisk 16 via Standard VideoThe installation UI will load up and get displayed:
INSTALLATION DESTINATION
make sure the hard disk drive is selected (this is the default) and click Done
select partition scheme as: Standard Partition
Click here to create them automatically
select the swap partition and press the "-" sign to delete it
click on Done twice
Accept Changes
Begin Installation
The installation will begin; while the installation is running set the root password and take note of it
Once the installation is complete, click on Reboot on the lower right corner of the VM's screen
...
Back again in the Hyper-V Manager application, enter to edit the Settings of the VM once again:
right-click on the VM name > Settings...Hard Drive:Edit
Choose Action: Convert
Choose Disk Format: VHD
Choose Disk Type: Fixed size
Configure Disk: set the Name of the virtual hard disk including the complete path before it
Note: take note of the complete location where the virtual hard disk file will get created and stored as it will be needed later (by default in Windows for example: C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\myhdd.vhd)
Click Finish to convert the virtual hard disk drive file
After a few moments, the virtual hard disk file will have the correct format and type for using it in Azure
...
Search for and open Storage accounts (not Storage accounts (classic)) and click on "Create storage account". Set the parameters similarly to the following:
Click Create
Once the Storage account has been created, open it: search for and open Storage accounts (not Storage accounts (classic)) and click on the storage account just created ("pbxactsan" in this example) in order to create the Container:
Click to open the Container just created ("pbxact-container" in this example), and then click on Upload in order to upload the virtual hard disk drive file of your local FreePBX VM machine (see note on step 2.b.i.3. above for the exact location of this file inside your local computer). After locating and selecting the file, click on the Upload blue button. The upload will begin.
Info |
---|
IMPORTANT A considerably faster method for uploading the virtual hard disk file (better transfer speeds as well as smaller file uploaded due to efficient compressing) is the following: After meeting the OPTIONAL PRE-REQUISITES listed at the beginning of this guide, execute the following command in the command line (if using Windows, PowerShell is recommended over cmd)(change the parameters in italics accordingly): C:\Go\bin\azure-vhd-utils\azure-vhd-utils.exe --verbose upload --localvhdpath 'C:\Users\Public\Documents\Hyper-V\Virtual hard disks\myhdd.vhd' --stgaccountname 'storageaccountname' --stgaccountkey 'ThEStoRagEacCountKEyOFYourazUreStORaGEacCoUNt==' --containername 'container_name' --blobname 'name_for_the_disk_file_to_receive_once_uploaded.vhd' The Storage account key (stgaccountkey) is seen in the Azure Portal under: the Storage account > Access keys |
...
After uploading is complete, back in Azure Portal: search for and open Images and click on "Create image". Set the parameters similarly to the following (Browse for and Select the .vhd file just uploaded in the previous step):
Click Create
Once the Image has been created, open it: search for and open Images and click on the Image just created ("PBXact_image" in this example) in order to create the Virtual Machine:
Create the VM similarly as follows --- IMPORTANT: select the Size (plan) according to your PBX processing needs (number of users, concurrent calls, if the calls will use demanding features such as recording, queueing, transcoding, encryption, etc.).
As examples of general approximates: 2GB-1CPU could prove to be enough for up to 25 users doing up to 15 concurrent simple calls, while 4GB-2CPUs could prove to be enough for up to 100 users doing up to 60 concurrent simple calls. It all depends on the specific needs of each particular scenario.Note: remember the Username and Password set here as those credentials will be used the first time you'd want to access the console (SSH)
Click on "Review + create" and then on "Create"
After some minutes your VM will be completely created and ready to be used. To access it just search for and open Virtual machines and click on the Virtual machine just created ("PBXact15" in this example). An Overview of the VM will be displayed showing its assigned public IP address of your newly hosted PBX, use this IP for all communications (webUI and SSH access, SIP, Zulu Desktop, etc.).
...
Search for and open Virtual machines and click on the Virtual machine just created ("PBXact15" in this example)
Click on "Networking" and then on the "Add inbound port rule" button. Add the rule as follows (substitue 1.2.3.4 accordingly with the public IP address from where you are connecting to the hosted PBX VM):
After having confirmed the rule is working as expected, proceed to delete all other public rules (would be the other ones also with their Priority assigned within the 300s range):
...
Transform FreePBX to PBXact or PBXact SaaS
The final step is just to transform the FreePBX brand new installation into PBXact or PBXact SaaS. For this, just use your previously acquired PBXact/PBXact SaaS Deployment ID when activating this FreePBX instance: open an SSH session using the credentials set when creating the VM in Azure (step 4 just above) and execute the following command as root user:
|
(in order to change to root user)
|
(change depID_of_pbxact accordingly to your PBXact/PBXact Saas Deplyment ID)
...
If, after the complete execution of the command above, the webUI would not complete or not yet reflect PBXact's style, execute the following additional commands:
|
and then, repeat the activate command if needed.
...