mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
feat(services): Add slave service to configure global scale slave with
the latest lookup server Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
parent
46ea577dbd
commit
d48a192f3f
4 changed files with 147 additions and 24 deletions
28
README.md
28
README.md
|
|
@ -303,36 +303,18 @@ You can start a lookup-server service when starting an instance:
|
|||
haze start --name gs-master lookup
|
||||
```
|
||||
|
||||
The lookup server is then accessible by other instances at
|
||||
`http://haze-gs-master-lookup`.
|
||||
|
||||
The Nextcloud instance started with this command is already properly configured
|
||||
as master node.
|
||||
|
||||
For the slaves instance, here is a sane preset:
|
||||
|
||||
```toml
|
||||
[[preset]]
|
||||
name = "gs-slave"
|
||||
apps = ["globalsiteselector"]
|
||||
config = {
|
||||
"gs.enabled" = true,
|
||||
"gs.federation" = "global",
|
||||
"gss.jwt.key" = "random-key", # Matches the key set in the docker container of the lookup server.
|
||||
"gss.mode" = "slave",
|
||||
}
|
||||
```
|
||||
|
||||
You'll then have to manually point your slave instances to the lookup and master
|
||||
instances:
|
||||
You can then start slave instance with the following command:
|
||||
|
||||
```bash
|
||||
haze start --name gs-slave1 gs-slave
|
||||
# Assuming that the master instance was started with `--name gs-master`.
|
||||
haze gs-slave1 occ config:system:set gss.master.url --value="http://haze-gs-master.haze.example.com"
|
||||
haze gs-slave1 occ config:system:set lookup_server --value="http://haze-gs-master-lookup"
|
||||
haze start --name gs-slave1 slave
|
||||
```
|
||||
|
||||
A slave attaches to the most recently started instance running a lookup server,
|
||||
and is pointed at both that lookup server and the master instance automatically.
|
||||
|
||||
If you want to use the `ManualUserMapping` module, you'll have to set the
|
||||
following config on the master instance:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue