Deploy Zimbra Collaboration using docker: Difference between revisions
No edit summary |
|||
Line 7: | Line 7: | ||
==Resolution== | ==Resolution== | ||
===Before you start=== | ===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 [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 for testing platforms | This guide is intended for testing platforms, development, etc. | ||
===What is Docker=== | ===What is Docker=== | ||
Line 29: | Line 29: | ||
===Creating the Zimbra Image=== | ===Creating the Zimbra Image=== | ||
The content of the Dockerfile and the start.sh is based on the next Script - [[Install_Zimbra_Collaboration_and_a_DNS_Server_with_Script|ZimbraEasyInstall]]. The Dockerfile creates a Ubuntu Server 14.04 image and install on it wget, then when the container is launched, automatically starts with the '''start.sh''' script: | |||
====Dockerfile==== | ====Dockerfile & start.sh==== | ||
* '''Download from github''' | * '''Download from github''' | ||
wget https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/docker/Dockerfile | wget https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/docker/Dockerfile | ||
wget https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/docker/start.sh | |||
====Build the image using the Dockerfile==== | ====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: | Just run the next command to build the image based in the previous Dockerfile, you can use the name that you want, in this case is '''zimbra_docker''': | ||
sudo docker build -t zimbra_docker . | sudo docker build -t zimbra_docker . | ||
Line 79: | Line 50: | ||
===Deploy the Docker container=== | ===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: | 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, also we will send the password that we want to our Zimbra Server like admin password, mailbox, LDAP, etc.: | ||
'''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 -e PASSWORD=YOURPASSWORD NAMEOFDOCKERIMAGE | ||
'''Example:''' | '''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 | 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 -e PASSWORD=Zimbra2015 zimbra_docker | ||
This will create the container in few seconds, and run automatically the start.sh: | |||
* Install a DNS Server based in bind9 and the dnsutils package | |||
* Configure all the DNS Server to resolve automatically internal the MX and the hostname that we define while launch the container. | |||
* Install the OS dependencies for Zimbra Collaboration 8.6 | |||
* Create 2 files to automate the Zimbra Collaboration installation, the keystrokes and the config.defaults. | |||
* Launch the installation of Zimbra based only in the .install.sh -s | |||
* Inject the config.defaults file with all the parameters that is autoconfigured with the Hostname, domain, IP, and password that you define before. | |||
The script takes a few minutes, dependent on the your Internet Speed, and resources. | The script takes a few minutes, dependent on the your Internet Speed, and resources. |
Revision as of 00:41, 22 May 2015
Article Information |
---|
This article applies to the following ZCS versions. |
Deploy Zimbra Collaboration Server using Docker
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, 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
The content of the Dockerfile and the start.sh is based on the next Script - ZimbraEasyInstall. The Dockerfile creates a Ubuntu Server 14.04 image and install on it wget, then when the container is launched, automatically starts with the start.sh script:
Dockerfile & start.sh
- Download from github
wget https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/docker/Dockerfile wget https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/docker/start.sh
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, in this case is zimbra_docker:
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, also we will send the password that we want to our Zimbra Server like admin password, mailbox, LDAP, etc.: Syntax:
docker run -p PORTS -h HOSTNAME.DOMAIN --dns DNSSERVER -i -t -e PASSWORD=YOURPASSWORD 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 -e PASSWORD=Zimbra2015 zimbra_docker
This will create the container in few seconds, and run automatically the start.sh:
- Install a DNS Server based in bind9 and the dnsutils package
- Configure all the DNS Server to resolve automatically internal the MX and the hostname that we define while launch the container.
- Install the OS dependencies for Zimbra Collaboration 8.6
- Create 2 files to automate the Zimbra Collaboration installation, the keystrokes and the config.defaults.
- Launch the installation of Zimbra based only in the .install.sh -s
- Inject the config.defaults file with all the parameters that is autoconfigured with the Hostname, domain, IP, and password that you define before.
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:
- Web Client - https://YOURIP
- Admin Console - https://YOURIP:7071
Additional Content
- Go to the Github project and give your valuable feedback.