2025-02-02 19:33:28 +01:00
|
|
|
Karso
|
|
|
|
=====
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
**K**angaroo **A**nd **R**abbit (S)SO is a simple SSO interface that manage multiple application authentication.
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
|
|
|
|
Run in local:
|
|
|
|
=============
|
|
|
|
|
|
|
|
Start tools
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Start the server basic interfaces: (DB(mySQL), Adminer)
|
2020-10-02 21:57:48 +02:00
|
|
|
|
|
|
|
```{.bash}
|
2025-02-02 19:33:28 +01:00
|
|
|
# start the Bdd interface (no big data > 50Mo)
|
|
|
|
docker compose -f env_dev/docker-compose.yaml up -d
|
2020-10-02 21:57:48 +02:00
|
|
|
```
|
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Start the Back-end:
|
|
|
|
-------------------
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
backend is developed in JAVA
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
The first step is configuring your JAVA version (or select the JVM with the OS)
|
|
|
|
```bash
|
|
|
|
export PATH=$(ls -d --color=never /usr/lib/jvm/java-2*-openjdk)/bin:$PATH
|
2020-10-02 21:57:48 +02:00
|
|
|
```
|
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Install the dependency:
|
|
|
|
```bash
|
|
|
|
mvn install
|
|
|
|
```
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Run the test
|
|
|
|
```bash
|
|
|
|
mvn test
|
2020-10-02 21:57:48 +02:00
|
|
|
```
|
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Install it for external use
|
|
|
|
```bash
|
|
|
|
mvn install
|
|
|
|
```
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Execute the local server:
|
|
|
|
```bash
|
|
|
|
mvn exec:java@dev-mode
|
|
|
|
```
|
2023-01-13 00:37:42 +01:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Start the Front-end:
|
|
|
|
--------------------
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
backend is developed in JAVA
|
|
|
|
```bash
|
|
|
|
cd front
|
|
|
|
pnpm install
|
|
|
|
pnpm dev
|
|
|
|
```
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Display the result:
|
|
|
|
-------------------
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
[show the webpage: http://localhost:4200](http://localhost:4200)
|
2020-10-02 21:57:48 +02:00
|
|
|
|
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Some other dev tools:
|
|
|
|
=====================
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Format code:
|
|
|
|
------------
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
```bash
|
|
|
|
export PATH=$(ls -d --color=never /usr/lib/jvm/java-2*-openjdk)/bin:$PATH
|
|
|
|
mvn formatter:format
|
|
|
|
mvn test
|
|
|
|
```
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Tools in production mode
|
|
|
|
========================
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Changing the Log Level
|
|
|
|
----------------------
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
In a production environment, you can adjust the log level to help diagnose bugs more effectively.
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
The available log levels are:
|
|
|
|
| **Log Level Tag** | **org.kar.karso** | **org.kar.archidata** | **other** |
|
|
|
|
| ----------------- | ------------------- | --------------------- | --------- |
|
|
|
|
| `prod` | INFO | INFO | INFO |
|
|
|
|
| `prod-debug` | DEBUG | INFO | INFO |
|
|
|
|
| `prod-trace` | TRACE | DEBUG | INFO |
|
|
|
|
| `prod-trace-full` | TRACE | TRACE | INFO |
|
|
|
|
| `dev` | TRACE | DEBUG | INFO |
|
2020-10-02 21:57:48 +02:00
|
|
|
|
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Manual set in production:
|
|
|
|
=========================
|
2020-10-02 21:57:48 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Connect on the registry
|
|
|
|
------------------------
|
2023-01-13 00:37:42 +01:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
To log-in and log-out from the registry:
|
|
|
|
```bash
|
|
|
|
export REGISTRY_ADDRESS=gitea.atria-soft.org
|
|
|
|
docker login -u <<YOUR_USER_NAME>> ${REGISTRY_ADDRESS}
|
|
|
|
docker logout ${REGISTRY_ADDRESS}
|
|
|
|
```
|
2023-01-13 00:37:42 +01:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
pull the root image of dockers
|
|
|
|
------------------------------
|
2023-01-13 00:37:42 +01:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
```bash
|
|
|
|
docker pull archlinux:base-devel
|
|
|
|
docker pull bellsoft/liberica-openjdk-alpine:latest
|
|
|
|
```
|
2024-05-14 09:04:40 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Create the version
|
|
|
|
------------------
|
2024-05-14 09:04:40 +02:00
|
|
|
|
2025-02-02 19:33:28 +01:00
|
|
|
Execute in the local folder: (use ```dev``` for development and ```latest``` for production release)
|
2024-05-14 09:04:40 +02:00
|
|
|
|
|
|
|
```bash
|
2025-02-02 19:33:28 +01:00
|
|
|
export TAG_DOCKER=latest
|
|
|
|
export REGISTRY_ADDRESS=gitea.atria-soft.org
|
|
|
|
docker build -t ${REGISTRY_ADDRESS}/kangaroo-and-rabbit/karso:${TAG_DOCKER} .
|
|
|
|
docker push ${REGISTRY_ADDRESS}/kangaroo-and-rabbit/karso:${TAG_DOCKER}
|
|
|
|
```
|
|
|
|
|