Deploy Zimbra Collaboration using docker: Difference between revisions

Line 1: Line 1:
{{WIP}}{{Unsupported}}{{Article Infobox|{{admin}}|{{ZCS 8.6}}|{{ZCS 8.5}}|}}
{{WIP}}{{Unsupported}}{{Article Infobox|{{admin}}|{{ZCS 8.6}}|{{ZCS 8.5}}|}}
=Deploy Zimbra Collaboration using Docker=
=Deploy Zimbra Collaboration Server using Docker=
[[File:Zimbra-docker-en.png|800px]]
[[File:Zimbra-docker-en.png|800px]]
==Purpose==
==Purpose==
Install Zimbra Collaboration and a DNS Server with Script, in Single-Server, using docker.
Install Zimbra Collaboration Server and DNS Server with a Script, in a Single-Server, using Docker.


==Resolution==
==Resolution==
===Before start===
===Before you start===
This guide is not officially supported by Zimbra, as '''docker''' is not in the Operating System, or Virutalization Supported platforms in the [https://www.zimbra.com/docs/shared/8.6.0/system_requirements System Requirements].
This guide is not officially supported by Zimbra, as '''docker''' is not in the Operating System, or Virtualization Supported platforms in the [https://www.zimbra.com/docs/shared/8.6.0/system_requirements System Requirements].


This guide is intended to test platforms, dev environments, etc.
This guide is intended for testing platforms and development, etc.


===What is the docker===
===What is Docker===
[https://www.docker.com/whatisdocker/ '''From the official docker website'''] - ''Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.''  
[https://www.docker.com/whatisdocker/ '''From the official docker website'''] - ''Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of a Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.''  


===Advantages of use the docker and the ZimbraEasyInstall Script===
===Advantages of using Docker and the ZimbraEasyInstall Script===
* Time saving
* Time saving
* Fully automated
* Fully automated
* Easy to use
* Easy to use
* Good for a quick Zimbra Preview
* Great for a quick Zimbra Preview


===Installing docker===
===Installing Docker===
First you need to install docker in the server that you will use like host for the docker containers. For example, here the instructions to install docker in Ubuntu 14.04:
First you need to install Docker on the server that you would like to use as a host for the docker containers. For example, here the instructions to install docker in Ubuntu 14.04:
  wget -qO- https://get.docker.com/ | sh
  wget -qO- https://get.docker.com/ | sh


If you want to install docker in a different platform, please follow the next guide - [https://docs.docker.com/installation/#installation https://docs.docker.com/installation/#installation]
If you want to install Docker in a different platform, please follow the next guide - [https://docs.docker.com/installation/#installation https://docs.docker.com/installation/#installation]


One of the advantage to use docker is that doesn't matter the Host OS, the containers will work on any platform.
One of the advantages of using docker is that the host OS does not matter, the containers will work on any platform.


===Create the Zimbra Image===
===Creating the Zimbra Image===
To use the [[Install_Zimbra_Collaboration_and_a_DNS_Server_with_Script|ZimbraEasyInstall]] script we need a container with Ubuntu 14.04, at least for now. So use the next Dockerfile to create the proper Zimbra image that you will use later to deploy the container:
To use the [[Install_Zimbra_Collaboration_and_a_DNS_Server_with_Script|ZimbraEasyInstall]] script we need a container with Ubuntu 14.04, at least for now. So use the next Dockerfile to create the proper Zimbra image that you will use later to deploy the container:
====Dockerfile====
====Dockerfile====
Line 78: Line 78:
[...]</pre>
[...]</pre>


===Deploy the docker container===
===Deploy the Docker container===
Now is time to deploy the container based in the previous image, also you need to publish the Zimbra Collaboration ports, the hostname and the proper DNS, as you want to use bind like local DNS nameserver in the container:
Now to deploy the container based on the previous image. As well as publish the Zimbra Collaboration ports, the hostname and the proper DNS, as you want to use bind as a local DNS nameserver within the container:
'''Syntax:'''
'''Syntax:'''
  docker run -p PORTS -h HOSTNAME.DOMAIN --dns DNSSERVER -i -t NAMEOFDOCKERIMAGE
  docker run -p PORTS -h HOSTNAME.DOMAIN --dns DNSSERVER -i -t NAMEOFDOCKERIMAGE
Line 85: Line 85:
  docker run -p 25:25 -p 80:80 -p 456:456 -p 587:587 -p 110:110 -p 143:143 -p 993:993 -p 995:995 -p 443:443 -p 8080:8080 -p 8443:8443 -p 7071:7071 -p 9071:9071 -h zimbra86-docker.zimbra.io --dns 127.0.0.1 --dns 8.8.8.8 -i -t zimbra_docker
  docker run -p 25:25 -p 80:80 -p 456:456 -p 587:587 -p 110:110 -p 143:143 -p 993:993 -p 995:995 -p 443:443 -p 8080:8080 -p 8443:8443 -p 7071:7071 -p 9071:9071 -h zimbra86-docker.zimbra.io --dns 127.0.0.1 --dns 8.8.8.8 -i -t zimbra_docker


This will create the container in few seconds, and you will be inside the container, let's use now the ZimbraEasyInstall script.  
This will create the container in few seconds, to which you will be inside the container. Next use the ZimbraEasyInstall script.  


===Download and use ZimbraEasyInstall===
===Download and use ZimbraEasyInstall===
The '''ZimbraEasyInstall''' Script is an easy way to install Zimbra Collaboration, without be worry of the DNS configuration, OS dependcies, etc. Just execute it and after a few minutes have Zimbra up and running.
The '''ZimbraEasyInstall''' Script is an easy way to install Zimbra Collaboration, without worry of DNS configuration, OS dependencies, etc. Just execute it and after a few minutes, you can have a Zimbra Server up and running for testing.


====Download the ZimbraEasyInstall====
====Download the ZimbraEasyInstall====
Line 98: Line 98:
  root@zimbramail:/home/oper# ./ZimbraEasyInstall zimbra.io 192.168.211.40 Zimbra2015
  root@zimbramail:/home/oper# ./ZimbraEasyInstall zimbra.io 192.168.211.40 Zimbra2015


The script takes a few minutes, depends of your Internet Speed, and resources.
The script takes a few minutes, dependent on the your Internet Speed, and resources.


===Access to the Web Client and Admin Console===
===Access to the Web Client and Admin Console===
The Script will take care of everything and after a few minutes you can go to the IP of your server and use the next URL:
The Script will take care of everything and after a few minutes you can go to the IP address of your server and use the following URLs:
 
* Web Client - https://YOURIP
* Web Client - https://YOURIP
* Admin Console - https://YOURIP:7071
* Admin Console - https://YOURIP:7071

Revision as of 14:38, 21 May 2015

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.6 Article ZCS 8.6 ZCS 8.5 Article ZCS 8.5


Deploy Zimbra Collaboration Server using Docker

Zimbra-docker-en.png

Purpose

Install Zimbra Collaboration Server and DNS Server with a Script, in a Single-Server, using Docker.

Resolution

Before you start

This guide is not officially supported by Zimbra, as docker is not in the Operating System, or Virtualization Supported platforms in the System Requirements.

This guide is intended for testing platforms and development, etc.

What is Docker

From the official docker website - Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of a Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.

Advantages of using Docker and the ZimbraEasyInstall Script

  • Time saving
  • Fully automated
  • Easy to use
  • Great for a quick Zimbra Preview

Installing Docker

First you need to install Docker on the server that you would like to use as a host for the docker containers. For example, here the instructions to install docker in Ubuntu 14.04:

wget -qO- https://get.docker.com/ | sh

If you want to install Docker in a different platform, please follow the next guide - https://docs.docker.com/installation/#installation

One of the advantages of using docker is that the host OS does not matter, the containers will work on any platform.

Creating the Zimbra Image

To use the ZimbraEasyInstall script we need a container with Ubuntu 14.04, at least for now. So use the next Dockerfile to create the proper Zimbra image that you will use later to deploy the container:

Dockerfile

  • Download from github
wget https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/docker/Dockerfile
  • RAW Dockerfile to copy/paste
#################################################################
# Dockerfile to build Zimbra Collaboration 8.6 container images
# Based on Ubuntu 14.04
# Created by Jorge de la Cruz
#################################################################
FROM ubuntu:14.04
MAINTAINER Jorge de la Cruz <jorgedlcruz@gmail.com>

## Install wget ##
RUN sudo apt-get update && sudo apt-get install -y wget

VOLUME ["/opt/zimbra"]

EXPOSE 22
EXPOSE 25
EXPOSE 456
EXPOSE 587
EXPOSE 110
EXPOSE 143
EXPOSE 993
EXPOSE 995
EXPOSE 80
EXPOSE 443
EXPOSE 8080
EXPOSE 8443
EXPOSE 7071
EXPOSE 9071

CMD ["/bin/bash"]

Build the image using the Dockerfile

Just run the next command to build the image based in the previous Dockerfile, you can use the name that you want:

sudo docker build -t zimbra_docker .

You will see the next Steps:

Status: Downloaded newer image for ubuntu:14.04
 ---> 07f8e8c5e660
Step 1 : MAINTAINER Jorge de la Cruz <jorgedlcruz@gmail.com>
 ---> Running in d4020e7c9d94
 ---> 2382c7f298a6
Removing intermediate container d4020e7c9d94
Step 2 : RUN sudo apt-get update && sudo apt-get install -y wget
[...]

Deploy the Docker container

Now to deploy the container based on the previous image. As well as publish the Zimbra Collaboration ports, the hostname and the proper DNS, as you want to use bind as a local DNS nameserver within the container: Syntax:

docker run -p PORTS -h HOSTNAME.DOMAIN --dns DNSSERVER -i -t NAMEOFDOCKERIMAGE

Example:

docker run -p 25:25 -p 80:80 -p 456:456 -p 587:587 -p 110:110 -p 143:143 -p 993:993 -p 995:995 -p 443:443 -p 8080:8080 -p 8443:8443 -p 7071:7071 -p 9071:9071 -h zimbra86-docker.zimbra.io --dns 127.0.0.1 --dns 8.8.8.8 -i -t zimbra_docker

This will create the container in few seconds, to which you will be inside the container. Next use the ZimbraEasyInstall script.

Download and use ZimbraEasyInstall

The ZimbraEasyInstall Script is an easy way to install Zimbra Collaboration, without worry of DNS configuration, OS dependencies, etc. Just execute it and after a few minutes, you can have a Zimbra Server up and running for testing.

Download the ZimbraEasyInstall

You can run the Script from the next link - https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/ZimbraEasyInstall

Use the ZimbraEasyInstall

Run the Script adding the TLD domain for your Zimbra Collaboration server, the IP of the DNS server (usually will be the same of the container, but instead you are using different eth interfaces), and the password for the Zimbra Collaboration server. Example:

root@zimbramail:/home/oper# ./ZimbraEasyInstall zimbra.io 192.168.211.40 Zimbra2015

The script takes a few minutes, dependent on the your Internet Speed, and resources.

Access to the Web Client and Admin Console

The Script will take care of everything and after a few minutes you can go to the IP address of your server and use the following URLs:

Additional Content

Verified Against: Zimbra Collaboration 8.6, 8.5 Date Created: 05/21/2015
Article ID: https://wiki.zimbra.com/index.php?title=Deploy_Zimbra_Collaboration_using_docker Date Modified: 2015-05-21



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search