Note: the most up to date information about the project can be found in the github page (link above).
In this blog we cover the deployment of ACS (Alfresco Content Services) Enterprise 6.1 on Azure using VMs. The deployment consists of two mayor steps:
Creating Azure Managed Images containing a base installation of the corresponding Alfresco component (Alfresco Content Services, Alfresco Search Services...).
Building an Azure infrastructure (Load balancers, VMs, networks, public ips, etc) and deploying Alfresco Enterprise 6.1 to it.
The final ACS architecture looks like this:
The tools and code used in this blog to deploy ACS Enterprise 6.1 are not officially supported by Alfresco. They are used as a POC to show you how you can use OpenSource tools to deploy and configure resources and applications to Microsoft Azure in an automated way.
The software used to build and deploy ACS Enterprise 6.1 is available in a public repository in GitHub.
The following software is required to create and deploy resources in Azure:
(Mac Os X versions)
Packer 1.4.0 - used to automate the creation of Azure Images.
Terraform 0.11.13- used to create and update infrastructure resources.
Ansible 2.7.6 - Ansible is an IT automation tool used to deploy and configure systems.
OpenSSL 1.0.2f - used to decrypt credentials stored in a file.
Azure-cli 2.0.55 - used to create and check resources in Azure.
Make sure these tools have been installed on the computer you are using to build and deploy ACS Enterprise 6.1.
How to run the project
The project contains a bash script called run-azure.sh. The script will do the following:
Create the managed Images in Azure.
Build the infrastructure and deploy and configure Alfresco Enterprise 6.1.
However, before running the script, the Azure and Nexus credentials should be stored encrypted in a file so the script can use the credentials.
Instructions about how to store the credentials and run the project are described below.
1. Authenticating to Azure
Azure-cli, Packer and Terraform need to authenticate to Azure in order to create resources. Since we are creating a large number of infrastructure resources, the user we authenticate with to Azure, needs to have administrator access.
In order to authenticate in Azure we need the following information:
The following links provide information to get the above values:
Nexus is a repository manager used by Alfresco to publish software artifacts. Ansible will connect to Nexus repository to download the necessary software to install ACS Enterprise 6.1. Alfresco Enterprise customers have Nexus credentials as part of their license subscription. Please refer to your CRM if you don't know or have your Nexus credentials.
In order to store your Nexus credentials in an encrypted file to use them in this project do the following:
RESOURCE_GROUP_NAME_IMG - name of the Azure resource group where the managed images will be created.
RESOURCE_GROUP_NAME_DEPLOY - name of the Azure resource group where the infrastructure will be deployed.
LOCATION - name of the location used in Azure for the project. To get a list of locations use the following command:
az account list-locations
4. Download the Digital Workspace WAR file:
Download the "Digital workspace" war file from here and save it as packer-files/downloaded/digital-workspace.war (this file is not yet available in Nexus for an automated download).
5. Run the project script
Make sure you have execution permission in the script and then execute it:
M A I N - M E N U
1. Run the entire project (create Azure Images, build infrastructure and deploy Alfresco Enterprise 6.1)
2. Create Azure Images
3. Build Azure infrastructure and deploy Alfresco Enterprise 6.1
4. Show infrastructure IPs and DNS names
Enter choice [ 1 - 4]
Select option 1 if you want to run the entire project or option 2 followed by option 3 if you want to run it on stages. The last option will show the IPs and DNS names generated in case you need them again (the information is shown as well in options 1 and 3).
What happens when running the project
Creating managed Images in Azure
The first stage of the project consists in creating the following managed images:
Alfresco Frontend Image - containing Alfresco Repository, Share, ADW (Alfresco Digital Workspace) and Apache Zeppelin.
Transform Service Image - containing the new Alfresco Transform Service.
ActiveMQ Image - containing Apache ActiveMQ.
DB Image - containing a base installation of MySQL Server.
The run-azure.sh script calls packer to create every image individually. A CentOS 7.6 distribution image is used by packer as a baseline, and after uploading the required files (from packer-files folder), ansible is called for provisioning the image. In the provisioning phase, ansible downloads from Nexus and other repositories the necessary "artifacts" and installs them.
As the run-azure script runs you can see what is is doing during its execution...
16 minutes and 37 seconds elapsed for AlfrescoFrontendImage image creation.
Building Azure infrastructure and deploying Alfresco
Once the images are created it's time to build the infrastructure using Terraform. The file cluster.tf contains the terraform configuration for the Azure and ACS deployments. Additionally cluster_variables.tf contains some specific values (mostly private static ips) required in the deployment.
The output of the run-azure script when creating the infrastructure looks like this: