anchor.diff:  
   |Variable name |Description |Default
   
  -|`MONGODB_NOPREALLOC`
  +|`*MONGODB_NOPREALLOC*`
   |Disable data file preallocation.
   |true
   
  -|`MONGODB_SMALLFILES`
  +|`*MONGODB_SMALLFILES*`
   |Set MongoDB to use a smaller default data file size.
   |true
   
  -|`MONGODB_QUITE`
  +|`*MONGODB_QUIET*`
   |Runs MongoDB in a quiet mode that attempts to limit the amount of output.
   |true
   |===
   
  -=== MongoDB root user
  -The root user is not set by default. You can create one by setting
  -`MONGODB_ROOT_PASSWORD` environment variable, in which case the root 
  -user name will be set to `admin`. This process is done upon initializing 
  -the database.
  -
  -=== Running images
  -
  -==== RHEL 7 Base Image
  -
  -----
  -docker run -d -e MONGODB_USERNAME=<user> -e MONGODB_PASSWORD=<password> -e MONGODB_DATABASE=<database>  openshift/mongodb-24-rhel7
  -----
  -
  -==== CentOS 7 Base Image
  -
  -----
  -docker run -d -e MONGODB_USERNAME=<user> -e MONGODB_PASSWORD=<password> -e MONGODB_DATABASE=<database>  openshift/mongodb-24-centos7
  -----
  -
  -=== Shared volumes
  -
  -We will assume that you are using the `openshift/mongodb-24-centos7`
  -image. Suppose you want to set only mandatory required environment
  -variables and store the database in the `/home/user/database`
  -directory on the host filesystem, you need to execute the following
  -command:
  -
  -----
  -docker run -d -e MONGODB_USERNAME=<user> -e MONGODB_PASSWORD=<password> -e MONGODB_DATABASE=<database> -v /home/user/database:/var/lib/mongodb openshift/mongodb-24-centos7
  -----
  -
  -==== Initializing database
  -
  -If you are initializing the database and it's the first time you are using the 
  -specified shared volume, the database will be created, together with database
  -administrator user and also MongoDB root user if `MONGODB_ADMIN_PASSWORD`
  -environment variable is specified. After that the MongoDB daemon will be
  -started.
  -If you are re-attaching the volume to another container the creation of the
  -database user and the admin user will be skipped and only the mongodb
  -daemon will be started.
  -
  -== Note about Software Collections
  -
  -We use https://www.softwarecollections.org/[Software Collections] to
  -install and launch MongoDB. If you want to execute a MongoDB command 
  -inside of a running container (eg. for debugging), you need
  -to prefix it with `scl enable mongodb24` command. Some examples:
  -
  -----
  -# Running mongodb commands inside the container
  -scl enable mongodb24 -- mongo <db_name> -u <username> -p <password>
  -
  -# Executing a command inside a running container from host
  -# Note: You will be able to run mongodb commands without invoking the scl commands
  -docker exec -it <CONTAINER_ID> scl enable mongodb24 /bin/bash
  -----
  -
  -= Test Framework
  -
  -This repository also provides test framework, which checks basic functionality of the MongoDB image.
  -
  -User can choose between testing MongoDB based on RHEL or CentOS image.
  -
  -== RHEL 7 Base Image
  -
  -To test a rhel7-based MongoDB image, you need to run the test on a properly subscribed RHEL machine.
  -
  -----
  -$ cd mongodb
  -$ make test TARGET=rhel7 VERSION=2.4
  -----
  -
  -== CentOS 7 Base Image
  -
  -----
  -$ cd mongodb
  -$ make test VERSION=2.4
  -----
  -
  -[NOTE]
  -====
  -If you omit the `VERSION` parameter, the build/test action is performed on all supported versions of MongoDB. Since we are only supporting `2.4` version, you can omit this parameter.
  -====+=== MongoDB Root User
  +The root user is not set by default. You can create one when initializing the
  +database by setting the `MONGODB_ROOT_PASSWORD` environment variable. If you set
  +this environment variable, then the root user name is set to `admin`.
  
positive.code: |Volume mount point |Description
  
  |`/var/lib/mongodb/`
  |MongoDB data directory
  |===
  
  MongoDB settings can be configured by additional environment variables.
  
  .Additional MongoDB settings
  [cols="3a,6a,1a",options="header"]
  
