Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs restructure #2953

Merged
merged 23 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f3e20ec
Docs restructure, update docker etc.
S7evinK Jan 26, 2023
c714317
Remove build scripts
S7evinK Jan 26, 2023
fc02cb0
Remove traces of build.sh
S7evinK Jan 26, 2023
2f3e3b2
Bump Helm chart version
S7evinK Jan 26, 2023
c7c2995
Merge branch 'main' into s7evink/docs
S7evinK Jan 26, 2023
d64f65e
Only capture /_matrix
S7evinK Jan 27, 2023
d55e384
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/docs
S7evinK Feb 6, 2023
3a6ca74
Add docs about purge room endpoint
S7evinK Feb 6, 2023
753971d
Fix linter issue
S7evinK Feb 6, 2023
b2f1776
Evacuate room before purging
S7evinK Feb 6, 2023
da2e184
Evacuate room sync
S7evinK Feb 6, 2023
50f8466
Wait a bit before closing Dendrite to let components process events
S7evinK Feb 6, 2023
a9ff322
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/docs
S7evinK Feb 20, 2023
e04a6ed
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/docs
S7evinK May 25, 2023
9234983
Add optional logout_devices param
S7evinK May 25, 2023
38d5a44
Don't mark chart releases as latest
S7evinK May 25, 2023
47843e8
Remove mentions of polylith, more changes to wording etc
S7evinK May 25, 2023
d5c7ee4
Some more changes
S7evinK May 25, 2023
56a74e2
Update coverage docs
S7evinK May 25, 2023
0cceec5
Undo changes to the helm chart (something for a different PR)
S7evinK May 25, 2023
70c4e2f
Change chart version in readme
S7evinK May 25, 2023
d0eb174
Sleep a bit to let components process purge requests
S7evinK May 25, 2023
08502f2
Update INSTALL.md
S7evinK May 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
with:
config: helm/cr.yaml
charts_dir: helm/
mark_as_latest: false
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ It intends to provide an **efficient**, **reliable** and **scalable** alternativ

Dendrite is **beta** software, which means:

- Dendrite is ready for early adopters. We recommend running in Monolith mode with a PostgreSQL database.
- Dendrite is ready for early adopters. We recommend running Dendrite with a PostgreSQL database.
- Dendrite has periodic releases. We intend to release new versions as we fix bugs and land significant features.
- Dendrite supports database schema upgrades between releases. This means you should never lose your messages when upgrading Dendrite.

This does not mean:

- Dendrite is bug-free. It has not yet been battle-tested in the real world and so will be error prone initially.
- Dendrite is feature-complete. There may be client or federation APIs that are not implemented.
- Dendrite is ready for massive homeserver deployments. There is no sharding of microservices (although it is possible to run them on separate machines) and there is no high-availability/clustering support.
- Dendrite is ready for massive homeserver deployments. There is no high-availability/clustering support.

Currently, we expect Dendrite to function well for small (10s/100s of users) homeserver deployments as well as P2P Matrix nodes in-browser or on mobile devices.

Expand Down Expand Up @@ -60,7 +60,7 @@ The following instructions are enough to get Dendrite started as a non-federatin
```bash
$ git clone https://github.com/matrix-org/dendrite
$ cd dendrite
$ ./build.sh
$ go build -o bin/ ./cmd/...

# Generate a Matrix signing key for federation (required)
$ ./bin/generate-keys --private-key matrix_key.pem
Expand All @@ -85,7 +85,7 @@ Then point your favourite Matrix client at `http://localhost:8008` or `https://l

## Progress

We use a script called Are We Synapse Yet which checks Sytest compliance rates. Sytest is a black-box homeserver
We use a script called "Are We Synapse Yet" which checks Sytest compliance rates. Sytest is a black-box homeserver
test rig with around 900 tests. The script works out how many of these tests are passing on Dendrite and it
updates with CI. As of January 2023, we have 100% server-server parity with Synapse, and the client-server parity is at 93% , though check
CI for the latest numbers. In practice, this means you can communicate locally and via federation with Synapse
Expand Down
51 changes: 0 additions & 51 deletions build.cmd

