Installing Klarity locally
Klarity is constituted of multiple applications, this could mean that installing Klarity involves installing all of these applications. In fact, installing Klarity only refers to installing Klarity Dashboard, either locally or in the cloud. Since we are just getting started, we will focus on installing Klarity locally on your machine.
Klarity Dashboard Local Installation
Prerequisites
- Docker 24+ (build and run images)
- Docker-compose 2.23+ (launch applications and services) or Podman-compose 1.22+
Get the repository
Clone on your computer the klarity-dashboard git repository using the main branch. Create a .env file and complete it as it follows :
GITLAB_NPM_PROJECT_ID=YYY
GITLAB_NPM_AUTH_TOKEN=xxx
KD_BACK_GITLAB_PROJECT_ID=ZZZ
KD_BACK_GITLAB_ACCESS_TOKEN=xxxGITLAB_NPM_PROJECT_ID: Default GitLab repository on which the klarity front and back are hosted (this one).GITLAB_NPM_AUTH_TOKEN: GitLab Access Token (project or personal)KD_BACK_GITLAB_PROJECT_ID: Identifier of the gitlab project on which the request fropm KD are pushed (this one).KD_BACK_GITLAB_ACCESS_TOKEN: GitLab Access Token (project or perosnal)
Start
- Using Docker
docker-compose up -d- Using Podman
#if you are on windows you might need to start the Podman machine:
podman machine startIf you are on linux, it might be required to indicate the relevant registries for nginx, postgres or minio container. You can do this in the registries.conf :
sudo vim /etc/containers/registries.confand add the following :
unqualified-search-registries = ["docker.io"]Now you can execute the compose file :
# first time always use
podman compose --file docker-compose.yml up --build
# then
podman compose --file docker-compose.yml up --buildThe backend becomes accessible via Swagger UI from http://localhost:8080/swagger/ (useful for simulating Klarity Craft) and the frontend is accessible from http://localhost:5173.
Note: If the code has changed, remember to specify images rebuild: --build, for either Docker or Podman
Stop
- Using Docker
docker-compose stop- Using Podman
podman-compose stopDestroy (reset database)
- Using Docker
docker-compose down -v- Using Podman
podman-compose down -vLogin
Front-end
- Go to frontend application and login : http://localhost:5173 (email : admin@klarity.test, password : nltQguf2mFgR4Xx4LLpc5QfSEOV8wqDi)
Back-end
Go to Swagger UI : http://localhost:8080/swagger
Generate a token
POST /auth
{
"email": "admin@klarity.test",
"password": "nltQguf2mFgR4Xx4LLpc5QfSEOV8wqDi"
}- Copy token returned in response and paste it into Authorize (top right button)
Response body
{
"status": 200,
"data": {
"token": "THIS TOKEN",
"user": { [...] }
}
}Now you can either initiate your first project or read about the lifecycle !