devpi-service

Example:

# Install the devpi service using the devpi system user (which will be created if necessary).
- devpi-service:
    listen_address: dev.frkl.io
    user: devpi
    admin_password: secret password

Description

This frecklet installs devpi, adds a systed unit file. and runs devpi as a service.

If a backup_archive_file is provided, it will be uploaded to the server, unarchived, and the backed-up state will be imported before the server will be started for the first time. Check the frecklet::devpi-create-backup frecklet for details about creating such a backup archive file. The import will take a minute or two, as it also (re-)creates the pypi mirror index.

If the use_https variable is set, a certificate from LetsEncrypt will be requrested and installed, along with a cron job to automatically renew it before it expires. Nginx will be configured to redirect all http traffic to https.

Resources

Variables

Name Type Default Description

admin_password

string --

If a password is already set, this will fail and the error will be ignored.

backup_archive_file

string --

If this is not provided, a normal, 'empty' devpi instance will be created.

listen_address

string localhost

The listen address of the devpi server.

user

string devpi

The user to run devpi as well as nginx.

Examples

Example 1

Install the devpi service using the devpi system user (which will be created if necessary).

Code
- devpi-service:
    listen_address: dev.frkl.io
    user: devpi
    admin_password: secret password

Example 2

Re-create a devpi service instance from a backup, incl. Nginx reverse proxy and https certificate.

Code
- devpi-service:
    listen_address: dev.frkl.io
    user: devpi
    backup_archive_file: ~/backups/devpi_backup.tar.gz

Command-line

frecklecute devpi-service --help

Usage: frecklecute devpi-service [OPTIONS]

  This frecklet installs devpi, adds a systed unit file. and runs devpi as a
  service.

  If a ``backup_archive_file`` is provided, it will be uploaded to the
  server, unarchived, and the backed-up state will be imported before the
  server will be started for the first time. Check the frecklet::devpi-
  create-backup *frecklet* for details about creating such a backup archive
  file. The import will take a minute or two, as it also (re-)creates the
  pypi mirror index.

  If the ``use_https`` variable is set, a certificate from LetsEncrypt will
  be requrested and installed, along with a cron job to automatically renew
  it before it expires. Nginx will be configured to redirect all http
  traffic to https.

Options:
  --admin-password ADMIN_PASSWORD
                                  The initial admin password.
  --backup-archive-file BACKUP_ARCHIVE_FILE
                                  A file to restore the service from.
  --listen-address LISTEN_ADDRESS
                                  The listen address of the devpi server.
  --user USER                     The user to run devpi as well as nginx.
  --help                          Show this message and exit.