This file was deleted.

24 changes: 0 additions & 24 deletions build.sh

This file was deleted.

17 changes: 7 additions & 10 deletions build/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,20 @@ They can be found on Docker Hub:

- [matrixdotorg/dendrite-monolith](https://hub.docker.com/r/matrixdotorg/dendrite-monolith) for monolith deployments

## Dockerfiles
## Dockerfile

The `Dockerfile` is a multistage file which can build all four Dendrite
images depending on the supplied `--target`. From the root of the Dendrite
The `Dockerfile` is a multistage file which can build Dendrite. From the root of the Dendrite
repository, run:

```
docker build . --target monolith -t matrixdotorg/dendrite-monolith
docker build . --target demo-pinecone -t matrixdotorg/dendrite-demo-pinecone
docker build . --target demo-yggdrasil -t matrixdotorg/dendrite-demo-yggdrasil
docker build . -t matrixdotorg/dendrite-monolith
```

## Compose files
## Compose file

There are two sample `docker-compose` files:
There is one sample `docker-compose` files:

- `docker-compose.monolith.yml` which runs a monolith Dendrite deployment
- `docker-compose.yml` which runs a Dendrite deployment with Postgres

## Configuration

Expand Down Expand Up @@ -55,7 +52,7 @@ Create your config based on the [`dendrite-sample.yaml`](https://github.com/matr
Then start the deployment:

```
docker-compose -f docker-compose.monolith.yml up
docker-compose -f docker-compose.yml up
```

## Building the images
Expand Down
44 changes: 0 additions & 44 deletions build/docker/docker-compose.monolith.yml

This file was deleted.

52 changes: 52 additions & 0 deletions build/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: "3.4"

services:
postgres:
hostname: postgres
image: postgres:15-alpine
restart: always
volumes:
# This will create a docker volume to persist the database files in.
# If you prefer those files to be outside of docker, you'll need to change this.
- dendrite_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: itsasecret
POSTGRES_USER: dendrite
POSTGRES_DATABASE: dendrite
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dendrite"]
interval: 5s
timeout: 5s
retries: 5
networks:
- internal

monolith:
hostname: monolith
image: matrixdotorg/dendrite-monolith:latest
ports:
- 8008:8008
- 8448:8448
volumes:
- ./config:/etc/dendrite
# The following volumes use docker volumes, change this
# if you prefer to have those files outside of docker.
- dendrite_media:/var/dendrite/media
- dendrite_jetstream:/var/dendrite/jetstream
- dendrite_search_index:/var/dendrite/searchindex
depends_on:
postgres:
condition: service_healthy
networks:
- internal
restart: unless-stopped

networks:
internal:
attachable: true

volumes:
dendrite_postgres_data:
dendrite_media:
dendrite_jetstream:
dendrite_search_index:
5 changes: 0 additions & 5 deletions build/docker/postgres/create_db.sh

This file was deleted.

6 changes: 5 additions & 1 deletion clientapi/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ func TestPurgeRoom(t *testing.T) {
cfg, processCtx, close := testrig.CreateConfig(t, dbType)
caches := caching.NewRistrettoCache(128*1024*1024, time.Hour, caching.DisableMetrics)
natsInstance := jetstream.NATSInstance{}
defer close()
defer func() {
// give components the time to process purge requests
time.Sleep(time.Millisecond * 50)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this will still be quite flakey. Is there a better way to handle this in the test?

close()
}()

routers := httputil.NewRouters()
cm := sqlutil.NewConnectionManager(processCtx, cfg.Global.DatabaseOptions)
Expand Down
5 changes: 3 additions & 2 deletions clientapi/routing/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func AdminResetPassword(req *http.Request, cfg *config.ClientAPI, device *api.De
}
}
request := struct {
Password string `json:"password"`
Password string `json:"password"`
LogoutDevices bool `json:"logout_devices"`
}{}
if err = json.NewDecoder(req.Body).Decode(&request); err != nil {
return util.JSONResponse{
Expand All @@ -146,7 +147,7 @@ func AdminResetPassword(req *http.Request, cfg *config.ClientAPI, device *api.De
Localpart: localpart,
ServerName: serverName,
Password: request.Password,
LogoutDevices: true,
LogoutDevices: request.LogoutDevices,
}
updateRes := &api.PerformPasswordUpdateResponse{}
if err := userAPI.PerformPasswordUpdate(req.Context(), updateReq, updateRes); err != nil {
Expand Down
3 changes: 1 addition & 2 deletions dendrite-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ global:
# e.g. localhost:443
well_known_server_name: ""

# The server name to delegate client-server communications to, with optional port
# e.g. localhost:443
# The base URL to delegate client-server communications to e.g. https://localhost
well_known_client_name: ""

# Lists of domains that the server will trust as identity servers to verify third
Expand Down
6 changes: 3 additions & 3 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ No, although a good portion of the Matrix specification has been implemented. Mo

Dendrite development is currently supported by a small team of developers and due to those limited resources, the majority of the effort is focused on getting Dendrite to be
specification complete. If there are major features you're requesting (e.g. new administration endpoints), we'd like to strongly encourage you to join the community in supporting
the development efforts through [contributing](https://matrix-org.github.io/dendrite/development/contributing).
the development efforts through [contributing](../development/contributing).

## Is there a migration path from Synapse to Dendrite?

Expand Down Expand Up @@ -103,7 +103,7 @@ This can be done by performing a room upgrade. Use the command `/upgraderoom <ve

## How do I reset somebody's password on my server?

Use the admin endpoint [resetpassword](https://matrix-org.github.io/dendrite/administration/adminapi#post-_dendriteadminresetpassworduserid)
Use the admin endpoint [resetpassword](./administration/adminapi#post-_dendriteadminresetpassworduserid)

## Should I use PostgreSQL or SQLite for my databases?

Expand Down Expand Up @@ -157,7 +157,7 @@ You may need to revisit the connection limit of your PostgreSQL server and/or ma

## VOIP and Video Calls don't appear to work on Dendrite

There is likely an issue with your STUN/TURN configuration on the server. If you believe your configuration to be correct, please see the [troubleshooting](administration/5_troubleshooting.md) for troubleshooting recommendations.
There is likely an issue with your STUN/TURN configuration on the server. If you believe your configuration to be correct, please see the [troubleshooting](administration/6_troubleshooting.md) for troubleshooting recommendations.

## What is being reported when enabling phone-home statistics?

Expand Down
4 changes: 2 additions & 2 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ or alternatively, in the [installation](installation/) folder:
2. [Setting up the domain](installation/2_domainname.md)
3. [Preparing database storage](installation/3_database.md)
4. [Generating signing keys](installation/4_signingkey.md)
5. [Installing as a monolith](installation/5_install_monolith.md)
5. [Installing Dendrite](installation/5_install_monolith.md)
S7evinK marked this conversation as resolved.
Show resolved Hide resolved
6. [Populate the configuration](installation/7_configuration.md)
7. [Starting the monolith](installation/8_starting_monolith.md)
7. [Starting Dendrite](installation/8_starting_monolith.md)
S7evinK marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 2 additions & 3 deletions docs/administration/1_createusers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ User accounts can be created on a Dendrite instance in a number of ways.

## From the command line

The `create-account` tool is built in the `bin` folder when building Dendrite with
the `build.sh` script.
The `create-account` tool is built in the `bin` folder when [building](../installation/build) Dendrite.

It uses the `dendrite.yaml` configuration file to connect to a running Dendrite instance and requires
It uses the `dendrite.yaml` configuration file to connect to a **running** Dendrite instance and requires
shared secret registration to be enabled as explained below.

An example of using `create-account` to create a **normal account**:
Expand Down
Loading