This commit is contained in:
parent
4f3b5d8210
commit
0d3457142e
3 changed files with 40 additions and 40 deletions
43
README.md
43
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.
|
||||
|
|
|
@ -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:*:*"
|
||||
]
|
||||
}
|
|
@ -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
|
Loading…
Add table
Reference in a new issue