Skip to content

Deploying a Hosted Site

seanh edited this page Apr 5, 2013 · 15 revisions

This is a draft page documenting our process for deploying a hosted CKAN site, should become a step-by-step doc for everything for a standard hosted CKAN deployment, including setting up the servers, installing extensions, and doing basic customisations.

Create a CKAN extension for the site

Each site has a ckanext-SITE extension (where SITE is the ID of the site) in the OKFN organization on GitHub.

  • Create an extension using CKAN's paster create command:

      $ paster create -t ckanext ckanext-edo
      Selected and implied templates:
        ckan#ckanext  CKAN extension project template
      
      Variables:
        egg:      ckanext_edo
        package:  ckanextedo
        project:  ckanext-edo
      Enter version (Version (like 0.1)) ['']: 
      Enter description (One-line description of the package) ['']: 
      Enter author (Author name) ['']: 
      Enter author_email (Author email) ['']: 
      Enter url (URL of homepage) ['']: 
      Enter license_name (License name) ['']: 
      Creating template ckanext
      Creating directory ./ckanext-edo
        Recursing into ckanext
          Creating ./ckanext-edo/ckanext/
          Recursing into +project+
            Creating ./ckanext-edo/ckanext/edo/
            Copying __init__.py to ./ckanext-edo/ckanext/edo/__init__.py
          Copying __init__.py to ./ckanext-edo/ckanext/__init__.py
        Recursing into ckanext_+project+.egg-info
          Creating ./ckanext-edo/ckanext_edo.egg-info/
        Copying setup.py_tmpl to ./ckanext-edo/setup.py
      Running /home/seanh/.virtualenvs/ckan/bin/python setup.py egg_info
      $ _ 
    

    See CKAN's writing extensions docs.

  • cd into the extension's root dir (eg. ckanext-edo) and initialise a git repo in this dir:

      $ cd /path/to/ckanext-edo
      $ git init
    

    Use a .gitignore file in the extension's root dir to avoid committing certain unwanted files:

      *.pyc
      *~
      *.swp
      *.swo
      .DS_Store
      ckanext_edo.egg-info/*
    

    Now commit the gitignore file and all unignored files:

      $ git add .
      $ git commit -m "Initial commit"
    
  • Create a new public repo named ckaneext-edo in the OKFN organization on GitHub, and follow the instructions on GitHub to push the ckanext-edo repo on your machine to the new github repo.

Clone this wiki locally