Skip to content

Commit

Permalink
[#1083] First go at the minor version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Aug 2, 2013
1 parent b3e900e commit bb157c6
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/conf.py
Expand Up @@ -48,6 +48,7 @@
.. |storage_parent_dir| replace:: /var/lib/ckan
.. |storage_dir| replace:: |storage_parent_dir|/default
.. |reload_apache| replace:: sudo service apache2 reload
.. |restart_apache| replace:: sudo service apache2 restart
.. |solr| replace:: Solr
.. |restructuredtext| replace:: reStructuredText
.. |nginx| replace:: Nginx
Expand Down
70 changes: 69 additions & 1 deletion doc/upgrade-package-to-minor-release.rst
Expand Up @@ -8,5 +8,73 @@ Upgrading a CKAN 2 package install to a new minor release
themes or extensions you're using, check the changelog, and backup your
database. See :ref:`upgrading`.

.. todo:: Instructions for upgrading a package install to a new minor release
:ref:`Minor releases <releases>` are distributed in separated packages, so
for example CKAN ``2.0.X`` and ``2.1.X`` will be installed using the
``python-ckan_2.0_amd64.deb`` and ``python-ckan_2.1_amd64.deb`` packages
respectively.

#. Download the CKAN package (replace the version number with the relevant
one)::

wget http://packaging.ckan.org/python-ckan_2.1_amd64.deb

#. Install the package with the following command::

sudo dpkg -i python-ckan_2.1_amd64.deb

#. If there have been changes in the database schema (check the
:doc:`changelog` to find out) you need to update your CKAN database's
schema using the ``db upgrade`` command.

.. warning ::
To avoid problems during the database upgrade, comment out any plugins
that you have enabled in your ini file. You can uncomment them again when
the upgrade finishes.
For example:

.. parsed-literal::
paster db upgrade --config=\ |development.ini|
See :ref:`paster db` for details of the ``db upgrade``
command.

#. If there have been changes in the Solr schema (check the :doc:`changelog`
to find out) you need to update your Solr schema symlink.

When :ref:`setting up solr` you created a symlink
``/etc/solr/conf/schema.xml`` linking to a CKAN Solr schema file such as
|virtualenv|/src/ckan/ckan/config/solr/schema-2.0.xml. This symlink
should be updated to point to the latest schema file in
|virtualenv|/src/ckan/ckan/config/solr/, if it doesn't already.

For example, to update the symlink:

.. parsed-literal::
sudo rm /etc/solr/conf/schema.xml
sudo ln -s |virtualenv|/src/ckan/ckan/config/solr/schema-2.0.xml /etc/solr/conf/schema.xml
You will need to restart Jetty for the changes to take effect:

.. parsed-literal::
sudo service jetty restart
#. Rebuild your search index by running the ``ckan search-index rebuild``
command:

.. parsed-literal::
sudo ckan search-index rebuild -r
See :ref:`rebuild search index` for details of the
``ckan search-index rebuild`` command.

#. Finally, restart Apache:

.. parsed-literal::
|restart_apache|
6 changes: 6 additions & 0 deletions doc/upgrade-source.rst
Expand Up @@ -47,6 +47,12 @@ CKAN release you're upgrading to:
sudo rm /etc/solr/conf/schema.xml
sudo ln -s |virtualenv|/src/ckan/ckan/config/solr/schema-2.0.xml /etc/solr/conf/schema.xml
You will need to restart Jetty for the changes to take effect:

.. parsed-literal::
sudo service jetty restart
#. If you are upgrading to a new :ref:`major release <releases>` update your
CKAN database's schema using the ``db upgrade`` command.

Expand Down

0 comments on commit bb157c6

Please sign in to comment.