-
Notifications
You must be signed in to change notification settings - Fork 92
Starting with zm docker
You should have Docker (and Docker Compose) installed and know how to create a swarm.
Clone this zm-docker repository from here.
For more information on zm-docker please have a look at its README page.
Copy your private key to the following directory
zm-docker/build/config/DOT-ssh
Go to the cloned directory and compile
the code
For develop branch
make compile
For specific branch edit the config.build
file and append the following line
$ vim zm-docker/build/config
%GIT_OVERRIDES = zm-mailbox.branch=bugfix/zcs-6432-memoryLeak
$ make compile
After the compiling is finished we need to build the images for each services using the following command
$ make build-all
In case we want to build a specific image at any point in time without building the whole images then we need to specify which container we need to build.
For example, if we want to build only the mailbox image then:
$ make build-zmc-mailbox
Once it has finished building we can verify the images for all containers using the following command:
$ docker images
(Optional only for running the test)
In case we are going to perform the zm-perf-harness concurrency test then we need to add the following network block at the end of the docker-compose.yml file
$ vim zm-docker/docker-compose.yml
networks:
default:
driver: overlay
attachable: true
Now, we need to bring up all the containers using the following command:
$ make up
Note
1. We can see the logs for each services using the following command:
$ docker service logs -f <service-name>
Eg.
$ docker service logs -f zm-docker_zmc-mailbox
2. For seeing all the containers with their sizes
$ docker ps -a --size
3. For seeing all the services
$ docker service ls
Now once our ZimbraX is up and running for stating a concurrency test we need to to use perf-harness container.
Clone this zm-perf-harness repository from here.
For more information on zm-perf-harness please have a look at its README page.
Generate the list of users at .config/users.csv
using the following python script
$ python create_user.py -h
usage: create_user.py [-h] -u <Username> -n <Number of Users>
User generation utility...
optional arguments:
-h, --help show this help message and exit
-u <Username>, --username <Username>
Pattern of the username.
-n <Number of Users>, --number_of_users <Number of Users>
Number of users to be created.
Example for generating 200 users with username as user
$ python a.py -u user -n 200 >> zm-perf-harness/.config/users.csv &
Copy the environment file from the following location to .secrets/env.prop
Now, bring up the zm-perf-harness
container
$ make up
Login to the zmc-perf-harness
container
$ docker exec -it zmc-perf bash
Edit the following files before starting the concurrency test
Example for running 10 hours concurrency test for 200 users
$ vim tests/generic/zsoap/load_basic.prop
LOAD.duration=36000
LOAD.delay=5
LOAD.ZSOAP.users=200
LOAD.ZSOAP.userduration=40
LOAD.ZSOAP.rampup=0
LOAD.ZSOAP.loopcount=1
$ vim tests/generic/zsoap/load.prop
LOAD.duration=36000
LOAD.delay=5
LOAD.ZSOAP.users=200
LOAD.ZSOAP.userduration=200
LOAD.ZSOAP.rampup=20
LOAD.ZSOAP.loopcount=-1
Now, start the test
$ ant generic-zsoap-all
Monitor the mailbox logs
This will tail all the important logs for all replicas
$ docker service logs -f zm-docker_zmc-mailbox