Skip to content

MJCO/civicrm-buildkit-azuredeploy

Repository files navigation

Deploy to 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.

The Deployed VM

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.

Deployment Instructions

Using the Azure CLI (az)

  1. Make sure you have installed the latest version of the Azure CLI.

  2. Login to Azure with az login.

  3. (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"
  4. (Optional) Copy the file azuredeploy.parameters.json.example to azuredeploy.parameters.json and adjust the values as required.

  5. (Optional) Create a Resource Group to hold your new deployment:

    az group create --name YourResourceGroup --location uksouth
  6. Deploy the Template

    1. Clone this repository:

      git clone https://github.com/MJCO/civicrm-buildkit-azuredeploy/
    2. Change into the directory:

      cd civicrm-buildkit-azuredeploy
    3. 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

  1. Click on the Deploy to Azure button above.
  2. 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

  1. Navigate to the Azure Portal.
  2. Login to the Azure portal.
  3. Create a new resource from a template by clicking on Create a Resource, searching for Template and selecting Template deployment (deploy using custom templates).
  4. Click on Build your own template in the editor.
  5. Copy and Paste the contents of azuredeploy.json into the editor, replacing the existing contents.
  6. Click on Save.
  7. 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

Other Help

If you are new to Azure virtual machines, see:

If you are new to template deployment, see:

If you are new to CiviCRM development or BuildKit, see:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published