The Microsoft Azure provider is just a regular WordPress plugin – upload and activate it from the WordPress PLUGINS screen.
Connecting to Microsoft Azure and automatically creating servers requires a lot more moving parts to be synchronized than simpler providers such as DigitalOcean and Linode. In particular:
First, you must make sure you create an SSH key pair to the region where you will be building your servers. Each region will need at least one key-pair.
The Azure provider then needs connection and security information before it can be used. You can provide this information under WPCLOUD DEPLOY->SETTINGS->CLOUD PROVIDERS->AZURE. There are several steps to this process – please follow along very CAREFULLY!
The basic Microsoft Azure provider can only be used in one region. In order to use it in multiple regions, you need to install the VIRTUAL PROVIDER add-on. Once that has been installed, you can create a virtual provider for each region – learn more in the Virtual Provider documentation.
Before you can get started, you must get a set of credentials from your Azure portal. These credentials are:
If you don’t want to use the command line, we’re working on figuring out the proper steps for doing it visually in the Azure Portal. But, we haven’t quite gotten it right yet.
The items needed are not all located in the same place in the portal. The official Microsoft documentation for them is located here: https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal
Unfortunately, that documentation is not exactly the easiest to understand – Microsoft wanders all over the place in it.
The following are the basic steps as far as we can tell. Unfortunately at least one key step is missing and we’re in contact with Microsoft about it:
To create or upload SSH keys to Azure, follow the instructions in this Microsoft document: https://docs.microsoft.com/en-us/azure/virtual-machines/ssh-keys-portal.
As mentioned above, each region you use will need their own key-pair.
Server Sync cannot be used on AWS servers – neither as source nor destination.
The function to copy a site to a new server will not work with this provider.
When deleting a site, the option to also delete all local backups will not work with this provider.
Azure, like AWS and some other cloud services, do not allow ssh logins using the “root” user. So we have setup a user called wpcdadmin as the default admin user. When logging in with your ssh client, make sure your user name is set to wpcdadmin instead of “root”.
Because we cannot use the root login, the following WPCD features will not work:
It is possible that server resources such as disks, IP address and resource groups might not be deleted in Azure even though the VM has been deleted in WPCD. This is because Azure will not automatically delete those items when a server is deleted. And it takes Azure a long time to delete a server which exceeds the PHP script execution time. Therefore, whenever you delete a server in WPCD you should double-check that it has been deleted in Azure.
We’ve attempted to mitigate this issue a bit by scheduling a CRON process to clean up undeleted items shortly after deleting a server. But there’s no guarantee that we will get everything – so always double-check your Azure console to make sure that all items are deleted – you do not want to be surprised with a bill for items you thought you deleted!
Azure requires your server names to be unique. So, we will be adding a random 5 character string to the end of every server name you specify to avoid inadvertent duplicates. This means that if you try to create a server with the name “MYNEWSERVER” we will convert it into something like “MYNEWSERVER-axytz”.
All servers, regardless of number of CPUs, will be provisioned with 50 GB of disk space.