If you use VS Code or GitHub Codespaces, you can quickly set up a development environment using Dev Containers. This method provides a consistent, pre-configured environment with all necessary dependencies.
Prerequisites for Dev Containers are:
- VS Code with the Dev Containers extension installed
- Docker Desktop (for local development)
- Git
After cloning repository, when prompted "Reopen in Container", click on it. Alternatively, you can press Ctrl+Shift+P, type "Dev Containers: Reopen in Container" and press Enter.
VS Code will build the dev container and set up the environment automatically. This process includes:
- Installing all system dependencies
- Setting up Python with the correct version
- Installing VS Code extensions
- Installing uv and project dependencies
- Installing PostgreSQL
- Configuring git hooks
Once the container is built and running, you'll have a fully configured development environment ready to use.
- Linux OS. If you use Windows, you should install Linux either via Virtualbox or Windows Subsystem for Linux.
gitvirtualenvCcompiler and development libraries needed to build dependencies
-
Debian or 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"
curl -LsSf https://astral.sh/uv/install.sh | shcurl https://pyenv.run | bash
pyenv install 3.13.13
pyenv global 3.13.13git clone https://github.com/waldur/waldur-mastermind.git
cd waldur-masterminduv sync --dev
uv tool install prekNB: If you use a machine with Apple M1 CPU, run this before:
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
cp src/waldur_core/server/settings.py.example src/waldur_core/server/settings.py
vi src/waldur_core/server/settings.pyInitialize PostgreSQL database:
sudo -u postgres -i
createdb waldur
createuser waldurAdd a password waldur for this user:
psql
ALTER USER waldur PASSWORD 'waldur';
ALTER DATABASE waldur OWNER TO waldur;Run migrations:
uv run waldur migrate --noinputCollect static files:
uv run waldur collectstatic --noinputStart Waldur:
uv run waldur runserverFor detailed configuration instructions, visit https://docs.waldur.com/latest/admin-guide/mastermind-configuration/general/