[ckan-dev] Migrate CKAN instance to docker

Teg-wende Idriss TINTO tinto.jean at titinto.net
Thu Jun 2 11:38:20 UTC 2016


Hi all,

I tried to use datacats, but I have some problem with the datacats pull
command.
Here is the returning error:

Please quote this traceback when reporting this error:
Traceback (most recent call last):
  File
"/home/user/datacats/local/lib/python2.7/site-packages/datacats/cli/main.py",
line 92, in main
    return command_fn(opts)
  File
"/home/user/datacats/local/lib/python2.7/site-packages/datacats/cli/pull.py",
line 46, in pull
    retrying_pull_image(i)
  File
"/home/user/datacats/local/lib/python2.7/site-packages/datacats/cli/pull.py",
line 52, in retrying_pull_image
    "Failed to pull image {}.".format(image_name))
  File
"/home/user/datacats/local/lib/python2.7/site-packages/datacats/cli/pull.py",
line 72, in _retry_func
    func(param)
  File
"/home/user/datacats/local/lib/python2.7/site-packages/datacats/cli/pull.py",
line 83, in pull_image
    for s in pull_stream(image_name):
  File
"/home/user/datacats/local/lib/python2.7/site-packages/datacats/docker.py",
line 386, in pull_stream
    return (json.loads(s) for s in _get_docker().pull(image, stream=True))
  File
"/home/user/datacats/local/lib/python2.7/site-packages/docker/api/image.py",
line 200, in pull
    self._raise_for_status(response)
  File
"/home/user/datacats/local/lib/python2.7/site-packages/docker/client.py",
line 154, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 500 Server Error: Internal Server Error ("Get
https://registry-1.docker.io/v2/datacats/web/tags/list: Get
https://auth.docker.io/token?scope=repository%3Adatacats%2Fweb%3Apull&service=registry.docker.io:
dial tcp: lookup auth.docker.io on 127.0.1.1:53: read udp
127.0.0.1:53111->127.0.1.1:53: i/o timeout")

Thank you

Le 08/10/2015 à 18:38, Denis Zgonjanin a écrit :
> 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 <mailto: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 <mailto:ckan-dev at lists.okfn.org>
>     https://lists.okfn.org/mailman/listinfo/ckan-dev
>     Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> 
> 
> 
> 
> _______________________________________________
> 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
> 

-- 
Teg-Wende Idriss TINTO <http://www.titinto.net>
Software Engineer <http://www.doyoubuzz.com/t-idriss-tinto>
Mozilla Rep <https://reps.mozilla.org/u/titinto>
OK Ambassador and OK Burkina Faso Lead <http:bf.okfn.org>
# - Mobile : (00226) 70102936
# - Email : tinto.jean at titinto.net
# - Twitter : @titinto_ <https:www.twitter.com/titinto_>
# - skype : tinto.jean
# - Telegram : titinto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x40A4F0FE.asc
Type: application/pgp-keys
Size: 4835 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160602/1faf1c8d/attachment-0002.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160602/1faf1c8d/attachment-0002.sig>


More information about the ckan-dev mailing list