Presentation is loading. Please wait.

Presentation is loading. Please wait.

Alfresco deployment with Docker Andrea Agili Software Engineer – Dr Wolf srl Tommaso Visconti DevOps – Dr Wolf srl.

Similar presentations


Presentation on theme: "Alfresco deployment with Docker Andrea Agili Software Engineer – Dr Wolf srl Tommaso Visconti DevOps – Dr Wolf srl."— Presentation transcript:

1 Alfresco deployment with Docker Andrea Agili Software Engineer – Dr Wolf srl Tommaso Visconti DevOps – Dr Wolf srl

2 What is Docker? “Docker adds an application deployment engine on top of a virtualized container execution environment.” James Turnbull. “The Docker Book”.

3 Containers Vs. VMs Containers run in the same kernel of the host operating system There’s no hardware emulation This translates to a very reduced overhead: The Ubuntu image is about 300MB Most containers take less than a second to launch

4 Docker basics: images Images represent the full state of your environment Images are built using Union FS, as progressive layers, using a series of instructions

5 Docker basics: the filesystem Writeable container Customizations Ubuntu bootfs

6 Docker basics: containers 1/2 Containers are launched from images and can contain one or more running processes. Each container contains an image, and can be created, started, stopped, restarted and destroyed

7 Docker basics: containers 2/2 All containers are created equal. Once you have your docker host running it doesn’t matter if it’s on your laptop, on a physical or virtual server, on a cloud provider.

8 Docker basics: registries Docker allows you to store images on registries, you may use the docker hub https://hub.docker.com Or you can run your own registry

9 No more golden images Compared to traditional image models, Docker is a lot more lightweight: images are layered, and you can quickly iterate on them. You can commit, push, pull and tag images…

10 Docker in action 1 $ docker run -i -t ubuntu /bin/bash [magic happens] root@f87bb1102842:/# ps PID TTY TIME CMD 1 ? 00:00:00 bash 9 ? 00:00:00 ps

11 Docker in action 2 root@f87bb1102842:/# apt-get update root@f87bb1102842:/# apt-get install apache2 root@f87bb1102842:/# exit $ docker commit f87bb1102842 1eb04767df27…

12 Dockerfile FROM ubuntu RUN apt-get update RUN apt-get install -y apache2 VOLUME [ "/var/www/html" ] EXPOSE 80... ENTRYPOINT [ "/usr/sbin/apache2" ] CMD ["-D", "FOREGROUND”]

13 External volumes A volume is a directory mounted from outside container’s file system, useful to persist and share data. You don’t want to push a production sized alf_data in your registry

14 Building an Alfresco image Download the bundle install in a standard linux machine Run the installer (it will not run inside a docker container) Copy the installation directory in a running ubuntu container (/bin/bash) Install system dependencies (libxext6, libice6...) Launch libreoffice and kill it after a few seconds Exit and commit (you may want to push to a registry too)

15 How to start Alfresco $ git clone git@github.com:DrWolf- OSS/docker-alfresco.git $ cd docker-alfresco $ vi alfresco-global.properties... $ docker build $ docker run

16 --link $ cat alfresco-global.properties... db.url=mysql://db/alfresco... $ docker run –name my01 mysql $ docker run –link my01:db alfresco

17 Images Ubuntu Alfresco base Specific modules & SW Prod config Test config

18 Test configuration Alfresco + Solr + Database + Sample data

19 Production configuration Alfresco Database logs Solrapache alf_data

20 Development advantages Share a test set guaranteed to run consistently for anyone running it Develop in the same exact environment you will find in production Easily reset or commit state after running tests

21 Using docker in production Close to zero install time Service orchestration (Database, indexes..) Easily move containers between non homogeneous machines and environments Launch several Alfresco instances in the same machine

22 Resources https://docker.com https://github.com/DrWolf-OSS/docker-alfresco


Download ppt "Alfresco deployment with Docker Andrea Agili Software Engineer – Dr Wolf srl Tommaso Visconti DevOps – Dr Wolf srl."

Similar presentations


Ads by Google