Skip to content

Installation using Ansible


Important: this deployment works for Singularity Registry Server v1.1.23 and earlier, before Minio was added

It is possible to automate the deployment of your Singularity Registry by using Ansible. There is an Ansible role that can be used for deploying your own Singularity Registry Server and installing sregistry-cli. This role is available here. The complete documentation can be found here.

For example, if you want to install sregistry with GitHub and PAM authentication, and also the client sregistry-cli, you can create the following ansible playbook:

- become: true
  hosts: localhost
    # Variables to configure GITHUB authorization
    - { option: 'SOCIAL_AUTH_GITHUB_KEY', value: "XXXXXXXXXX" }
    - { option: 'SOCIAL_AUTH_GITHUB_SECRET', value: "XXXXXXXXXX" }

      - { option: 'ENABLE_GITHUB_AUTH', value: True }
      - { option: 'HELP_CONTACT_EMAIL', value: '' }
      - { option: 'HELP_INSTITUTION_SITE', value: ''}
      - { option: 'REGISTRY_NAME', value: 'My Singularity Registry' }
      - { option: 'REGISTRY_URI', value: 'mysreg' }

    # Use PAM authorization
      - pam_auth

    # sregistry-cli in Docker
    sregistry_cli_use_docker: true

    - { role: grycap.singularity_registry }

Once you have completed all the configuration of the role in your recipe, it is time to run the playbook (in this example, it is stored in sregistry.yml). It should be pointed out that root privileges are required to install it:

sudo ansible-playbook sregistry.yml

Want to learn more? Check out the official documentation for the entire story.