<div dir="ltr">I'm thinking of doing something like this too.  I'd really like to see the zebra var's from the koha_conf.xml too, if possible.  Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 8:37 AM, Kivilahti Olli-Antti <span dir="ltr"><<a href="mailto:olli-antti.kivilahti@jns.fi" target="_blank">olli-antti.kivilahti@jns.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi!<br>
<br>
We install Koha in a cluster of LXC containers:<br>
<br>
One haproxy for dns redirection and ssl offloading<br>
One container for MariaDB<br>
One for OPAC<br>
One for staff client<br>
One for Zebra<br>
One for misc stuff, like the SIP2-server<br>
One for ElasticSearch<br>
One for Memcached<br>
+containers for other support services<br>
<br>
With haproxy it is rather straight forward to start load balancing multiple "web bricks" if you choose to. We don't need to do it since we chose to buy a lot of hardware. Hardware is less expensive than work where we live in.<br>
This clusterization is simply to increase robustness and security.<br>
And actually has saved our bacon few times during the past years, when we get unidentifiable hard-drive freezes with the SIP2-container,<br>
or some cronjob has went awol and completely hogged all system resources available to it.<br>
Without containerization we would have had downtime.<br>
Also helps with simple DOS-attacks which can happen by accident.<br>
<br>
I recommend this type of setup.<br>
<br>
Unfortunately the debian packages add a lot of unnecesary cruft to each container so we use dev-install instead.<br>
<br>
Getting Zebra to work in a separate container:<br>
Zebra is really really really tightly wound into the make-toolchain Koha uses and there is no convenient way of separating it. Maybe you could just bind mount the zebradb-directory between containers. This might be enough to run Zebra separate of the Koha's
 source code.<br>
<br>
Since mass storage is very cheap, we just run two identical Koha instances from the same source code repo. We make several identical Koha-installations via the dev-install.<br>
The Zebra-one only has Zebra and Koha sources (no Apache2, MariaDB, etc packages needed by a standalone Koha).<br>
You can configure Zebra to listen on tcp socket via the $KOHA_CONF. You can conveniently centrally configure the same $KOHA_CONF to all the Koha containers, so they all find the same Zebra by the ip and the same MariaDB. This is best done with Ansible (since
 community has already started working towards Ansible)<br>
<br>
<br>
Separating Zebra to a isolated (and easily monitorable) environment is entirely possible.<br>
<br>
<br>
<br>
Here is a snippet from our Ansible infrastructure definitions where Koha is set up with capability: zebra<br>
<br>
These should be most of the Ansible steps needed together with Koha-source to get Zebra running standalone:<br>
<br>
<br>
<br>
ansible@hephaestus:~/<wbr>KSAnsible$ cat roles/koha/tasks/capabilities/<wbr>zebra.yml<br>
<br>
---<br>
<br>
- name: Install zebrasrv and zebraidx<br>
  apt:<br>
    name: idzebra-2.0<br>
  become: yes<br>
<br>
- name: Create the zebra socket-dir and permissions<br>
  file:<br>
    path: "{{zebra_run_dir}}"<br>
    owner: koha<br>
    group: koha<br>
    state: directory<br>
  become: yes<br>
<br>
- name: Create the zebra lock-dir and permissions<br>
  file:<br>
    path: "{{zebra_lock_dir}}"<br>
    owner: koha<br>
    group: koha<br>
    state: directory<br>
  become: yes<br>
<br>
- name: Create the zebra data-dir and permissions<br>
  file:<br>
    path: "{{zebra_data_dir}}"<br>
    owner: koha<br>
    group: koha<br>
    state: directory<br>
  become: yes<br>
<br>
<br>
- name: Configure Zebra stripes<br>
  lineinfile:<br>
    path:   "{{item.path}}"<br>
    regexp: "{{item.regexp}}"<br>
    line:   "{{item.line}}"<br>
  with_items:<br>
    - path:   "{{koha_dev_path}}/etc/<wbr>zebradb/zebra-biblios-dom.cfg"<br>
      regexp: "^memMax:"<br>
      line:    "memMax: {{zebra_index_mem}}"<br>
    - path:   "{{koha_dev_path}}/etc/<wbr>zebradb/zebra-biblios-dom.cfg"<br>
      regexp: "^register:"<br>
      line:    "register: {{zebra_data_dir}}/biblios/<wbr>register:{{zebra_index_size}}"<br>
    - path:   "{{koha_dev_path}}/etc/<wbr>zebradb/zebra-biblios-dom.cfg"<br>
      regexp: "^shadow:"<br>
      line:    "shadow: {{zebra_data_dir}}/biblios/<wbr>shadow:{{zebra_index_size}}"<br>
    - path:   "{{koha_dev_path}}/etc/<wbr>zebradb/zebra-biblios-dom.cfg"<br>
      regexp: "^sortmax:"<br>
      line:    "sortmax: {{zebra_sort_max}}"<br>
    - path:   "{{koha_dev_path}}/etc/<wbr>zebradb/zebra-biblios-dom.cfg"<br>
      regexp: "^facetNumRecs:"<br>
      line:    "facetNumRecs:{{zebra_facet_<wbr>num_records}}"<br>
      owner: koha<br>
  become: yes<br>
  notify: Restart Zebra<br>
