From ed2f0a2d5e4aabd7502e1cd7f3150ff1bc0f90a9 Mon Sep 17 00:00:00 2001 From: Tana M Berry Date: Wed, 17 May 2023 15:44:47 -0500 Subject: [PATCH] website/docs: edits to full dev env (#5636) * edits to install full dev env * remove json files * Update website/developer-docs/setup/full-dev-environment.md Signed-off-by: Tana M Berry * Update website/developer-docs/setup/full-dev-environment.md Signed-off-by: Tana M Berry * Update website/developer-docs/setup/full-dev-environment.md Co-authored-by: Jens L. Signed-off-by: Tana M Berry * Update website/developer-docs/setup/full-dev-environment.md Signed-off-by: Tana M Berry * Update website/developer-docs/setup/full-dev-environment.md Signed-off-by: Tana M Berry * few tweaks per review --------- Signed-off-by: Tana M Berry Co-authored-by: Tana Berry Co-authored-by: Jens L. --- .../setup/frontend-dev-environment.md | 6 ++--- .../setup/full-dev-environment.md | 23 ++++++++++++++----- .../setup/website-dev-environment.md | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/website/developer-docs/setup/frontend-dev-environment.md b/website/developer-docs/setup/frontend-dev-environment.md index 3cbed2e880..30a26765ec 100644 --- a/website/developer-docs/setup/frontend-dev-environment.md +++ b/website/developer-docs/setup/frontend-dev-environment.md @@ -6,12 +6,12 @@ If you want to only make changes on the UI, you don't need a backend running fro ### Prerequisites -- Node (any recent version should work, we use 20.x to build) +- Node.js (any recent version should work; we use 20.x to build) - Make (again, any recent version should work) -- Docker and docker-compose +- Docker and Docker Compose :::info -Depending on platform, some native dependencies might be required. On macOS, run `brew install node@20`, and for docker `brew install --cask docker` +Depending on platform, some native dependencies might be required. On macOS, run `brew install node@20`, and for Docker `brew install --cask docker` ::: ### Instructions diff --git a/website/developer-docs/setup/full-dev-environment.md b/website/developer-docs/setup/full-dev-environment.md index e1dcc6810e..fed638df4a 100644 --- a/website/developer-docs/setup/full-dev-environment.md +++ b/website/developer-docs/setup/full-dev-environment.md @@ -5,17 +5,21 @@ title: Full development environment ## Requirements - Python 3.11 -- poetry, which is used to manage dependencies, and can be installed with `pip install poetry` +- Poetry, which is used to manage dependencies - Go 1.20 -- Node 20 +- Node.js 20 - PostgreSQL (any recent version will do) - Redis (any recent version will do) ## Services Setup -For PostgreSQL and Redis, you can use the docker-compose file in `scripts/`. +For PostgreSQL and Redis, you can use the `docker-compose.yml` file in `/scripts`.To use these pre-configured database instances, navigate to the `/scripts` directory in your local copy of the authentik git repo, and run `docker compose up -d`. You can also use a native install, if you prefer. +:::info +If you use locally installed databases, the PostgreSQL credentials given to authentik should have permissions for `CREATE DATABASE` and `DROP DATABASE`, because authentik creates a temporary database for tests. +::: + ## Backend Setup :::info @@ -23,12 +27,14 @@ Depending on your platform, some native dependencies might be required. On macOS ::: :::info -As long as [this issue](https://github.com/xmlsec/python-xmlsec/issues/252) is open, a workaround is required to install a compatible version of `libxmlsec1` with brew, see [this comment](https://github.com/xmlsec/python-xmlsec/issues/254#issuecomment-1511135314). +As long as [this issue](https://github.com/xmlsec/python-xmlsec/issues/252) about `libxmlsec-1.3.0` is open, a workaround is required to install a compatible version of `libxmlsec1` with brew, see [this comment](https://github.com/xmlsec/python-xmlsec/issues/254#issuecomment-1511135314). ::: +First, you need to create an isolated Python environment. To create the environment and install dependencies, run the following commands in the same directory as your authentik git repository: + ```shell poetry shell # Creates a python virtualenv, and activates it in a new shell -poetry install # Install all required dependencies, including development dependencies +make install # Install all required dependencies for Python and Javascript, including development dependencies ``` To configure authentik to use the local databases, we need a local config file. This file can be generated by running `make gen-dev-config`. @@ -54,6 +60,11 @@ This will immediately update the UI with any changes you make so you can see the To format the frontend code, run `make web`. -## Running +## Running authentik Now that the backend and frontend have been setup and built, you can start authentik by running `ak server`. authentik should now be accessible at `http://localhost:9000`. + +:::info +To define a password for the default admin (called **akadmin**), you can manually enter the `/if/flow/initial-setup/` path in the browser address bar to launch the initial flow. +Example: http://localhost:9000/if/flow/initial-setup/ +::: diff --git a/website/developer-docs/setup/website-dev-environment.md b/website/developer-docs/setup/website-dev-environment.md index adffe814f1..58387024d8 100644 --- a/website/developer-docs/setup/website-dev-environment.md +++ b/website/developer-docs/setup/website-dev-environment.md @@ -6,7 +6,7 @@ If you want to only make changes to the website, you only need node. ### Prerequisites -- Node (any recent version should work, we use 20.x to build) +- Node.js (any recent version should work; we use 20.x to build) - Make (again, any recent version should work) :::info