django app that implements the decision finding method: "systematic consensus finding"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Carsten Knoll e60aa19dda create deployment_requirements.txt 1 year ago
..
general wip: further refactoring deployment process 2 years ago
specific improve deployment 1 year ago
uberspace rename settings directory 2 years ago
README.md create deployment_requirements.txt 1 year ago
deploy.py improve deployment 1 year ago
deployment_requirements.txt create deployment_requirements.txt 1 year ago

README.md

Deployment Information

General

This directory contains a script and files to deploy moodpoll locally or at a fresh uberspace account.

We use deploymentutils (which is built on top of fabric (>=2.5). This decision seems to be a good compromise between raw bash scripts and a complex configuration management system like ansible – at least for python affine folks. Complete deployment should (at best) be a onliner.

How to deploy moodpoll locally:

  • Ensure you have this directory structure:
    [project_root]
    ├── [project_repo]/
    │   ├── .git/...
    │   ├── deployment_helpers/
    │   │   ├── README.md                  <- you read this file
    │   │   ├── deploy.py
    │   │   ├── general/...                <- general deployment files
    │   │   ├── uberspace/...              <- uberspace-specific deployment files
    │   │   └──  ...
    │   └── ...
    │
    ├── local_testing/                     <- will be auto-created by deploy.py
    └── ...
  • run python3 deploy.py local
    • If you plan to play arround with the source files you can symlink them instead of copy use: python3 deploy.py -l local. To get a full list of options (like omiting tests, omiting backup, ...) use python3 deploy.py -h.
  • go to [project_root]/local_deployment/ and run python3 manage.py runserver
  • note: if you want to deploy inside a virtual environment you have to manage that yourself

Background

The deployment directory is placed outside of [project_repo] to keep the repo directory clean. Thus it can still be used for development and for remote deployment. This structure also makes it easier to handle different secrets and fixtures for different usecases (local deployment, example content, testing, production).

How to deploy moodpoll on a remote server (uberspace):

Note: We describe deployment on uberspace because from what we know it provides the lowest hurdle to test (and run) moodpoll. Probably there are other equivalent or even better hosters out there.

Preparation

  • Create an uberspace-account (first month is free), then pay what you like.
  • Set up your ssh key in the webfrontend
  • Locally run pip install deployment_requirements.txt

Deployment

  • Adapt the config section of deploy.py and (optionally) have a look what happens in the remainder of that script.
  • Run eval $(ssh-agent); ssh-add -t 5m to unlock you private ssh-key in this terminal (The deplyment script itself does not ask for your ssh-key password).
  • Run python3 deploy.py remote.