Skip to content

Installation from source

Prerequisites

  • Linux OS: Ubuntu or CentOS. If you use Windows, you should install Linux either via Virtualbox or Windows Subsystem for Linux.
  • git
  • redis and hiredis library
  • virtualenv
  • C compiler and development libraries needed to build dependencies
  • CentOS: gcc libffi-devel openssl-devel postgresql-devel libjpeg-devel zlib-devel python-devel xmlsec1 xz-devel
  • Ubuntu: sudo apt install git python3-pip python3-venv python3-dev gcc libffi-dev libsasl2-dev libssl-dev libpq-dev libjpeg8-dev zlib1g-dev xmlsec1 libldap2-dev liblzma-dev libxslt1-dev libxml2-dev libbz2-dev libreadline-dev libsqlite3-dev
  • OS X: brew install openssl; export CFLAGS="-I$(brew --prefix openssl)/include $CFLAGS"; export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS"

Waldur MasterMind installation

Install poetry

1
curl -sSL https://install.python-poetry.org | python3 -

Install pyenv

1
2
3
4
curl https://pyenv.run | bash
pyenv install 3.11.9
pyenv global 3.11.9
poetry env use 3.11.9

Get the code

1
2
git clone https://github.com/waldur/waldur-mastermind.git
cd waldur-mastermind

Install Waldur in development mode along with dependencies

1
2
poetry install
poetry run pre-commit install

NB: If you use a machine with Apple M1 CPU, run this before:

1
2
3
4
export optflags="-Wno-error=implicit-function-declaration"
export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"

Create and edit settings file (see 'Configuration' section for details)

1
2
cp src/waldur_core/server/settings.py.example src/waldur_core/server/settings.py
vi src/waldur_core/server/settings.py

Initialise PostgreSQL database

1
2
3
sudo -u postgres -i
createdb waldur
createuser waldur

Add a password waldur for this user

1
2
3
psql
ALTER USER waldur PASSWORD 'waldur';
ALTER DATABASE waldur OWNER TO waldur;

Then run poetry

1
poetry run waldur migrate --noinput

Collect static data -- static files will be copied to ./static/ in the same directory

1
poetry run waldur collectstatic --noinput
  • Start Waldur:
1
poetry run waldur runserver

Configuration

Instructions are here: https://docs.waldur.com/admin-guide/mastermind-configuration/general/