Merge pull request 'added integration folder with a docker compose file and some explanation' (#18) from integration into main
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #18
This commit is contained in:
commit
02670ba6a6
5 changed files with 80 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@ guichet.static
|
||||||
config.json
|
config.json
|
||||||
result
|
result
|
||||||
.direnv/
|
.direnv/
|
||||||
|
password
|
||||||
|
|
16
integration/README.md
Normal file
16
integration/README.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Intégration de Guichet dans un environnement de dev/test
|
||||||
|
|
||||||
|
## Dev process
|
||||||
|
|
||||||
|
On utilise `docker compose` pour mettre en place l'infrastructure dont dépend Guichet, que l'on développe. (On rajoutera Garage dedans plus tard.)
|
||||||
|
|
||||||
|
On ne met pas Guichet dans le `compose` pour pouvoir itérer plus rapidement : un `go build` et on a la nouvelle version, sans avoir restart les dépendances (Bottin, Consul...).
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
* Bien récupérer le password `admin` dans les logs de 1er lancement de Bottin : il ne sera pas réaffiché.
|
||||||
|
* Identifiant de l'admin sur Guichet : `cn=admin,dc=bottin,dc=eu` because il n'est pas dans `ou=users,dc=bottin,dc=eu` qui est l'organisation par défaut dans laquelle on va chercher les utilisateurs.
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
* Bridger Garage/S3 (pour le moment ne sert que pour les avatars dans l'annuaire)
|
13
integration/config/bottin.json
Normal file
13
integration/config/bottin.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"suffix": "dc=bottin,dc=eu",
|
||||||
|
"bind": "bottin:389",
|
||||||
|
"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:*:*"
|
||||||
|
]
|
||||||
|
}
|
34
integration/config/guichet.json
Normal file
34
integration/config/guichet.json
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"http_bind_addr": ":9991",
|
||||||
|
"ldap_server_addr": "ldap://127.0.0.1:389",
|
||||||
|
|
||||||
|
"base_dn": "dc=bottin,dc=eu",
|
||||||
|
"user_base_dn": "ou=users,dc=bottin,dc=eu",
|
||||||
|
"user_name_attr": "cn",
|
||||||
|
"group_base_dn": "ou=groups,dc=bottin,dc=eu",
|
||||||
|
"group_name_attr": "cn",
|
||||||
|
|
||||||
|
"invitation_base_dn": "ou=invitations,dc=bottin,dc=eu",
|
||||||
|
"invitation_name_attr": "cn",
|
||||||
|
"invited_mail_format": "{}@bottin.eu",
|
||||||
|
"invited_auto_groups": [
|
||||||
|
"cn=email,ou=groups,dc=bottin,dc=eu"
|
||||||
|
],
|
||||||
|
|
||||||
|
"web_address": "https://guichet.bottin.eu",
|
||||||
|
"mail_from": "welcome@bottin.eu",
|
||||||
|
"smtp_server": "smtp.bottin.eu",
|
||||||
|
"smtp_username": "guichet",
|
||||||
|
"smtp_password": "",
|
||||||
|
|
||||||
|
"admin_account": "cn=admin,dc=bottin,dc=eu",
|
||||||
|
"group_can_admin": "gid=admin,ou=groups,dc=bottin,dc=eu",
|
||||||
|
"group_can_invite": "",
|
||||||
|
|
||||||
|
"s3_endpoint": "garage.bottin.eu",
|
||||||
|
"s3_access_key": "",
|
||||||
|
"s3_secret_key": "",
|
||||||
|
"s3_region": "garage",
|
||||||
|
"s3_bucket": "bottin-pictures"
|
||||||
|
}
|
||||||
|
|
16
integration/docker-compose.yml
Normal file
16
integration/docker-compose.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
consul:
|
||||||
|
image: consul
|
||||||
|
restart: "always"
|
||||||
|
expose:
|
||||||
|
- 8500
|
||||||
|
bottin:
|
||||||
|
image: dxflrs/bottin:dnp41vp8w24h4mbh0xg1mybzr1f46k41
|
||||||
|
command: "-config /etc/bottin.json"
|
||||||
|
restart: "always"
|
||||||
|
depends_on: ["consul"]
|
||||||
|
ports:
|
||||||
|
- "389:389"
|
||||||
|
volumes:
|
||||||
|
- "./config/bottin.json:/etc/bottin.json"
|
Loading…
Reference in a new issue