hifis.rsd

<!-- 
SPDX-FileCopyrightText: 2022 Helmholtz Centre for Environmental Research (UFZ) 
SPDX-FileCopyrightText: 2022 Helmholtz-Zentrum Dresden-Rossendorf (HZDR) 
SPDX-FileCopyrightText: 2022 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences 

SPDX-License-Identifier: Apache-2.0 
-->

# Ansible Role: Research Software Directory (RSD-as-a-service)

[![CI status](https://github.com/hifis-net/ansible-role-rsd/actions/workflows/ci.yml/badge.svg)](https://github.com/hifis-net/ansible-role-rsd/actions/workflows/ci.yml) 
[![Ansible Role: hifis.unattended_upgrades](https://img.shields.io/ansible/role/58679)](https://galaxy.ansible.com/hifis/rsd) 
[![Ansible Quality Score](https://img.shields.io/ansible/quality/58679)](https://galaxy.ansible.com/hifis/rsd) 
[![Ansible Role Downloads](https://img.shields.io/ansible/role/d/58679)](https://galaxy.ansible.com/hifis/rsd) 
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7008976.svg)](https://doi.org/10.5281/zenodo.7008976)

This Ansible role helps you set up the [Research Software Directory](https://github.com/research-software-directory/RSD-as-a-service).

Currently, it supports:
* Ubuntu 20.04 LTS
* Ubuntu 22.04 LTS

## Requirements

You need the following:
* [`docker`](https://pypi.org/project/docker/) (Docker SDK for Python)
* [`docker-compose`](https://pypi.org/project/docker-compose/)

## Role Variables

- `rsd_dependencies`
  - Default: `["docker", "docker-compose"]`
  - Description: List of necessary Python modules.

- `rsd_working_directory`
  - Default: `"/opt/rsd"`
  - Description: Path where the RSD repository will be stored.

- `rsd_version`
  - Default: `"latest"`
  - Description: The version of the RSD-as-a-service container images to use. If `latest` is chosen, the application pulls the latest images each time.

- `rsd_container_registry_path`
  - Default: `"ghcr.io/hifis-net/rsd-saas"`
  - Description: Registry path to pull the images from.

- `rsd_environment_file`
  - Default: `"rsd-secrets.env"`
  - Description: Environment file specific to your setup.

- `rsd_docker_compose_cmd`
  - Default: `"docker-compose"`
  - Description: Command used for Docker Compose to check the docker-compose.yml file.

- `rsd_docker_compose_template_file`
  - Default: `"docker-compose.yml.j2"`
  - Description: Template for the docker-compose.yml file.

- `rsd_nginx_config_template`
  - Default: `"nginx.conf.j2"`
  - Description: Template for Nginx configuration.

- `rsd_tls_cert_path`
  - Default: `"/etc/ssl/certs/rsd.pem"`
  - Description: Path for the TLS certificate file.

- `rsd_tls_key_path`
  - Default: `"/etc/ssl/private/rsd.key"`
  - Description: Path for the TLS key file.

- `rsd_nginx_dhparam_file_path`
  - Default: `"/etc/ssl/private/dhparam.pem"`
  - Description: Path for DH parameters file.

- `rsd_swagger_enabled`
  - Default: `false`
  - Description: Enable or disable Swagger.

- `rsd_swagger_version`
  - Default: `v4.15.0`
  - Description: Version of the Docker image `swaggerapi/swagger-ui`.

- `rsd_prune_volumes`
  - Default: `false`
  - Description: Set to `true` to remove Docker data volumes (this will force recreation of containers).

- `rsd_migrate_spotlights`
  - Default: `false`
  - Description: Set to `true` to migrate software spotlights from hifis.net into the RSD (for Helmholtz theme only).

- `rsd_spotlight_migration_image`
  - Default: `"ghcr.io/hifis-net/rsd-spotlight-migration:v1.0.0"`
  - Description: Image for software spotlight migration.

### RSD Environment Variables
- `rsd_compose_project_name`
  - Default: `"rsd"`
  - Description: Name for the Compose project (useful if running multiple RSD versions).

- `rsd_domain`
  - Default: `"localhost"`
  - Description: Domain under which RSD should be available.

- `rsd_auth_providers`
  - Default: `"SURFCONEXT;HELMHOLTZAAI"`
  - Description: Supported OpenID authentication providers (semicolon-separated).

- `rsd_admin_email_list`
  - Default: `None`
  - Description: List of email addresses for RSD admins (case-sensitive).

- `rsd_auth_user_mail_whitelist`
  - Default: `None`
  - Description: List of email addresses allowed to log in to RSD (semicolon-separated).

- `rsd_hgfaai_client_id`
  - Default: `"rsd-dev"`
  - Description: Public client ID for Helmholtz AAI.

- `rsd_hgfaai_client_secret`
  - Default: `"changeme"`
  - Description: Client secret for Helmholtz AAI.

- `rsd_hgfaai_well_known_url`
  - Default: `"https://login-dev.helmholtz.de/oauth2/.well-known/openid-configuration"`
  - Description: Well known URL for Helmholtz AAI.

- `rsd_hgfaai_allow_external_users`
  - Default: `false`
  - Description: Set to `true` to allow users from other centers or social IdPs.

- `rsd_postgres_db_host`
  - Default: `"database"`
  - Description: Postgres database host name.

- `rsd_postgres_db_host_port`
  - Default: `"5432"`
  - Description: Postgres database host port.

- `rsd_postgres_db`
  - Default: `"rsd-db"`
  - Description: Name of the Postgres database.

- `rsd_postgres_user`
  - Default: `"rsd"`
  - Description: Postgres username.

- `rsd_postgres_password`
  - Default: `"changeme"`
  - Description: Postgres password.

- `rsd_postgres_authenticator_password`
  - Default: `"ChangeMe"`
  - Description: Password for Postgres authenticator (**should be different from `rsd_postgres_password`**).

- `rsd_max_requests_github`
  - Default: `"6"`
  - Description: Max GitHub API requests per run.

- `rsd_max_requests_gitlab`
  - Default: `"6"`
  - Description: Max GitLab API requests per run.

- `rsd_max_requests_doi`
  - Default: `"6"`
  - Description: Max mentions to scrape per run.

- `rsd_oaipmh_scraper_enabled`
  - Default: `false`
  - Description: Set to `true` to enable the OAI-PMH scraper.

- `rsd_surfconext_client_secret`
  - Default: `"changeme"`
  - Description: SurfConext client secret.

- `rsd_gh_access_token`
  - Default: `"changeme"`
  - Description: GitHub personal access token.

- `rsd_jwt_secret`
  - Default: `"changemeChangemeChangemeChangeme"`
  - Description: JSON Web Token secret (at least 32 characters needed).

- `rsd_zenodo_access_token`
  - Default: `"changeme"`
  - Description: Zenodo access token.

- `rsd_crossref_contact_email`
  - Default: `""`
  - Description: Contact email for Crossref compliance.

- `rsd_matomo_url`
  - Default: `""`
  - Description: Tracking URL (should end with a slash).

- `rsd_matomo_id`
  - Default: `""`
  - Description: Matomo ID for tracking URL.

## Dependencies

This Research Software Directory requires `docker` and `docker-compose` to work. The role is compatible with these Ansible roles:
* Docker - [geerlingguy.docker](https://galaxy.ansible.com/geerlingguy/docker)
* Pip - [geerlingguy.pip](https://galaxy.ansible.com/geerlingguy/pip)

## Example Playbook

```yaml
- hosts: servers
  roles:
    - { role: hifis.rsd }

License

Apache-2.0

Author Information

This role was created by HIFIS Software Services.

Contributors

Thanks to the following contributors for their help with this project:

```

Informazioni sul progetto

Set up the Research Software Directory (RSD-as-a-service)

Installa
ansible-galaxy install hifis.rsd
Licenza
other
Download
909
Proprietario
Helmholtz Digital Services for Science — Collaboration made easy.