You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Stefan Seelmann (JIRA)" <ji...@apache.org> on 2016/12/06 21:49:58 UTC

[jira] [Comment Edited] (FC-202) dir-fortress-core-docker-test to use latest slapd install procs

    [ https://issues.apache.org/jira/browse/FC-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15726809#comment-15726809 ] 

Stefan Seelmann edited comment on FC-202 at 12/6/16 9:49 PM:
-------------------------------------------------------------

If we push the image then it will have the debian openldap preinstalled? - Yes
What about the data that was used to test the image, will that be present as well? - No

The "docker build" command that you run once generates an image that contains what is described in the Dockerfile: Debian 8 libaries, OpenLDAP installed, configured with the slapd.conf and fortress schema (converted to slapd-config LDIF), that's all. This image is then in your local docker image repo, and you can push it to docker hub. The docker image is just like a template.

When executing the run-tests.sh script, the "docker run" command then starts an instance of the image (called container). This doesn't start the full debian system (no init, no systemd), but only the OpenLDAP process (as defined in last CMD line in Dockerfile) which then listens within the container on port 389. The port 389 is then mapped to a free random port on the host system, which can be discovered with the "docker inspect" command (actually there is now a simpler "docker port" command). This port is then used to create the build.properties, load the data, and run the tests. Afterwards the instance/container is stoped and deleted ("docker stop" and "docker rm"). Also, the run-tests.sh script including the execution of Maven itself runs on the host system, not within the container, the new image doesn't have any Java nor Maven installed, only the preconfigured OpenLDAP.

The image/template is never changed. (Yes it is possible to create an image from a container, but that't bad practice, always use a Dockerfile to build an image.)

HTH :)
Stefan



was (Author: seelmann):
If we push the image then it will have the debian openldap preinstalled? - Yes
What about the data that was used to test the image, will that be present as well? - No

The "docker build" command that you run once generates an image that contains what is described in the Dockerfile: Debian 8 libaries, OpenLDAP installed, configured with the slapd.conf and fortress schema (converted to slapd-config LDIF), that's all. This image is then in your local docker image repo, and you can push it to docker hub. The docker image is just like a template.

When executing the run-tests.sh script, the "docker run" command then starts an instance of the image (called container). This doesn't start the full debian system (no init, no systemd), but only the OpenLDAP process (as defined in last CMD line in Dockerfile) which then listens within the container on port 389. The port 389 is then mapped to a free random port on the host system, which can be discovered with the "docker inspect" command (actually there is now a simpler "docker port" command). This port is then used to create the build.properties, load the data, and run the tests. Afterwards the instance/container is stoped and deleted ("docker stop" and "docker rm").

The image/template is never changed. (Yes it is possible to create an image from a container, but that't bad practice, always use a Dockerfile to build an image.)

HTH :)
Stefan


> dir-fortress-core-docker-test to use latest slapd install procs
> ---------------------------------------------------------------
>
>                 Key: FC-202
>                 URL: https://issues.apache.org/jira/browse/FC-202
>             Project: FORTRESS
>          Issue Type: Improvement
>         Environment: Ubuntu
>            Reporter: Shawn McKinney
>
> Change the fortress core docker tests to use the latest install procedures: https://github.com/apache/directory-fortress-core/blob/master/README-QUICKSTART-SLAPD.md



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)