[Gluster-devel] A docker based development/testing environment for gluster

Kaushal M kshlmster at gmail.com
Thu Mar 6 12:59:06 UTC 2014


I've had this idea from a while of creating a standardised development
environment for gluster development. This would help in reducing the
errors and failures which occur to differences in the environment
during testing and will help speed up development.

I've been playing around with docker, and feel it is a good tool to
help achieve this. I currently have ideas of writing a tool around
docker, which will be present in the gluster repo, which will be used
to create and make use of the standardised development environment.

The tool would,
- create a standardised docker image
- build gluster within the standardised docker container
- run the tests within the standard container
- launch multiple containers which can be used to perform distributed
testing on a single system.
- provide an easy way to access each container (similar to vagrant ssh)

As I currently visualize it, the workflow for doing gluster
development will be as follows,
Preliminary setup:
1. Choose any linux distribution you want and install git and docker on it.
2. Clone the gluster git repo.
3. Use the tool to build a base docker image, which would contain the
standardised environment.
   This docker image would contain everything required to build and
run gluster, and would be built from a Dockerfile provided in the git
repo.

Development flow:
1. Developer does a change in the gluster source
2. If the change requires changes to the standardised environment,
make changes to the Dockerfile, and regenerate the base image.
3. Now use the tool build gluster within the standard environment.
4. If the build is successful, run the tests within the standardised
environment.
5. Once the test is successful, submit the patch.

Review flow:
1. Jenkins will perform the initial smoke test within the standard environment.
2. Jenkins will perform the regression runs within the environment again.
3. Reviewers who want to verify the patch, would download the patch
and verify it within the standard environment.

I've started on a implementation of the tool. It is currently a shell
script which provides shell functions to do the things is mentioned
above. This script can be sourced within the user's shell to get
access to these functions as commands. Currently, the script can
create/delete images, create/start/stop a container from the image and
build gluster within a container. I'll publish this once I fix some
small issues with the script.

But I'd like to get some feedback regarding this attempt first. What
does the list feel about this?

~kaushal




More information about the Gluster-devel mailing list