A CKAN extension with customisations for the eHealth Africa Data Portal.
To install the extension
-
Activate your CKAN virtualenv, for example
. ${CKAN_VENV}/bin/activate -
Install
ckanext-ehaportalin edit modepip install -e . -
Install dependencies
# install direct requirements pip install -r ./requirements.txt # install dev requirements pip install -r ./requirements-dev.txt
-
Add
ehaportalto theckan.pluginssetting in your CKAN config file
None at present.
Optional:
-
Install all pre-requisites listed above you if don't already have them installed
-
Install CKAN and all dependent extension from source into a
Nixshell from the project root directory as follows:# setu p dev env using nix nix-shellRunning
nix-shellstarts up an isolatedNixshell and does the following:- Creates a virtualenv named
.venvin the project root directory - Installs
CKANin edit mode into the virtualenv. Source becomes available in.venv/src/ckan - Installs the following extensions required to run the eHealth Data Portal into the virtualenv
- ckanext-envvars
- ckanext-odata
- ckanext-s3filestore
- ckanext-googleanalytics
- ckanext-geoview
- ckanext-spatial
- ckanext-harvest
- ckanext-geonetwork
- Installs
ckanext-ehaportal(this extension) in edit mode.
- Creates a virtualenv named
-
Run third-party services
CKAN depends on a number of third-party services like the Datapusher, PostgreSQL database, Apache Solr, and Redis. These can be installed locally so that they're available system wide or spun up using Docker without having to install any of the listed services directly on the system.
See the official CKAN documentation here if you want to install the services locally. The instructions that follow outline steps for running the services using Docker.
Note: Do not perform any of the following using the nix-shell
-
Open a new bash shell
-
Obtain the necessary Docker configurations by cloning
docker-ehaportalfrom GitHub into a .var/docker folder inside the project root direct as thus:task init-servicesThis also creates a copy of
./.var/docker/env.sampleinto the root project directy named.env. This can also be achieved by running:task env-file -
Go through
.envfile and perform necessary updates like assigning values to the keys under the S3 Filestore section. -
Build Docker images for required services with
task build-services -
Run Docker containers from built images with
task run-services
-
-
Run CKAN
Return to the previous nix-shell and run the following commands:
# creates the CKAN configuration file (ckan.ini) (nix-shell) task ini-file # run CKAN (nix-shell) task run
...
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.