summaryrefslogtreecommitdiff
path: root/docs/_build/html/upgrade.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/_build/html/upgrade.html')
-rw-r--r--docs/_build/html/upgrade.html424
1 files changed, 424 insertions, 0 deletions
diff --git a/docs/_build/html/upgrade.html b/docs/_build/html/upgrade.html
new file mode 100644
index 0000000..2304c83
--- /dev/null
+++ b/docs/_build/html/upgrade.html
@@ -0,0 +1,424 @@
+
+
+<!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>Upgrade &mdash; Chimère 2.0 documentation</title>
+
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '',
+ VERSION: '2.0',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </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="top" title="Chimère 2.0 documentation" href="index.html" />
+ <link rel="next" title="Configuration" href="configuration.html" />
+ <link rel="prev" title="Installation" href="install.html" />
+ </head>
+ <body>
+ <div class="related">
+ <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="configuration.html" title="Configuration"
+ accesskey="N">next</a> |</li>
+ <li class="right" >
+ <a href="install.html" title="Installation"
+ accesskey="P">previous</a> |</li>
+ <li><a href="index.html">Chimère 2.0 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="upgrade">
+<h1>Upgrade<a class="headerlink" href="#upgrade" title="Permalink to this headline">¶</a></h1>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Author:</th><td class="field-body">Étienne Loks</td>
+</tr>
+<tr class="field-even field"><th class="field-name">date:</th><td class="field-body">2012-10-08</td>
+</tr>
+<tr class="field-odd field"><th class="field-name">Copyright:</th><td class="field-body">CC-BY 3.0</td>
+</tr>
+</tbody>
+</table>
+<p>Before any upgrade backup the database and all your installation files
+(specially if you have made changes to them).
+The process for migration requires a basic knowledge of Git and Linux CLI. It is
+not an easy process. A work is done to easy the upgrade in later versions (&gt;2.0)
+of Chimère.</p>
+<p>If several versions has been published, you should repeat any upgrading steps.
+For instance to upgrade from v1.1 to v2.0 you should first upgrade to v1.2 then
+to v2.0. The only optional step is the integration of your customisations.</p>
+<p>The current stable version is 2.0.
+If you are considering to contribute on Chimère get the Git master.</p>
+<p>The instruction are given for Debian Squeeze and Debian Wheezy.</p>
+<div class="section" id="get-new-version-of-dependencies">
+<h2>Get new version of dependencies<a class="headerlink" href="#get-new-version-of-dependencies" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="version-1-1-1-2">
+<h3>Version 1.1 -&gt; 1.2<a class="headerlink" href="#version-1-1-1-2" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-bash"><div class="highlight"><pre>apt-get install python-lxml libjs-jquery gpsbabel python-gdal
+</pre></div>
+</div>
+</div>
+<div class="section" id="version-1-2-2-0">
+<h3>Version 1.2 -&gt; 2.0<a class="headerlink" href="#version-1-2-2-0" title="Permalink to this headline">¶</a></h3>
+<div class="section" id="debian-squeeze">
+<h4>Debian Squeeze<a class="headerlink" href="#debian-squeeze" title="Permalink to this headline">¶</a></h4>
+<p>Activate the backports: <a class="reference external" href="http://backports-master.debian.org/Instructions/">http://backports-master.debian.org/Instructions/</a>
+Then install the new dependencies:</p>
+<div class="highlight-python"><pre>apt-get install -t squeeze-backports python-django python-django-south \
+ python-simplejson libjs-jquery-ui python-pyexiv2 \
+ python-feedparser javascript-common</pre>
+</div>
+</div>
+<div class="section" id="debian-wheezy">
+<h4>Debian Wheezy<a class="headerlink" href="#debian-wheezy" title="Permalink to this headline">¶</a></h4>
+<div class="highlight-bash"><div class="highlight"><pre>apt-get install python-django-south python-simplejson libjs-jquery-ui <span class="se">\</span>
+ python-pyexiv2 python-feedparser javascript-common
+</pre></div>
+</div>
+<p>If you are planing to do major import consider the install of <a class="reference external" href="http://celeryproject.org/">Celery</a>.</p>
+<div class="highlight-bash"><div class="highlight"><pre>apt-get install python-django-celery python-kombu
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="get-the-new-sources">
+<h2>Get the new sources<a class="headerlink" href="#get-the-new-sources" title="Permalink to this headline">¶</a></h2>
+<p>First of all we have to get the new version of the source code.
+For this upgrade process, we are getting the source code from the Git
+repository.</p>
+<p>To simplify further instructions, some environment variables are
+initialized.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nv">CHIMERE_PATH</span><span class="o">=</span>/srv/chimere
+<span class="nv">CHIMERE_TAG</span><span class="o">=</span>v1.2.0 <span class="c"># version 1.1 -&gt; 1.2</span>
+<span class="nv">CHIMERE_TAG</span><span class="o">=</span>v2.0-RC3 <span class="c"># version 1.2 -&gt; 2.0</span>
+<span class="nv">CHIMERE_TAG</span><span class="o">=</span>master <span class="c"># version 2.0 -&gt; master</span>
+<span class="nv">CHIMERE_LOCALNAME</span><span class="o">=</span>mychimere
+</pre></div>
+</div>
+<p>Your local name is used for the name of your local git branch and the Python
+package. As a Python package it should follow the rule of Python variable name:
+it must be at least one letter and can have a string of numbers, letters and
+&#8220;_&#8221; to any length. Don&#8217;t begin the name by &#8220;_&#8221; because it has special
+significance in Python.</p>
+<div class="section" id="from-a-previous-git-installation">
+<h3>From a previous Git installation<a class="headerlink" href="#from-a-previous-git-installation" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_PATH</span>
+git checkout -b <span class="nv">$CHIMERE_LOCALNAME</span> <span class="c"># do it only if you haven&#39;t yet create a local branch</span>
+git stash <span class="c"># if you have uncommited changes</span>
+git checkout master
+git pull
+git checkout <span class="nv">$CHIMERE_LOCALNAME</span>
+git rebase <span class="nv">$CHIMERE_TAG</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="from-a-previous-tarball-installation">
+<h3>From a previous tarball installation<a class="headerlink" href="#from-a-previous-tarball-installation" title="Permalink to this headline">¶</a></h3>
+<p>Remove first your old installation and get the Git version.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_PATH</span>
+<span class="nb">cd</span> ..
+rm -rf <span class="nv">$CHIMERE_PATH</span>
+git clone git://www.peacefrogs.net/git/chimere
+<span class="nb">cd </span>chimere
+git checkout <span class="nv">$CHIMERE_TAG</span>
+git checkout -b <span class="nv">$CHIMERE_LOCALNAME</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="update-basic-settings">
+<h3>Update basic settings<a class="headerlink" href="#update-basic-settings" title="Permalink to this headline">¶</a></h3>
+<div class="section" id="id1">
+<h4>Version 1.1 -&gt; 1.2<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nv">CHIMERE_APP_PATH</span><span class="o">=</span><span class="nv">$CHIMERE_PATH</span>/chimere
+vim <span class="nv">$CHIMERE_APP_PATH</span>/settings.py
+</pre></div>
+</div>
+<p>Add the line (adapted for your jquery and gpsbabel installation).</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">JQUERY_URL</span> <span class="o">=</span> <span class="n">SERVER_URL</span> <span class="o">+</span> <span class="s">&#39;jquery/jquery-1.4.4.min.js&#39;</span>
+<span class="n">GPSBABEL</span> <span class="o">=</span> <span class="s">&#39;/usr/bin/gpsbabel&#39;</span>
+<span class="c"># simplify with an error of 5 meters</span>
+<span class="n">GPSBABEL_OPTIONS</span> <span class="o">=</span> <span class="s">&#39;simplify,crosstrack,error=0.005k&#39;</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="id2">
+<h4>Version 1.2 -&gt; 2.0<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="project-template">
+<h5>Project template<a class="headerlink" href="#project-template" title="Permalink to this headline">¶</a></h5>
+<p>Create a new project template.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_PATH</span>
+cp -ra <span class="nv">$CHIMERE_PATH</span>/example_project <span class="nv">$CHIMERE_LOCALNAME</span>
+<span class="nv">CHIMERE_APP_PATH</span><span class="o">=</span><span class="nv">$CHIMERE_PATH</span>/<span class="nv">$CHIMERE_LOCALNAME</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="local-settings">
+<h5>local_settings<a class="headerlink" href="#local-settings" title="Permalink to this headline">¶</a></h5>
+<p>A <em>local_settings</em> file is now used.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>
+cp local_settings.py.sample local_settings.py
+vim local_settings.py
+</pre></div>
+</div>
+<p>Report your old settings.py in local_settings.py (at least the database
+configuration).
+Your <em>ROOT_URLCONF</em> must be set to <strong>value_of_your_localname.urls</strong>.</p>
+</div>
+<div class="section" id="logs">
+<h5>logs<a class="headerlink" href="#logs" title="Permalink to this headline">¶</a></h5>
+<p>Logging is now enabled by default in the file <em>/var/log/django/chimere.log</em>.</p>
+<div class="highlight-bash"><div class="highlight"><pre>mkdir /var/log/django
+touch /var/log/django/chimere.log
+chown www-data -R /var/log/django
+</pre></div>
+</div>
+</div>
+<div class="section" id="static-files">
+<h5>Static files<a class="headerlink" href="#static-files" title="Permalink to this headline">¶</a></h5>
+<p>Now static file are managed with <em>django.contrib.staticfiles</em>.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>
+./manage.py collectstatic
+</pre></div>
+</div>
+<p>Move old static files to the new static directory.</p>
+<div class="highlight-bash"><div class="highlight"><pre>cp -ra <span class="nv">$CHIMERE_PATH</span>/chimere/static/* <span class="nv">$CHIMERE_APP_PATH</span>/static/
+cp -ra <span class="nv">$CHIMERE_PATH</span>/chimere/static/icons/* <span class="nv">$CHIMERE_APP_PATH</span>/media/icons/
+cp -ra <span class="nv">$CHIMERE_PATH</span>/chimere/static/upload <span class="nv">$CHIMERE_APP_PATH</span>/media/
+</pre></div>
+</div>
+</div>
+<div class="section" id="webserver-configuration">
+<h5>Webserver configuration<a class="headerlink" href="#webserver-configuration" title="Permalink to this headline">¶</a></h5>
+<p>If you are using Apache and WSGI to serve your Chimère, change your WSGI
+configuration file to point to the correct settings:
+<strong>value_of_your_localname.settings</strong>.</p>
+<p>Change your webserver directive to point to the correct static directory from
+<strong>your_chimere_path/chimere/static</strong> to
+<strong>your_chimere_path/your_local_name/static</strong>.</p>
+</div>
+</div>
+<div class="section" id="version-2-0-master">
+<h4>Version 2.0 -&gt; master<a class="headerlink" href="#version-2-0-master" title="Permalink to this headline">¶</a></h4>
+<p>Update settings and static files.</p>
+<div class="highlight-bash"><div class="highlight"><pre>cp <span class="nv">$CHIMERE_PATH</span>/example_project/settings.py <span class="nv">$CHIMERE_LOCALNAME</span>
+./manage.py collectstatic
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="migrate-database">
+<h2>Migrate database<a class="headerlink" href="#migrate-database" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id3">
+<h3>Version 1.1 -&gt; 1.2<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
+<p>Migration scripts test your installation before making changes so you probably
+won&#8217;t have any lost but by precaution before running theses scripts don&#8217;t forget
+to backup your database.
+You can also make a copy of your current database into a new database and make
+the new installation to this new database.</p>
+<p>The gdal binding for python is necessary to run the upgrade scripts (available
+in the python-gdal package in Debian).</p>
+<p>If you run the migration scripts in a production environnement stop the old
+instance of Chimère before executing the migration script. Perhaps prepare the
+web server to point to the new installation before doing the database upgrade
+(cf. next paragraph).</p>
+<p>In <em>settings.py</em> verify that <strong>chimere.scripts</strong> is in the <em>INSTALLED_APPS</em>.</p>
+<p>After that in the chimere directory just execute the script.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>
+python ./scripts/upgrade.py
+</pre></div>
+</div>
+</div>
+<div class="section" id="id4">
+<h3>Version 1.2 -&gt; 2.0<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
+<p>Django South is now used to manage database migrations.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>
+./manage.py syncdb
+./manage.py migrate chimere 0001 --fake <span class="c"># fake the database initialisation</span>
+./manage.py migrate chimere
+</pre></div>
+</div>
+<p>A description field is now available for markers. If you would like to move
+values of an old <em>Property model</em> to this new field, a script is available.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>
+../chimere/scripts/migrate_properties.py
+<span class="c"># folow the instructions</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="from-2-0-to-master">
+<h3>From 2.0 to master<a class="headerlink" href="#from-2-0-to-master" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>
+./manage.py syncdb
+./manage.py migrate chimere
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="update-translations">
+<h2>Update translations<a class="headerlink" href="#update-translations" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="id5">
+<h3>Version 1.1 -&gt; 1.2<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>
+./manage.py compilemessages
+</pre></div>
+</div>
+</div>
+<div class="section" id="version-1-2-2-0-master">
+<h3>Version 1.2 -&gt; 2.0 -&gt; master<a class="headerlink" href="#version-1-2-2-0-master" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_PATH</span>/chimere
+django-admin compilemessages
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="force-the-upgrade-of-visitor-s-web-browser-cache">
+<h2>Force the upgrade of visitor&#8217;s web browser cache<a class="headerlink" href="#force-the-upgrade-of-visitor-s-web-browser-cache" title="Permalink to this headline">¶</a></h2>
+<p>If major changes in the javascript has be done between version, many of your
+users could experience problems. There are many tricks to force the refresh
+of their cache. One of them is to change the location of statics files. To do
+that edit your local_settings.py and change:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">STATIC_URL</span> <span class="o">=</span> <span class="s">&#39;/static/&#39;</span>
+</pre></div>
+</div>
+<p>to:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">STATIC_URL</span> <span class="o">=</span> <span class="s">&#39;/static/v2.0.0/&#39;</span>
+</pre></div>
+</div>
+<p>Then in the static directory.</p>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$CHIMERE_APP_PATH</span>/static
+ln -s <span class="sb">`</span><span class="nb">pwd</span><span class="sb">`</span> v2.0.0
+</pre></div>
+</div>
+<p>Restart the web server to apply this changes.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">Upgrade</a><ul>
+<li><a class="reference internal" href="#get-new-version-of-dependencies">Get new version of dependencies</a><ul>
+<li><a class="reference internal" href="#version-1-1-1-2">Version 1.1 -&gt; 1.2</a></li>
+<li><a class="reference internal" href="#version-1-2-2-0">Version 1.2 -&gt; 2.0</a><ul>
+<li><a class="reference internal" href="#debian-squeeze">Debian Squeeze</a></li>
+<li><a class="reference internal" href="#debian-wheezy">Debian Wheezy</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#get-the-new-sources">Get the new sources</a><ul>
+<li><a class="reference internal" href="#from-a-previous-git-installation">From a previous Git installation</a></li>
+<li><a class="reference internal" href="#from-a-previous-tarball-installation">From a previous tarball installation</a></li>
+<li><a class="reference internal" href="#update-basic-settings">Update basic settings</a><ul>
+<li><a class="reference internal" href="#id1">Version 1.1 -&gt; 1.2</a></li>
+<li><a class="reference internal" href="#id2">Version 1.2 -&gt; 2.0</a><ul>
+<li><a class="reference internal" href="#project-template">Project template</a></li>
+<li><a class="reference internal" href="#local-settings">local_settings</a></li>
+<li><a class="reference internal" href="#logs">logs</a></li>
+<li><a class="reference internal" href="#static-files">Static files</a></li>
+<li><a class="reference internal" href="#webserver-configuration">Webserver configuration</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#version-2-0-master">Version 2.0 -&gt; master</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#migrate-database">Migrate database</a><ul>
+<li><a class="reference internal" href="#id3">Version 1.1 -&gt; 1.2</a></li>
+<li><a class="reference internal" href="#id4">Version 1.2 -&gt; 2.0</a></li>
+<li><a class="reference internal" href="#from-2-0-to-master">From 2.0 to master</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#update-translations">Update translations</a><ul>
+<li><a class="reference internal" href="#id5">Version 1.1 -&gt; 1.2</a></li>
+<li><a class="reference internal" href="#version-1-2-2-0-master">Version 1.2 -&gt; 2.0 -&gt; master</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#force-the-upgrade-of-visitor-s-web-browser-cache">Force the upgrade of visitor&#8217;s web browser cache</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="install.html"
+ title="previous chapter">Installation</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="configuration.html"
+ title="next chapter">Configuration</a></p>
+ <h3>This Page</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/upgrade.txt"
+ rel="nofollow">Show Source</a></li>
+ </ul>
+<div id="searchbox" style="display: none">
+ <h3>Quick search</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" />
+ <input type="submit" value="Go" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <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="configuration.html" title="Configuration"
+ >next</a> |</li>
+ <li class="right" >
+ <a href="install.html" title="Installation"
+ >previous</a> |</li>
+ <li><a href="index.html">Chimère 2.0 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2012, Étienne Loks.
+ Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+ </div>
+ </body>
+</html> \ No newline at end of file