Ansible role to deploy PyCSW for the Data.gov platform. PyCSW is made up of two
endpoints, /csw and /csw-all. The difference is that /csw applies a filter
to queries, only returning first-order datasets (non-collection members).
/csw-all does not apply a filter and includes all datasets, including
collection members.
Include these roles in your requirements.yml.
Use the role in your playbook:
---
- name: install pycsw
hosts: pycsw-web
pre_tasks:
- name: set pycsw_deploy_version
set_fact:
pycsw_deploy_version: "{{ '%Y%m%d%H%M%SZ' | strftime(ansible_date_time.epoch) }}"
roles:
- role: gsa.datagov-deploy-pycsw
vars:
pycsw_db_password: secret-db-password
pycsw_db_host: localhostThis is an incomplete list of supported variables. See defaults/main.yml for
more.
This is just a timestamp so each deploy can be installed to a unique folder. To
avoid different versions set in the case of using serial, it's best to set
this explicitly in your playbook. pycsw_deploy_version is passed directly to
ansistrano_release_version.
The username for the database.
The password for the database.
The username for the database.
The name of the database to use.
One of web or worker, used to determine which configuration to install.
web role runs the web services, worker is configured with cron and bulk
loading jobs.
The base directory where the application will be installed.
The GitHub repo to pull the application source from.
This roles installs pycsw at two endpoints, /csw and /csw-all.
pycsw_base_url is used as a prefix to these URLs.
The version to fetch from pycsw_app_repo during application install.
List of OS packages required by the application.
The URL to use for the catalog service. This is the CKAN instance that will be scanned for the bulk load job.
The number of previous releases to keep around. This is passed to
ansistrano_keep_releases.
The version of python to install.
The contact email address to include in the public PyCSW metadata.
Pipenv creates a virtualenv for you and installs the python dependencies.
$ pipenv install --dev
Then you can run commands with pipenv.
$ pipenv run molecule converge
Or, you can activate the virtualenv in your shell so you don't have to run pipenv all the time.
$ pipenv shell
Run the tests with molecule.
$ pipenv run molecule test --all
If you're new to molecule, see our wiki for a quick primer.
See CONTRIBUTING for additional information.
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.