ckanext-datagovuk
The CKAN extension for data.gov.uk
Features
- Configures Sentry automatically using a
SENTRY_DSN environment variable.
Running CKAN and Find locally
To run a development version of Find locally you will need to build the development image locally which will allow you to make modifications to the code directly on the docker container.
- On the datagovuk_find root directory run
make dev-build after making code updates and passing tests.
- Check that the image is available by running
docker images | grep dev.datagovuk_find.
- If you run bootstrap then you can skip this step otherwise run
make bootstrap to download the latest repositories.
- In the ckanext-datagovuk root directory run
make build to build the images needed for the docker stack.
- After the build is complete run
make run to start the docker compose stack.
- CKAN - Publishing app - http://localhost:5001
- Find - Public facing discovery app - http://localhost:4001
- Solr - Search index server - http://localhost:8983/solr
Development
Using the Makefile
- Run
make run to start up the docker compose stack
- Run
make test to just run the tests
Running the Tests
Run the tests inside the CKAN container on the docker compose stack:
python -m pytest --ckan-ini=test.ini ckanext/datagovuk/tests/
Creating test data
First set the environment variables:
- CKAN_INI - location of CKAN ini file
- CKAN_TEST_SYSADMIN_NAME and CKAN_TEST_SYSADMIN_PASSWORD
Then run the ckan command:
ckan datagovuk create-dgu-test-data
ckan datagovuk reindex-organisations
To remove the test data:
ckan datagovuk remove-dgu-test-data
Deploying CKAN
Environments and URLs
- Integration: https://ckan.integration.publishing.service.gov.uk
- Staging: https://ckan.staging.publishing.service.gov.uk
- Production: https://ckan.publishing.service.gov.uk/
License
AGPL-3.0