8000 GitHub - hkmshb/ckanext-ehaportal
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hkmshb/ckanext-ehaportal

Repository files navigation

Tests

ckanext-ehaportal

A CKAN extension with customisations for the eHealth Africa Data Portal.

Installation

To install the extension

  1. Activate your CKAN virtualenv, for example

    . ${CKAN_VENV}/bin/activate

  2. Install ckanext-ehaportal in edit mode

    pip install -e .

  3. Install dependencies

    # install direct requirements
    pip install -r ./requirements.txt
    
    # install dev requirements
    pip install -r ./requirements-dev.txt
  4. Add ehaportal to the ckan.plugins setting in your CKAN config file

Config settings

None at present.

Development Setup

Pre-requisites

Optional:

Setup dev environment

  1. Install all pre-requisites listed above you if don't already have them installed

  2. Install CKAN and all dependent extension from source into a Nix shell from the project root directory as follows:

    # setu p dev env using nix 
    nix-shell

    Running nix-shell starts up an isolated Nix shell and does the following:

    • Creates a virtualenv named .venv in the project root directory
    • Installs CKAN in 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.
  3. 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.

    Docker-based setup

    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-ehaportal from GitHub into a .var/docker folder inside the project root direct as thus:

      task init-services

      This also creates a copy of ./.var/docker/env.sample into the root project directy named .env. This can also be achieved by running:

      task env-file

    • Go through .env file 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

  4. 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

Tests

...

License

Apache-2.0

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0