<br>
- name: Zebra - Link Zebra-service<br>
  file:<br>
    src:   "{{koha_dev_path}}/bin/koha-<wbr>zebra-ctl.sh"<br>
    dest:  "/etc/init.d/koha-zebra-<wbr>daemon"<br>
    owner: root<br>
    group: root<br>
    state: "link"<br>
  become: yes<br>
<br>
- name: Zebra - Enable Zebra-service<br>
  systemd:<br>
    name: koha-zebra-daemon<br>
    enabled: yes<br>
    daemon_reload: yes<br>
    state: started<br>
  become: yes<br>
<br>
- name: Zebra-index - Link Zebra-index-service<br>
  file:<br>
    src:   "{{koha_dev_path}}/bin/koha-<wbr>index-daemon-ctl.sh"<br>
    dest:  "/etc/init.d/koha-index-<wbr>daemon"<br>
    owner: root<br>
    group: root<br>
    state: "link"<br>
  become: yes<br>
<br>
- name: Zebra-index - Enable Zebra-index-service<br>
  systemd:<br>
    name: koha-index-daemon<br>
    enabled: yes<br>
    daemon_reload: yes<br>
    state: started<br>
  become: yes<br>
<br>
- name: Deploy Zebra cronjobs<br>
  template:<br>
    owner: "{{koha_user}}"<br>
    src:   "etc_cron.d_koha.j2"<br>
    dest:  "/etc/cron.d/koha-zebra"<br>
  vars:<br>
    cronjobs:<br>
      rbza:<br>
        comment: '#Trigger full Zebra reindexing daily'<br>
        prefix:  ' '<br>
        timing:  '46 10 * * *'<br>
        user:    'koha'<br>
        command: 'migration_tools/<a href="http://rebuild_zebra.pl" target="_blank">rebuild_<wbr>zebra.pl</a> -b -a -r -v -x'<br>
  become: yes<br>
<br>
<br>
<br>
<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_4135869002833904029divRpF156636" style="direction:ltr"><font size="2" color="#000000" face="Tahoma"><b>From:</b> <a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@lists.koha-<wbr>community.org</a> [<a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@lists.<wbr>koha-community.org</a>] on behalf of Mansur Ali [<a href="mailto:mansuralih@gmail.com" target="_blank">mansuralih@gmail.com</a>]<br>
<b>Sent:</b> Tuesday, July 18, 2017 3:11 PM<br>
<b>To:</b> Tajoli Zeno<br>
<b>Cc:</b> <a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-<wbr>community.org</a><br>
<b>Subject:</b> Re: [Koha-devel] Dedicated Zebra Server<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr"><span style="font-family:tahoma,sans-serif">Thank you for your valuable information.<br>
</span><br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jul 18, 2017 at 2:59 PM, Tajoli Zeno <span dir="ltr">
<<a href="mailto:z.tajoli@cineca.it" target="_blank">z.tajoli@cineca.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<span><br>
<br>
Il 18/07/2017 13:28, Mansur Ali ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I am using KOHA ILS. Can i able to use dedicated Zebra Server which is installed in another server? Could you please advice if possible?<br>
</blockquote>
<br>
</span>with present standard installation, the answer is no, it is not possible.<br>
<br>
In theory if:<br>
1)You setup to use PazPar instead of Zebra [an old option not tested from years] AND<br>
2)You rewrite the updating scripts and deamon<br>
<br>
you can try to do it.<br>
<br>
I suggest you to do a try only if you are very skilled on Zebra and others Indexdata's tools.<br>
<br>
Bye<span class="m_4135869002833904029HOEnZb"><font color="#888888"><br>
Zeno Tajoli<br>
<br>
-- <br>
Zeno Tajoli<br>
/SVILUPPO PRODOTTI CINECA/ - Automazione Biblioteche<br>
Email: <a href="mailto:z.tajoli@cineca.it" target="_blank">z.tajoli@cineca.it</a> Fax: 051/6132198<br>
*CINECA* Consorzio Interuniversitario - Sede operativa di Segrate (MI)<br>
</font></span></blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="m_4135869002833904029gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><span style="font-family:georgia,serif">Mansur Ali<br>
</span>
<p><span style="font-family:georgia,serif;font-size:10pt"><a href="tel:+966%2056%20897%208721" value="+966568978721" target="_blank">+966568978721</a> | +</span><font face="georgia, serif"><span style="font-size:13.3333330154419px">919061635954 </span>|</font><font style="font-family:georgia,serif" size="2">
<a href="mailto:mansuralih@gmail.com" target="_blank">mansuralih@gmail.com</a></font><span></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-<wbr>community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.<wbr>org/cgi-bin/mailman/listinfo/<wbr>koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.<wbr>org/</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div>Michael Hafen<br></div>Washington County School District Technology Department<br></div>Systems Analyst<br><br></div></div></div></div>
</div>