[ckan-dev] Migrate CKAN instance to docker
Denis Zgonjanin
deniszgonjanin at gmail.com
Thu Oct 8 18:38:34 UTC 2015
datacats is really just a very fancy wrapper around CKAN and Docker that we
made to "dockerize" the many CKAN instances we work on for various
governments. Here's a short how-to on how I go about migrating an instance
to docker.
Assuming you have docker installed already, activate your existing
virtualenv (or create a new one), then run:
pip install datacats
datacats pull
datacats create myckan
Then after that's done, clone whatever CKAN extensions you want into the
myckan directory and install them. For example:
cd myckan
git clone https://github.com/ckan/ckanext-pages.git
datacats install
That will give you a dockerized environment that runs CKAN in 4 different
docker containers, all connected to each other. There's a container for the
web process, a postgres container, a solr container, and a datapusher
container. All your source code inside the 'myckan' directory is mounted
inside the web process container under /project/
To migrate your database, create a dump of your old environment as usual
with `paster db dump` (or manually using pg_dump, whatever you prefer).
Then nuke the dockerized ckan's db and load the new one:
cd myckan
cp /backups/myoldckan.dump.sql .
datacats stop
datacats paster db clean
datacats paster db load /project/myoldckan.dump.sql
That should put you well on your way to having a dockerized CKAN. By
default the web process will run with paster. If you want it to run with
apache in production, you can run:
datacats reload --production
Hope that helps. If you get a chance to try it, let me know how it goes.
There are still some rough edges, especially as Docker is still evolving
very quickly.
A more detailed guide is here: http://docs.datacats.com/guide.html
On Wed, Oct 7, 2015 at 8:00 AM, Teg-wende Idriss TINTO <
tinto.jean at titinto.net> wrote:
> Hi all,
>
> Hope you're well :)
>
> I have a ckan instance running in development environment, with a
> customized theme and datasets, and I want to migrate it to docker. What
> is the process to do it?
>
> Best
> --
> <http://www.titinto.net> <http://www.doyoubuzz.com/t-idriss-tinto>
> <https://www.linkedin.com/pub/idriss-tinto/31/b4a/464>
> <https://reps.mozilla.org/u/titinto> <http://www.bf.okfn.org>
> <http://www.isoc-burkina.org>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20151008/3a181188/attachment-0003.html>
More information about the ckan-dev
mailing list