The way you deploy and run Alfresco Content Services has changed significantly since version 6.0. Traditionally, you'd download an installer that installed Java, Tomcat, Database, WARs, tools, etc. and everything was configured to work together out-of-the-box. Then you'd use a script to start things off. That's no longer the case and there are no installers available. We'll be working with Docker containers instead.
You can start Alfresco Content Services from a number of Docker images. These images are available in the https://hub.docker.com [6] repository. However, starting individual Docker containers based on these images, and configuring them to work together might not be the most productive way to get up and running. To make things easier, and achieve a single-step deploy and run solution, a Docker Compose file is available to quickly start Alfresco Content Services when you need to test something or work on a proof-of-concept (PoC).
There are also Helm Charts available to deploy Alfresco Content Services in a Kubernetes cluster, for example, on Amazon Web Services (AWS). These charts are a deployment template which can be used as the basis for your specific deployment needs. The Helm charts are undergoing continual development and improvement and should not be used "as-is" for a production deployment, but should help you save time and effort deploying Alfresco Content Services for your organisation.
The following is a list of concepts and technologies that you'll need to understand as part of deploying and using Alfresco Content Services version 6.0.1. If you know all about Docker, then you can skip this part.
Virtual Machine Monitor (Hypervisor)
A Hypervisor is used to run other OS instances on your local host machine. Typically it's used to run a different OS on your machine, such as Windows on a Mac. When you run another OS on your host it is called a guest OS, and it runs in a Virtual Machine (VM).
Image
An image is a number of layers that can be used to instantiate a container. This could be, for example, Java and Apache Tomcat. You can find all kinds of Docker images on the public repository Docker Hub [7]. There are also private image repositories (for things like commercial enterprise images), such as the one Alfresco uses called Quay [8].
Container
An instance of an image is called a container. If you start this image, you have a running container of this image. You can have many running containers of the same image.
Docker
Docker is one of the most popular container platforms. Docker [9] provides functionality for deploying and running applications in containers based on images.
Docker Compose
When you have many containers making up your solution, such as with Alfresco Content Services, and you need to configure each individual container so that they all work well together, then you need a tool for this. Docker Compose is such a tool for defining and running multi-container Docker applications locally. With Compose, you use a YAML [10] file to configure your application's services. Then, with a single command, you create and start all the services from your configuration.
Dockerfile
A Dockerfile is a script containing a successive series of instructions, directions, and commands which are run to form a new Docker image. Each command translates to a new layer in the image, forming the end product. The Dockerfile replaces the process of doing everything manually and repeatedly. When a Dockerfile finishes building, the end result is a new image, which you can use to start a new Docker container.
Difference between containers and virtual machines
It's important to understand the difference between using containers and using VMs. Here's a picture from What is a Container | Docker [11]:
The main difference is that when you run a container, you are not starting a complete new OS instance. This makes containers much more lightweight and quicker to start. A container also takes up much less space on your hard-disk as it doesn't have to ship the whole OS.
Go to Docker Hub https://hub.docker.com/u/alfresco/ [13] to see a list of images belonging to the alfresco user. Alternatively, access Docker Hub [6] and search for alfresco (note that not all images are visible):
There are a number of Docker images that relate to Alfresco Content Services:
There are also other supporting features available, such as Docker images for image and document transformation:
To build the alfresco/alfresco-content-repository image, Alfresco uses the Alfresco/acs-packaging [14] GitHub project. This project doesn't include any deployment templates. The Alfresco/acs-deployment [15] GitHub project contains deployment templates and instructions. It includes a Docker Compose script that's used to launch a demo, test, or PoC of Alfresco Content Services. You can customize this script, if you like, in order to run with different versions than those set by default (which are usually the latest versions).
When you deploy Alfresco Content Services, the following containers are started:
Deployment project
The deployment project contains the Docker Compose file to start up an Alfresco Content Services environment locally. You'll find the relevant files in the docker-compose folder. To look at the project in more detail, just browse to:
If you're interested in the Helm charts to deploy Alfresco Content Services with Kubernetes, you'll find the relevant files in the helm/alfresco-content-services folder.
Packaging project
The packaging project is used to build the repository artifacts, such as the Docker image for the repository. To look at the project in more detail, just browse to:
Other projects
Note that the Docker files for Alfresco Share and Alfresco Search Services are in their own projects:
You'll find a list of prerequisites in the GitHub project documentation.
Note that the VERSIONS.md [18] file in GitHub lists the supported versions.
Here, you can review the requirements for your chosen deployment method.
To deploy Alfresco Content Services using Helm charts, you need to install the following software:
See Deploying Alfresco Content Services Helm charts to AWS EKS [22] for more.
To install Alfresco Content Services using the distribution zip, make sure that the required software is available on your system:
For a list of supported components and versions, refer to the VERSIONS.md file in the distribution zip.
See Installing using distribution zip [23] for more.
Java 8 is recommended.
See Deploying using Docker Compose [4] for more.
To deploy Alfresco Content Services using docker-compose, download and install Docker [24], then follow the steps below.
git clone https://github.com/Alfresco/acs-deployment.git cd acs-deployment
See the Alfresco/acs-deployment project README [15] for more.
cd docker-compose
For example:
docker-compose -f 6.0.N-docker-compose.yml up
This downloads the images, fetches all the dependencies, creates each container, and then starts the system:
Creating network "docker-compose_default" with the default driver ... Creating docker-compose_alfresco-pdf-renderer_1 ... done Creating docker-compose_solr6_1 ... done Creating docker-compose_postgres_1 ... done Creating docker-compose_imagemagick_1 ... done Creating docker-compose_libreoffice_1 ... done Creating docker-compose_share_1 ... done Creating docker-compose_alfresco_1 ... done Attaching to docker-compose_postgres_1, docker-compose_solr6_1, docker-compose_alfresco-pdf-renderer_1, docker-compose_imagemagick_1, docker-compose_alfresco_1, docker-compose_libreoffice_1, docker-compose_share_1 ...
As an alternative, you can also start the containers in the background by running docker-compose up -d.
... alfresco_1 | 2018-08-28 08:40:30,386 INFO [management.subsystems.ChildApplicationContextFactory] [http-nio-8080-exec-10] Starting 'Transformers' subsystem, ID: [Transformers, default] alfresco_1 | 2018-08-28 08:40:30,661 INFO [management.subsystems.ChildApplicationContextFactory] [http-nio-8080-exec-10] Startup of 'Transformers' subsystem, ID: [Transformers, default] complete
If you encounter errors whilst the system is starting up:
docker-compose down --rmi all
You can use a number of commands to check that the system started correctly. See Checking system start up [28] for more.
See the Alfresco/acs-deployment [15] GitHub project documentation for the prerequisites and detailed setup: Docker Compose deployment [29]
In this project, you can use the docker-compose.yml file following the documentation for standard installations.
To modify your development environment, for example to change or mount files in the existing images, you'll have to create new custom Docker images (recommended approach). The same approach applies if you want to install AMP files into the repository and Share images. See the Customization Guidelines [30] for more.
Before continuing, make sure that you've completed the steps in Deploying using Docker Compose [32].
docker-compose images
You should see a list of the services defined in your docker-compose.yaml file:
Container Repository ... Size ----------------------------------------------------------------------------------------------- docker-compose_alfresco-pdf-renderer_1 alfresco/alfresco-pdf-renderer ... 560 MB docker-compose_alfresco_1 alfresco/alfresco-content-repository ... 1.01 GB docker-compose_imagemagick_1 alfresco/alfresco-imagemagick ... 633 MB docker-compose_libreoffice_1 alfresco/alfresco-libreoffice ... 1.39 GB docker-compose_postgres_1 postgres ... 274 MB docker-compose_share_1 alfresco/alfresco-share ... 714 MB docker-compose_solr6_1 alfresco/alfresco-search-services ... 849 MB
docker-compose ps
You should see a list of the services defined in the docker-compose.yaml file.
docker-compose logs <service-name> docker container logs <container-name>
For example, to check the logs for Share, run any of the following commands:
docker-compose logs share docker container logs docker-compose_share_1
You can add an optional parameter --tail=25 before <container-name> to display the last 25 lines of the logs for the selected container.
docker-compose logs --tail=25 share docker container logs --tail=25 docker-compose_share_1
Check for a success message:
Successfully retrieved license information from Alfresco.
Once you've tested the services, you can clean up the deployment by stopping the running services.
^CGracefully stopping... (press Ctrl+C again to force) Stopping docker-compose_libreoffice_1 ... done Stopping docker-compose_solr6_1 ... done Stopping docker-compose_postgres_1 ... done Stopping docker-compose_alfresco_1 ... done Stopping docker-compose_share_1 ... done Stopping docker-compose_imagemagick_1 ... done Stopping docker-compose_alfresco-pdf-renderer_1 ... done
docker-compose down
This stops the running services, as shown in the previous example, and removes them from memory:
Stopping docker-compose_postgres_1 ... done Stopping docker-compose_share_1 ... done ... Removing docker-compose_postgres_1 ... done Removing docker-compose_share_1 ... done Removing docker-compose_libreoffice_1 ... done Removing docker-compose_imagemagick_1 ... done Removing docker-compose_solr6_1 ... done Removing docker-compose_alfresco-pdf-renderer_1 ... done Removing docker-compose_alfresco_1 ... done Removing network docker-compose_default
docker-compose stop
docker-compose restart
docker-compose start
docker-compose down [--rmi all]
The --rmi all option also removes the images created by docker-compose up, and the images used by any service. You can use this, for example, if any containers fail and you need to remove them:
Stopping docker-compose_libreoffice_1 ... done ... Removing docker-compose_libreoffice_1 ... done ... Removing network docker-compose_default Removing image alfresco/alfresco-content-repository:6.0.x Removing image ...
See the Docker documentation [33] for more on getting started with Docker and using Docker.
Links:
[1] https://docs.alfresco.com/../concepts/deploy-concepts.html
[2] https://docs.alfresco.com/../concepts/public-docker-images.html
[3] https://docs.alfresco.com/../concepts/deploy-prereqs.html
[4] https://docs.alfresco.com/../tasks/deploy-docker-compose.html
[5] https://docs.alfresco.com/../concepts/master-deploy.html
[6] https://hub.docker.com
[7] https://hub.docker.com/
[8] https://quay.io/
[9] https://www.docker.com/
[10] https://en.wikipedia.org/wiki/YAML
[11] https://www.docker.com/what-container
[12] https://docs.alfresco.com/../concepts/deploy-overview.html
[13] https://hub.docker.com/u/alfresco/
[14] https://github.com/Alfresco/acs-packaging
[15] https://github.com/Alfresco/acs-deployment
[16] https://github.com/Alfresco/share/tree/6.0
[17] https://github.com/Alfresco/SearchServices
[18] https://github.com/Alfresco/acs-packaging/blob/master/distribution/src/main/resources/VERSIONS.md
[19] https://github.com/aws/aws-cli#installation
[20] https://kubernetes.io/docs/tasks/tools/install-kubectl/
[21] https://github.com/kubernetes/helm#install
[22] https://docs.alfresco.com/../tasks/deploy-helm-aws.html
[23] https://docs.alfresco.com/ch-install.html
[24] https://docs.docker.com/install/
[25] https://docs.docker.com/compose/install/
[26] https://github.com/Alfresco/acs-deployment/tree/master/docker-compose
[27] https://docs.alfresco.com/deploy-docker-compose.html%23deploy-docker-compose__up
[28] https://docs.alfresco.com/docker-system-startup.html
[29] https://github.com/Alfresco/acs-deployment/tree/master/docs/docker-compose
[30] https://github.com/Alfresco/acs-deployment/blob/master/docs/docker-compose/examples/customisation-guidelines.md
[31] https://docs.alfresco.com/../tasks/docker-system-startup.html
[32] https://docs.alfresco.com/deploy-docker-compose.html
[33] https://docs.docker.com/