Port of OpenDataPhilly to CKAN
- Make sure you have the development dependencies installed
- Clone the ckanext-odp_theme and ckanext-datajson repositories to this directory's parent directory
- Copy
deployment/ansible/group_vars/vagrant.example
tovagrant
and edit with your disqus shortname and e-mail credentials. If e-mail credentials are left unconfigured, e-mails will not be sent out. - Run
vagrant up
; once the Ansible provisioner finishes, CKAN will be available at http://localhost:8025 - Creating a sysadmin user:
vagrant ssh
. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckan
paster sysadmin add <USERNAME> -c /etc/ckan/default/production.ini
- Launch a server running Ubuntu 14.04. This server should be accessible from the deployment computer over SSH, and should have HTTP and HTTPS access to the internet.
- Copy
deployment/ansible/hosts/hosts.staging.example
tohosts.staging
and enter the address of the server that was just launched. - Copy
deployment/ansible/group_vars/staging.example
tostaging
and edit any settings you wish to change (see above). Make sure thatckan_site_url
matches the address at which you will access the site. - Run
ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook --private-key=/absolute/path/to/server/key/file.pem --user=ubuntu --inventory-file=deployment/ansible/hosts/hosts.staging deployment/ansible/staging.yml -v
cd /usr/lib/ckan/default/src/ckan
/usr/lib/ckan/default/bin/paster db dump --config=/etc/ckan/default/production.ini /root/database.sql
Then move /root/database.sql
to the destination host
service apache2 stop
cd /usr/lib/ckan/default/src/ckan
/usr/lib/ckan/default/bin/paster db clean --config=/etc/ckan/default/production.ini
psql -U ckan_default -h 127.0.0.1 -W -d ckan_default -f /root/database.sql
service apache2 start
/usr/lib/ckan/default/bin/paster search-index rebuild --config=/etc/ckan/default/production.ini