src/build/html/zeo.html
changeset 0 d153941bb745
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/build/html/zeo.html	Sun Jan 14 11:48:51 2018 +0100
@@ -0,0 +1,194 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>Creating a ZEO server &#8212; PyAMS User Guide 0.1.0 documentation</title>
+    <link rel="stylesheet" href="_static/pyramid.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    './',
+        VERSION:     '0.1.0',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true,
+        SOURCELINK_SUFFIX: '.txt'
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Installing PyAMS" href="install.html" />
+    <link rel="prev" title="Welcome to PyAMS_utils’s documentation!" href="index.html" />
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Neuton&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
+<!--[if lte IE 6]>
+<link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" />
+<![endif]-->
+
+  </head>
+  <body>
+
+    <div class="related" role="navigation" aria-label="related navigation">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="install.html" title="Installing PyAMS"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="Welcome to PyAMS_utils’s documentation!"
+             accesskey="P">previous</a> |</li>
+        <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> &#187;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body" role="main">
+            
+  <div class="section" id="creating-a-zeo-server">
+<span id="zeo"></span><h1>Creating a ZEO server<a class="headerlink" href="#creating-a-zeo-server" title="Permalink to this headline">¶</a></h1>
+<p>PyAMS primarily relies on a ZODB database to store it’s configuration. Other packages may rely on another
+database, but <em>PyAMS_content</em> package also stores it’s contents in a ZODB.</p>
+<p>As some PyAMS packages start concurrent processes (“synchronization” is done via <strong>ØMQ</strong>), concurrent accesses are
+required on the ZODB (even when you start your application in “single process” mode) and a ZEO server have to be
+started.</p>
+<div class="section" id="creating-initial-buildout">
+<h2>Creating initial buildout<a class="headerlink" href="#creating-initial-buildout" title="Permalink to this headline">¶</a></h2>
+<p>PyAMS provides a ZEO server scaffold, called <em>zeo_server</em>, generated via a <em>cookiecutter</em> template.</p>
+<p>A simple option to create a ZEO server is to create a buildout environment including <em>ZEO</em> and <em>ZODB</em> packages:</p>
+<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="c1"># mkdir /var/local/</span>
+<span class="c1"># pip3 install virtualenv</span>
+<span class="c1"># virtualenv --python=python3.5 env</span>
+<span class="c1"># cd env</span>
+<span class="c1"># . bin/activate</span>
+<span class="o">(</span>env<span class="o">)</span> <span class="c1"># pip3.5 install cookiecutter</span>
+<span class="o">(</span>env<span class="o">)</span> <span class="c1"># cookiecutter hg+http://hg.ztfy.org/pyams/scaffolds/zeo_server</span>
+</pre></div>
+</div>
+<p><em>CookieCutter</em> will ask you for a small set of input variables that you can change or not:</p>
+<ul class="simple">
+<li><strong>pyams_release</strong>: version of PyAMS configuration file to use. “latest” (default value) will point to last release;
+you can also choose to point to a given release (“0.1.4” for example)</li>
+<li><strong>project_name</strong>: current environment name in “human form”</li>
+<li><strong>project_slug</strong>: “technical” package name, based on project name</li>
+<li><strong>eggs_directory</strong>: relative or absolute path to directory containing downloaded eggs; this directory can be
+shared with other projects (“eggs” as default)</li>
+<li><strong>run_user</strong>: user name under which ZEO process will run (“zeoadm” as default)</li>
+<li><strong>run_group</strong>: group name under which ZEO process will run (“zeo” as default)</li>
+<li><strong>zeo_server_port</strong>: listening port of ZEO server (“8100” as default)</li>
+<li><strong>zeo_monitor_port</strong>: listening port of ZEO monitor (“8101” as default)</li>
+<li><strong>zeo_storage</strong>: name of first ZEO storage; default value is based on project name</li>
+<li><strong>use_zeo_auth</strong>: specify if ZEO authentication should be used</li>
+<li><strong>zeo_auth_user</strong>: name of ZEO authenticated user (if ZEO authentication is used)</li>
+<li><strong>zeo_auth_password</strong>: password of ZEO authenticated user (if ZEO authentication is used)</li>
+<li><strong>zeo_pack_report</strong>: email address to which pack reports should be sent</li>
+<li><strong>logs_directory</strong>: absolute path to directory containing ZEO’s log files.</li>
+</ul>
+<p>A message is displayed after initialization to finalize environment creation:</p>
+</div>
+<div class="section" id="zeo-server-configuration">
+<h2>ZEO server configuration<a class="headerlink" href="#zeo-server-configuration" title="Permalink to this headline">¶</a></h2>
+<p>All ZEO configuration files are generated in “etc” subdirectory. These includes:</p>
+<ul class="simple">
+<li><strong>etc/zeo_server-zdaemon.conf</strong>: ZDaemon configuration file</li>
+<li><strong>etc/zeo_server-zeo.conf</strong>: ZEO server configuration file</li>
+<li><strong>etc/auth.db</strong>: ZEO authentication file; WARNING: this file is not created automatically, you have to create it
+after buildout.</li>
+</ul>
+<p>In these file names, always replace “zeo_server” with the value which was given to “project_slug” variable during
+<em>CookieCutter</em> template creation.</p>
+</div>
+<div class="section" id="zeo-server-tools">
+<h2>ZEO server tools<a class="headerlink" href="#zeo-server-tools" title="Permalink to this headline">¶</a></h2>
+<p>A set of system configuration files are produced to handle your ZEO environment. These includes:</p>
+<ul>
+<li><p class="first"><strong>etc/init.d/zeo-zeo_server</strong>: ZEO server start/stop script in Init-D format. Create a link to this file in
+<em>/etc/init.d</em> and update Init.d scripts (<em>update-rc.d zeo-zeo_server defaults</em>) to include ZEO in server start/stop</p>
+<blockquote>
+<div><p>process. You can also use this script to start/stop ZEO by hand with <em>start</em> and <em>stop</em> arguments.</p>
+</div></blockquote>
+</li>
+<li><p class="first"><strong>etc/systemd/zeo-zeo_server.service</strong>: SystemD service configuration file for ZEO server. Create a link to this
+file in <em>/etc/systemd/system</em> and reload SystemD daemon (<em>systemctl daemon-reload</em>) before activating ZEO service
+(<em>systemctl enable zeo-zeo_server.service</em> and <em>systemctl start zeo-zeo_server.service</em>).</p>
+</li>
+<li><p class="first"><strong>etc/logrotate.d/zeo-zeo_server</strong>: LogRotate configuration file for ZEO log files. Create a link to this file in
+<em>/etc/logrotate.d</em> to activate log rotation for ZEO server.</p>
+</li>
+<li><p class="first"><strong>etc/cron.d/pack-zeo-zeo_server</strong>: Cron configuration file for ZEO database packing. Just create a link to this
+file in <em>/etc/cron.d</em> directory to enable ZODB packing on a weekly basis (by default).</p>
+</li>
+</ul>
+<p>In these file names, always replace “zeo_server” with the value which was given to “project_slug” variable during
+<em>CookieCutter</em> template creation. All directory names are those used on a Debian GNU/Linux distribution and may have
+to be changed on other distributions.</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Creating a ZEO server</a><ul>
+<li><a class="reference internal" href="#creating-initial-buildout">Creating initial buildout</a></li>
+<li><a class="reference internal" href="#zeo-server-configuration">ZEO server configuration</a></li>
+<li><a class="reference internal" href="#zeo-server-tools">ZEO server tools</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="index.html"
+                        title="previous chapter">Welcome to PyAMS_utils’s documentation!</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="install.html"
+                        title="next chapter">Installing PyAMS</a></p>
+<div id="searchbox" style="display: none" role="search">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <div><input type="text" name="q" /></div>
+      <div><input type="submit" value="Go" /></div>
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related" role="navigation" aria-label="related navigation">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="install.html" title="Installing PyAMS"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="Welcome to PyAMS_utils’s documentation!"
+             >previous</a> |</li>
+        <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> &#187;</li> 
+      </ul>
+    </div>
+    <div class="footer" role="contentinfo">
+        &#169; Copyright 2017, Thierry Florac.
+      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
+    </div>
+  </body>
+</html>
\ No newline at end of file