From 0d3457142e47af958963babde6006042d950428f Mon Sep 17 00:00:00 2001 From: Fabien Le Frapper Date: Sun, 23 Mar 2025 20:11:13 +0100 Subject: [PATCH] Update readme --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++----- bottin.config.json | 13 ------------- docker-compose.yml | 22 ---------------------- 3 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 bottin.config.json delete mode 100644 docker-compose.yml diff --git a/README.md b/README.md index d8ddaef..2f7a09d 100644 --- a/README.md +++ b/README.md @@ -130,18 +130,19 @@ Here is an example of Bottin ACLs that may be used to support Guichet invitation Consult [this directory](https://git.deuxfleurs.fr/Deuxfleurs/infrastructure/src/branch/main/app/directory/config) to view the full configuration in use on Deuxfleurs. -## Contribute +## Contribute & local development Guichet needs a few components to work : - A Bottin server - that needs a consul server A basic consul / bottin stack is available through the docker compose file -``` +```sh +cd integration docker compose up -d ``` - -You can then run Guichet locally + +You can then run Guichet locally : ```sh # First, copy a sample config file copy config.json.example config.json @@ -150,4 +151,38 @@ copy config.json.example config.json go run . ``` -It will be available on http://localhost:9991 +It will be available on http://localhost:9991. + +### First run + +#### How to get my admin password + +On first Bottin's run, it is displayed in the logs. +You can easily find it by reading the container logs : +```sh +docker compose logs bottin | grep password: +``` + +- username : it is provided by the log, and should be `cn=admin,dc=bottin,dc=eu` + + +#### Garage +⚠️ Be aware at this stage you local guichet installation is not 100% working, especially the websites features. +You need to initialise Garage. It can be done in a few commands, coming [the official documentation] : + +```sh +# Find your Garage node ID +docker compose exec garage /garage + +# eb820c8da5605f78 in the output below +ID Hostname Address Tags Zone Capacity DataAvail +eb820c8da5605f78 9bd710b31be0 127.0.0.1:3901 NO ROLE ASSIGNED + +# Then create a cluster layout +docker compose exec garage /garage layout assign -z dc1 -c 1G eb820c8da5605f78 + +# Finally, apply the layout +docker compose exec garage /garage layout apply +``` + +🎉 You now can go to http://localhost:9991/website without getting 503 errors. diff --git a/bottin.config.json b/bottin.config.json deleted file mode 100644 index 2592f8f..0000000 --- a/bottin.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "suffix": "dc=bottin,dc=eu", - "bind": "127.0.0.1:1389", - "consul_host": "consul:8500", - "acl": [ - "ANONYMOUS::bind:*,ou=users,dc=bottin,dc=eu:", - "ANONYMOUS::bind:cn=admin,dc=bottin,dc=eu:", - "*,dc=bottin,dc=eu::read:*:* !userpassword", - "*::read modify:SELF:*", - "cn=admin,dc=bottin,dc=eu::read add modify delete:*:*", - "*:cn=admin,ou=groups,dc=bottin,dc=eu:read add modify delete:*:*" - ] -} diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 66ab57c..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -services: - bottin: - image: lxpz/bottin_amd64 - platform: linux/amd64 - entrypoint: /bottin -config /config.json - depends_on: - consul: - condition: service_healthy - restart: true - ports: - - 389:389 - volumes: - - ./bottin.config.json:/config.json - consul: - image: consul:1.15 - command: agent -server -ui -node=server-1 -bootstrap-expect=1 -client=0.0.0.0 - healthcheck: - test: curl --fail http://localhost:8500/ui || exit 1 - interval: 10s - retries: 5 - start_period: 10s - timeout: 10s