devpi-standalone

Example:

# Install the devpi service, incl. Nginx reverse proxy and https certificate.
- devpi-standalone:
    host: dev.frkl.io
    email: hello@frkl.io
    use_https: true
    user: devpi

Description

This frecklet installs a complete nginx-proxied devpi server.

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.

email

string --

The email address to use with letsencrypt.

hostname

string localhost

The hostname of the server.

letsencrypt_staging

boolean False

"Whether to use the letsencrypt staging server.

This is useful for developing -- the letsencrypt production server only allows a few requests per day. This option is disabled in the cli, as it is not used very often. Just use an overlay dict to enable this.

use_https

boolean --

Request a lets-encrypt certificate and serve devpi via https (needs email-address).

user

string devpi

The user to run devpi as well as nginx.

Examples

Example 1

Install the devpi service, incl. Nginx reverse proxy and https certificate.

Code
- devpi-standalone:
    host: dev.frkl.io
    email: hello@frkl.io
    use_https: true
    user: devpi

Example 2

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

Code
- devpi-standalone:
    host: dev.frkl.io
    email: hello@frkl.io
    use_https: true
    user: devpi
    backup_archive_file: ~/backups/devpi_backup.tar.gz

Command-line

frecklecute devpi-standalone --help

Usage: frecklecute devpi-standalone [OPTIONS]

  This frecklet installs a complete nginx-proxied devpi server.

  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.
  --email EMAIL                   The email address to use with letsencrypt.
  --hostname HOSTNAME             The hostname of the server.
  --letsencrypt-staging / --no-letsencrypt-staging
                                  Whether to use the letsencrypt staging
                                  server.
  --use-https / --no-use-https    Request a lets-encrypt certificate and serve
                                  devpi via https (needs email-address).
  --user USER                     The user to run devpi as well as nginx.
  --help                          Show this message and exit.