{"id":304,"date":"2015-01-28T14:25:11","date_gmt":"2015-01-28T13:25:11","guid":{"rendered":"http:\/\/www.francelabs.com\/blog\/?p=304"},"modified":"2017-11-08T08:42:26","modified_gmt":"2017-11-08T07:42:26","slug":"datafari-on-docker","status":"publish","type":"post","link":"https:\/\/www.francelabs.com\/blog\/datafari-on-docker\/","title":{"rendered":"Datafari on Docker"},"content":{"rendered":"<p>NOTE: This is the English version. For the French version, please scroll down.<\/p>\n<p>UPDATE 08\/08\/16 : update of the post for Datafari v3<\/p>\n<p>UPDATE 01\/04\/16 : beware that there is a bug with Docker toolbox 1.9.1 for the use of Cassandra (which is a component of Datafari). Update your Docker to 1.10+<br \/>\n<a href=\"https:\/\/github.com\/docker\/docker\/issues\/18180\">https:\/\/github.com\/docker\/docker\/issues\/18180<\/a><\/p>\n<p>This time, we&#8217;ll talk about the release of Datafari on Docker.<\/p>\n<p>If you don&#8217;t know it yet, Docker is an emulation mechanism that works at a low level of the Linux kernel, hence making it faster than widespread technologies of virtualisation such as VMWare. As its name suggests, you can &#8220;dock&#8221; applications in an isolated manner, and it will work as a standalone system on your OS.<\/p>\n<p>Although we recommend installing Datafari alone on systems when used in a productive environment, using Datafari on Docker allows you to quickly install Datafari without impacting the configuration and packages in place in your system. Just download the docker image, and the remainder is being taken care of by Docker.<\/p>\n<p><!--more--><\/p>\n<p>To run it, start the following command line:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">docker pull datafari\/datafariv3 docker run -t -i -p 8080:8080 datafari\/datafariv3<\/pre>\n<p>Note that once you trigger this command line, it automatically starts the datafari server, which you can access from your browser using :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">http:\/\/localhost:8080\/Datafari<\/pre>\n<p>If you need to change the port from which you access the datafari webpages, change in the command line the first part of the [host_port]:[container_port] parameter.<\/p>\n<p>If you care a bit about security and want to change the credentials (thus requiring to edit the Datafari config files), or if you want to play with the Solr config files within the Datafari image, you need to connect to this image. By default, you can do so via the standard docker mechanism: ssh. As a reminder, check this page explaining the <a title=\"SSH access to docker container\" href=\"http:\/\/geraldkaszuba.com\/quickly-ssh-into-a-docker-container\/\" target=\"_blank\" rel=\"noopener noreferrer\">procedure to connect to your docker image via SSH<\/a>.<\/p>\n<p>The docker image relies internally on a Debian environnement, but the beauty of Docker is that this image can work on any OS that can run the Docker agent. This means the image will run on Windows, CentOS, Ubuntu, Mac, etc&#8230;<\/p>\n<p>Note that we provide you with 2 flavors of the Datafari docker image:<\/p>\n<p>1. The <a title=\"Docker image of Datafari\" href=\"https:\/\/hub.docker.com\/r\/datafari\/datafariv2\/\" target=\"_blank\" rel=\"noopener noreferrer\">one available on the docker.com marketplace<\/a>, which is a docker image. This image is run using the above mentioned command line, but is not flexible and uses a fixed version of Datafari.<\/p>\n<p>2. The <a title=\"Docker file of Datafari\" href=\"https:\/\/github.com\/francelabs\/datafari-docker\/blob\/master\/2.0\/Dockerfile\" target=\"_blank\" rel=\"noopener noreferrer\">one available on github<\/a>, which is not an docker image but a docker file. To run it, the command lines are different:<br \/>\nDownload the docker file and store it in a folder.<br \/>\nFrom this folder, start the following command:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">sudo docker build -t datafari .<\/pre>\n<p>Now you can run your datafari docker image:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">docker run -t -i -p 8080:8080 -p 8983:8983 datafari\/datafariv3<\/pre>\n<p>You can now launch your web brower and access the Datafari UI:\u00a0\u00a0<a href=\"http:\/\/localhost:8080\/Datafari\">http:\/\/localhost:8080\/Datafari<\/a><\/p>\n<p>The default credentials are admin\/admin.<\/p>\n<p>This build file is more flexible as it allows you to play with docker parameters. Plus, it always uses the latest version of Datafari since it does a wget on the Datafari rep. Also, it will give you hints on the way we built our own Datafari docker image.<\/p>\n<p>Again, we are always glad to hear feedback from you, so if please drop a message here, or do a quick tweet about it \ud83d\ude42<\/p>\n<p>French Version:<\/p>\n<p>UPDATE 08\/08\/16 : Mise \u00e0 jour du post pour Datafari v3<\/p>\n<p>UPDATE 01\/04\/16 : Fa\u00eetes attention \u00e0 ne pas utiliser la version 1.9.1 de Docker toolbox. Un bug est pr\u00e9sent qui emp\u00eache le fonctionnement de Cassandra dans les containers (ce qui est le cas de Datafari). Il faut mettre \u00e0 jour Docker Toolbox \u00e0 partir de 1.10+<br \/>\n<a href=\"https:\/\/github.com\/docker\/docker\/issues\/18180\">https:\/\/github.com\/docker\/docker\/issues\/18180<\/a><\/p>\n<p>Dans cette entr\u00e9e, nous parlerons de l&#8217;image Docker Datafari.<\/p>\n<p>Si vous ne connaissez pas encore Docker, il s&#8217;agit d&#8217;un m\u00e9canisme d&#8217;\u00e9mulation qui op\u00e8re \u00e0 bas niveau dans le noyau Linux, le rendant plus rapide que les technologies r\u00e9pandues de virtualisation telles que VMWare. Comme son nom le sugg\u00e8re, vous pouvez &#8220;docker&#8221; des applications de fa\u00e7on isol\u00e9e (\u00e0 l&#8217;image des containers dans les docks des ports), et une application dock\u00e9e fonctionnera de mani\u00e8re isol\u00e9e et autonome dans votre syst\u00e8me d&#8217;exploitation.<\/p>\n<p>Bien que dans les environnements de production, nous recommandions d&#8217;installer Datafari dans un syst\u00e8me d\u00e9di\u00e9, l&#8217;utilisation de l&#8217;image Datafari Docker vous permet de rapidement installer Datafari sans toucher \u00e0 la configuration de votre syst\u00e8me ni \u00e0 ses packages en place. Vous avez juste besoin de t\u00e9l\u00e9charger l&#8217;image docker, et Docker s&#8217;occupe du reste.<\/p>\n<p>Pour lancer l&#8217;image, executer la commande suivante:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">docker pull datafari\/datafariv3 docker run -t -i -p 8080:8080 datafari\/datafariv3<\/pre>\n<p>Lorsque vous lancez cette commande, le serveur Datafari se lance automatiquement, et vous pouvez alors y acc\u00e9der depuis votre navigateur internet, \u00e0 l&#8217;url suivante:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">http:\/\/localhost:8080\/Datafari<\/pre>\n<p>Si vous voulez changer le port auquel vous connecter depuis le navigateur, changer dans la ligne de commande la premi\u00e8re partie du param\u00e8tre [host_port]:[container_port].<\/p>\n<p>Si vous vous souciez un peu de la s\u00e9curit\u00e9 et que vous voulez changer les codes d&#8217;acc\u00e8s (ce qui n\u00e9cessite d&#8217;\u00e9diter des fichiers de config de Datafari), ou si par exemple vous voulez jouer avec les fichiers de config du Solr de Datafari, vous devez vous connecter \u00e0 cette image. Par d\u00e9faut, vous le fa\u00eetes en utilisant le m\u00e9canisme standard de Docker: ssh. Pour rappel, vous pouvez consulter cette page qui explique <a title=\"SSH access to docker container\" href=\"http:\/\/geraldkaszuba.com\/quickly-ssh-into-a-docker-container\/\" target=\"_blank\" rel=\"noopener noreferrer\">la proc\u00e9dure pour se connecter \u00e0 son image docker via SSH<\/a>.<\/p>\n<p>Notre image Docker utilise en interne un environnement Debian, mais la beaut\u00e9 de Docker fait que cette image pourra tourner sous tout OS supportant l&#8217;agent Docker. Et donc notre image peut tourner sous Windows, Centos, Ubuntu, Mac, etc&#8230;<\/p>\n<p>Nous vous fournissons Datafari sous Docker sous deux formes::<\/p>\n<p>1. L&#8217;image Docker, <a title=\"Docker image of Datafari\" href=\"https:\/\/hub.docker.com\/r\/datafari\/datafariv2\/\" target=\"_blank\" rel=\"noopener noreferrer\">disponible sur la place de march\u00e9 de docker.com<\/a>. Cette image s&#8217;execute par la commande mentionn\u00e9e plus haut, mais n&#8217;est pas flexible et utilise une version fixe de Datafari.<\/p>\n<p>2. Le docker file &#8211; et non pas l&#8217;image docker, <a title=\"Docker file of Datafari\" href=\"https:\/\/github.com\/francelabs\/datafari-docker\/blob\/master\/2.0\/Dockerfile\" target=\"_blank\" rel=\"noopener noreferrer\">disponible sur github<\/a>. Pour la construire, executer les op\u00e9rations suivantes:<br \/>\nT\u00e9l\u00e9charger le docker file et mettez-le dans le repertoire de votre choix.<br \/>\nAllez dans ce repertoire, et lancez la commande suivante:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">sudo docker build -t datafari .<\/pre>\n<p>Vous pouvez \u00e0 present lancer votre image docker Datafari:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">docker run -t -i -p 8080:8080 -p 8983:8983 datafari\/datafariv3<\/pre>\n<p>Vous pouvez maintenant lancer votre navigateur et acc\u00e9der \u00e0 la page de Datafari :\u00a0\u00a0<a href=\"http:\/\/localhost:8080\/Datafari\">http:\/\/localhost:8080\/Datafari<\/a><\/p>\n<p>Les identifiants par d\u00e9faut sont\u00a0admin\/admin.<\/p>\n<p>Ce fichier \u00e0 builder est plus flexible car il vous permet de jouer avec les param\u00e8tres de Docker. De plus, il vous permet d&#8217;utiliser la derni\u00e8re version de Datafari car il r\u00e9alise un wget sur le repo github de Datafari. Enfin, il vous permet de comprendre comment nous construisons notre image Datafari, et donc vous pouvez vous en inspirer.<\/p>\n<p>Pensez \u00e0 nous laisser un message ou un commentaire si vous avez appr\u00e9cier ce blog, ou fa\u00eetes un rapide tweet \u00e0 ce sujet \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: This is the English version. For the French version, please scroll down. UPDATE 08\/08\/16 : update of the post for Datafari v3 UPDATE 01\/04\/16 : beware that there is a bug with Docker toolbox 1.9.1 for the use of &hellip; <a href=\"https:\/\/www.francelabs.com\/blog\/datafari-on-docker\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53,1],"tags":[50,33,48,49,51],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-datafari","category-search","tag-container","tag-datafari","tag-docker","tag-enterprise-search","tag-virtualisation"],"_links":{"self":[{"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/comments?post=304"}],"version-history":[{"count":11,"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/posts\/304\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/media?parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/categories?post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.francelabs.com\/blog\/wp-json\/wp\/v2\/tags?post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}