negative.code: toc::[]
  
  == Overview
  The OpenShift https://github.com/openshift/mongodb/tree/master[MongoDB] image
  repository contains the sources and Dockerfiles for building various versions of
  MongoDB images.
  
  == Versions
  Currently, OpenShift only supports version https://github.com/openshift/mongodb/tree/master/2.4[2.4] of MongoDB.
  
  == Base Images
  
  The following base images are currently available:
  
  * RHEL-7
  * CentOS-7
  
  [NOTE]
  ====
  In order to perform build or test action on a RHEL-7 based MongoDB image, you
  need to run the build on properly subscribed RHEL-7 machine.
  ====
  
  == Installation
  To build a MongoDB image, use one of the following procedures, depending on your
  base image:
  
  *RHEL-7 Base Image*
  
  To build a RHEL-7 based MongoDB image:
  
  . Clone the following repository:
  +
  ****
  `$ git clone https://github.com/openshift/mongodb.git`
  ****
  . Navigate into the directory you just created:
  +
  ****
  `$ cd mongodb`
  ****
  . Build the image:
  +
  ****
  `$ make build TARGET=rhel7 VERSION=2.4`
  ****
  
  *CentOS-7 Base Image*
  
  This image is available on DockerHub. To download it:
  
  ****
  `$ docker pull openshift/mongodb-24-centos7`
  ****
  
  Alternatively, you can build a CentOS-7 based MongoDB image:
  
  . Clone the following repository:
  +
  ****
  `$ git clone https://github.com/openshift/mongodb.git`
  ****
  . Navigate into the directory you just created:
  +
  ****
  `$ cd mongodb`
  ****
  . Build the image:
  +
  ****
  `$ make build VERSION=2.4`
  ****
  
  [NOTE]
  ====
  If you omit the `VERSION` parameter, then the build/test action is performed on
  all the supported versions of MongoDB. Currently, only version 2.4 is supported,
  so you can omit this parameter.
  ====
  
  
  == Usage
  
  To create a container running MongoDB, you need to run following commands.
  
  *RHEL 7 Base Image*
  
  ****
  `docker run -d -e MONGODB_USERNAME=_<user>_ -e MONGODB_PASSWORD=_<password>_ -e MONGODB_DATABASE=_<database>_  openshift/mongodb-24-rhel7`
  ****
  
  *CentOS 7 Base Image*
  
  ****
  `docker run -d -e MONGODB_USERNAME=_<user>_ -e MONGODB_PASSWORD=_<password>_ -e MONGODB_DATABASE=_<database>_  openshift/mongodb-24-centos7`
  ****
  
  == Testing
  
  This repository also provides a test framework which checks basic functionality of the MongoDB image.
  
  Select whether the MongoDB image you are testing is RHEL-based or CentOS-based.
  
  *RHEL-7 Base Image*
  
  To test a RHEL-7-based MongoDB image, run the test on a properly subscribed RHEL machine.
  
  . Navigate into the *_mongodb_* directory:
  +
  ****
  `$ cd mongodb`
  ****
  . Test the image:
  +
  ****
  `$ make test TARGET=rhel7 VERSION=2.4`
  ****
  
  *CentOS-7 Base Image*
  
  To test a CentOS-7-based MongoDB image:
  
  . Navigate into the *_mongodb_* directory:
  +
  ****
  `$ cd mongodb`
  ****
  . Test the image:
  ****
  `$ make test VERSION=2.4`
  ****
  
  [NOTE]
  ====
  If you omit the `VERSION` parameter, then the build/test action is performed on all supported versions of MongoDB. Since only version 2.4 is currently supported, you can omit this parameter.
  ====
  
  == Shared Volumes
  
  To set only mandatory required environment variables, and store the database in the shared *_/home/user/database_* directory on the host, execute the following command:
  
  ****
  `docker run -d -e MONGODB_USERNAME=_<user>_ -e MONGODB_PASSWORD=_<password>_ -e MONGODB_DATABASE=_<database>_ -v /home/user/database:/var/lib/mongodb openshift/_<image>_`
  ****
  
  === Initializing Database
  
  The first time you use the shared volume and initialize the database, the
  database is created along with the database administrator user and the MongoDB
  root user (if you specify the `*MONGODB_ADMIN_PASSWORD*` environment variable).
  Afterwards, the MongoDB daemon starts up. If you are re-attaching the volume to
  another container, then the database user and the administrator user are not
  created, and the MongoDB daemon starts.
  
  == MongoDB Commands in Running Containers
  
  OpenShift uses https://www.softwarecollections.org/[Software Collections] to
  install and launch MongoDB. If you want to execute a MongoDB command
  inside of a running container (for debugging), you must prefix it with the `scl enable mongodb24` command.
  
  
  To execute MongoDB commands inside the container:
  
  ****
  `$ scl enable mongodb24 -- mongo _<db_name>_ -u _<username>_ -p _<password>_`
  ****
  
  To execute a command inside a running container from the host:
  
  ****
  `$ docker exec -it _<CONTAINER_ID>_ scl enable mongodb24 /bin/bash`
  ****
  
  [NOTE]
  ====
  In this case, you are able to run MongoDB commands without invoking the scl
  commands.
  ====
  
  == Environment Variables
  
  The image recognizes the following environment variables that you can set
  during initialization with this command:
  
  ****
  `$ docker run -e VAR=_<variable>_`
  ****
  
  .Repository Organization
  [cols="4a,6a",options="header"]
  