Deployment of CiviCRM BuildKit on Microsoft Azure
This template allows you to deploy a simple Linux VM with CiviCRM BuildKit installed.
This template will provide you with configurable options for:
- Ubuntu Linux version
- CiviCRM Buildkit URL pattern
- Azure DNS name
- VM UserName
This template will deploy an A1 size VM in the resource group location and return the FQDN of the VM and an SSH command example.
This template will result in a VM (plus associated resources) running the chosen version of Ubuntu LTS with the following scripted install steps performed automatically:
- Curl installed
- Chosen admin user set to
NOPASSWD
for using Sudo. - Buildkit installed (using
--full
) to/opt/buildkit
- Buildkit Bin on PATH (via script placed in
/etc/profile.d
) - Buildkit configured to generate site URLs using the chosen URL Template.
You will need to run the post-installation configuration steps for Buildkit as outlined in the docs. You will not need to set the path.
Using the Azure CLI (az
)
-
Make sure you have installed the latest version of the Azure CLI.
-
Login to Azure with
az login
. -
(Optional) You may need to change the active subscription.
Get a list of Azure Subscriptions:
az account list --output table
Set the subscription to your chosen subscription:
az account set --subscription "Your Subscription Name"
-
(Optional) Copy the file
azuredeploy.parameters.json.example
toazuredeploy.parameters.json
and adjust the values as required. -
(Optional) Create a Resource Group to hold your new deployment:
az group create --name YourResourceGroup --location uksouth
-
Deploy the Template
-
Clone this repository:
git clone https://github.com/MJCO/civicrm-buildkit-azuredeploy/
-
Change into the directory:
cd civicrm-buildkit-azuredeploy
-
Deploy the template to Azure:
az group deployment create ` --name <YourDeploymentName> ` --resource-group <YourResourceGroup> ` --template-file azuredeploy.json ` --parameters `@azuredeploy.parameters.json
Notes:
-
Replace anything wrapped in "<" and ">" with the values you used previously or your chosen value - avoid spaces in names.
-
The ` preceeding the @ symbol in the command is required for PowerShell but must be ommitted for CMD, MacOS and Linux terminal emulators.
-
You can omit the
--parameters
option and you will be asked for required values - not recommended. -
The example above has been split over multiple lines for readability. It should still be copy/paste ready but for convenience the single line command is:
az group deployment create --name <YourDeploymentName> --resource-group <YourResourceGroup> --template-file azuredeploy.json --parameters `@azuredeploy.parameters.json
-
-
Using the Azure UI (https://portal.azure.com
) - Automatic Steps
- Click on the Deploy to Azure button above.
- Complete the requested information, including the following required fields:
- Resource Group - You can select an existing group or create a new one.
- Location - The Azure region/datacenter you wish to host your deployment.
- Admin Username - The Linux username you wish to use for your account.
- Admin Password or Key - The single line SSH public key you wish to use for your user.
- DNS Label Prefix - The single word or hyphen-separated phrase you wish to use as your Azure DNS label
Using the Azure UI (https://portal.azure.com
) - Manual Steps
- Navigate to the Azure Portal.
- Login to the Azure portal.
- Create a new resource from a template by clicking on Create a Resource, searching for Template and selecting Template deployment (deploy using custom templates).
- Click on Build your own template in the editor.
- Copy and Paste the contents of
azuredeploy.json
into the editor, replacing the existing contents. - Click on Save.
- Complete the requested information, including the following required fields:
- Resource Group - You can select an existing group or create a new one.
- Location - The Azure region/datacenter you wish to host your deployment.
- Admin Username - The Linux username you wish to use for your account.
- Admin Password or Key - The single line SSH public key you wish to use for your user.
- DNS Label Prefix - The single word or hyphen-separated phrase you wish to use as your Azure DNS label
If you are new to Azure virtual machines, see:
- Azure Virtual Machines.
- Azure Linux Virtual Machines documentation
- Azure Windows Virtual Machines documentation
- Template reference
- Quickstart templates
If you are new to template deployment, see:
If you are new to CiviCRM development or BuildKit, see: