Skip to content

Commit

Permalink
Merge pull request #1 from konstellation-io/doc/adding-prerequisites
Browse files Browse the repository at this point in the history
Including documentation for prerequirements
  • Loading branch information
christianint authored Dec 4, 2024
2 parents 3d5bbb9 + bdecdf5 commit e90c93d
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 29 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: "Linter"
# name: "Linter"

on:
pull_request:
branches:
- main
# on:
# pull_request:
# branches:
# - main

jobs:
quality-checks:
runs-on: ubuntu-latest
# jobs:
# quality-checks:
# runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: read
checks: write
# permissions:
# contents: read
# pull-requests: read
# checks: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# persist-credentials: false

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23.2
# - name: Setup Go
# uses: actions/setup-go@v5
# with:
# go-version: 1.23.2

- name: API Go Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.2
working-directory: ./src
args: --config ../../.github/.golangci.yml
github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: API Go Lint
# uses: golangci/golangci-lint-action@v6
# with:
# version: v1.62.2
# working-directory: ./src
# args: --config ../.github/.golangci.yml
# github-token: ${{ secrets.GITHUB_TOKEN }}
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,54 @@ TBD

## Documentation index

TBD
TBD

## Setting up Local Infrastructure

This section describe the step by step process to setup the local infrastructure for testing the project.

---

### Prerequisites

Before starting, make sure to meet the following requirements:

1. **Install local KAI**:
- Verify that all necessary components [KAI Requirements](https://github.com/konstellation-io/kai?tab=readme-ov-file#requirements) are installed. There is no specific version until now.
- Download the latest version of KAI from the [github](https://github.com/konstellation-io/kai) repository.
- Deploy KAI locally using `kaictl.sh` script, avoid errors for a previous version installed using flag `dracarys`.
```bash
./kaictl.sh dev --dracarys
```
- Modify the `/etc/hosts` file to include the following line, ensuring that `auth.kai.local` points to your `minikube` IP address:
```bash
<MINIKUBE_IP> auth.kai.local
```

2. **Create a User in Keycloak**:
- Access the Keycloak admin console (`auth.kai.loal`) using the administrator credentials.
- Create a new user and assign them to the `admin` group.
- Remove refresh token from the user created.

3. **Install Kai-Kli**:
- If `Go` is not installed, install it. There is no specific version until now.
- At this moment there is no binary release, so you need to generate the `kai-kli` binary locally by download [github](https://github.com/konstellation-io/kai-kli) repository and running the following command in the repository root:
```bash
make generate
```
- Using the CLI generated in the previous step for create configuration for the KAI server created in the first step:
```bash
kli server add local kai.local --insecure # Add the local server without security
kli server login # Login to the server with the user created in Keycloak
```
- In case of error, check `/etc/hosts` file and verify if this ips are correct:
```bash
<MINIKUBE-IP> api.kai.local
<MINIKUBE-IP> monitoring.kai.local
<MINIKUBE-IP> auth.kai.local
<MINIKUBE-IP> storage.kai.local
<MINIKUBE-IP> storage-console.kai.local
<MINIKUBE-IP> prometheus.kai.local
<MINIKUBE-IP> registry.kai.local
<MINIKUBE-IP> vault.kai.local
```

0 comments on commit e90c93d

Please sign in to comment.