mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 08:00:53 +00:00
deploy: c9b7e97355
This commit is contained in:
parent
75a890ac3f
commit
45fcf7532c
6 changed files with 42 additions and 4 deletions
|
@ -157,6 +157,10 @@ version in future releases.</p>
|
||||||
<p>Details on the upstream support life cycles for Python and PostgreSQL are
|
<p>Details on the upstream support life cycles for Python and PostgreSQL are
|
||||||
documented at <a href="https://endoflife.date/python">https://endoflife.date/python</a> and
|
documented at <a href="https://endoflife.date/python">https://endoflife.date/python</a> and
|
||||||
<a href="https://endoflife.date/postgresql">https://endoflife.date/postgresql</a>.</p>
|
<a href="https://endoflife.date/postgresql">https://endoflife.date/postgresql</a>.</p>
|
||||||
|
<p>A Rust compiler is required to build Synapse from source. For any given release
|
||||||
|
the minimum required version may be bumped up to a recent Rust version, and so
|
||||||
|
people building from source should ensure they can fetch recent versions of Rust
|
||||||
|
(e.g. by using <a href="https://rustup.rs/">rustup</a>).</p>
|
||||||
<h2 id="context"><a class="header" href="#context">Context</a></h2>
|
<h2 id="context"><a class="header" href="#context">Context</a></h2>
|
||||||
<p>It is important for system admins to have a clear understanding of the platform
|
<p>It is important for system admins to have a clear understanding of the platform
|
||||||
requirements of Synapse and its deprecation policies so that they can
|
requirements of Synapse and its deprecation policies so that they can
|
||||||
|
@ -167,6 +171,12 @@ long process.</p>
|
||||||
<p>By following the upstream support life cycles Synapse can ensure that its
|
<p>By following the upstream support life cycles Synapse can ensure that its
|
||||||
dependencies continue to get security patches, while not requiring system admins
|
dependencies continue to get security patches, while not requiring system admins
|
||||||
to constantly update their platform dependencies to the latest versions.</p>
|
to constantly update their platform dependencies to the latest versions.</p>
|
||||||
|
<p>For Rust, the situation is a bit different given that a) the Rust foundation
|
||||||
|
does not generally support older Rust versions, and b) the library ecosystem
|
||||||
|
generally bump their minimum support Rust versions frequently. In general, the
|
||||||
|
Synapse team will try to avoid updating the dependency on Rust to the absolute
|
||||||
|
latest version, but introducing a formal policy is hard given the constraints of
|
||||||
|
the ecosystem.</p>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,8 @@ on Windows is not officially supported.</p>
|
||||||
<p>Synapse can connect to PostgreSQL via the <a href="https://pypi.org/project/psycopg2/">psycopg2</a> Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with <code>sudo apt install libpq-dev</code>.</p>
|
<p>Synapse can connect to PostgreSQL via the <a href="https://pypi.org/project/psycopg2/">psycopg2</a> Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with <code>sudo apt install libpq-dev</code>.</p>
|
||||||
<p>The source code of Synapse is hosted on GitHub. You will also need <a href="https://github.com/git-guides/install-git">a recent version of git</a>.</p>
|
<p>The source code of Synapse is hosted on GitHub. You will also need <a href="https://github.com/git-guides/install-git">a recent version of git</a>.</p>
|
||||||
<p>For some tests, you will need <a href="https://docs.docker.com/get-docker/">a recent version of Docker</a>.</p>
|
<p>For some tests, you will need <a href="https://docs.docker.com/get-docker/">a recent version of Docker</a>.</p>
|
||||||
|
<p>A recent version of the Rust compiler is needed to build the native modules. The
|
||||||
|
easiest way of installing the latest version is to use <a href="https://rustup.rs/">rustup</a>.</p>
|
||||||
<h1 id="3-get-the-source"><a class="header" href="#3-get-the-source">3. Get the source.</a></h1>
|
<h1 id="3-get-the-source"><a class="header" href="#3-get-the-source">3. Get the source.</a></h1>
|
||||||
<p>The preferred and easiest way to contribute changes is to fork the relevant
|
<p>The preferred and easiest way to contribute changes is to fork the relevant
|
||||||
project on GitHub, and then <a href="https://help.github.com/articles/using-pull-requests/">create a pull request</a> to ask us to pull your
|
project on GitHub, and then <a href="https://help.github.com/articles/using-pull-requests/">create a pull request</a> to ask us to pull your
|
||||||
|
@ -222,6 +224,10 @@ to check that your contributions render correctly. The docs are written in
|
||||||
<p>Some documentation also exists in <a href="https://github.com/matrix-org/synapse/wiki">Synapse's GitHub
|
<p>Some documentation also exists in <a href="https://github.com/matrix-org/synapse/wiki">Synapse's GitHub
|
||||||
Wiki</a>, although this is primarily
|
Wiki</a>, although this is primarily
|
||||||
contributed to by community authors.</p>
|
contributed to by community authors.</p>
|
||||||
|
<p>When changes are made to any Rust code then you must call either <code>poetry install</code>
|
||||||
|
or <code>maturin develop</code> (if installed) to rebuild the Rust code. Using <a href="https://github.com/PyO3/maturin"><code>maturin</code></a>
|
||||||
|
is quicker than <code>poetry install</code>, so is recommended when making frequent
|
||||||
|
changes to the Rust code.</p>
|
||||||
<h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1>
|
<h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1>
|
||||||
<p><a name="test-test-test"></a></p>
|
<p><a name="test-test-test"></a></p>
|
||||||
<p>While you're developing and before submitting a patch, you'll
|
<p>While you're developing and before submitting a patch, you'll
|
||||||
|
@ -270,7 +276,7 @@ working directory. Typically, this ends up being <code>_trial_temp/test.db</code
|
||||||
<p>The database file can then be inspected with:</p>
|
<p>The database file can then be inspected with:</p>
|
||||||
<pre><code class="language-sh">sqlite3 _trial_temp/test.db
|
<pre><code class="language-sh">sqlite3 _trial_temp/test.db
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Note that the database file is cleared at the beginning of each test run. Thus it
|
<p>Note that the database file is cleared at the beginning of each test run. Thus it
|
||||||
will always only contain the data generated by the <em>last run test</em>. Though generally
|
will always only contain the data generated by the <em>last run test</em>. Though generally
|
||||||
when debugging, one is only running a single test anyway.</p>
|
when debugging, one is only running a single test anyway.</p>
|
||||||
<h3 id="running-tests-under-postgresql"><a class="header" href="#running-tests-under-postgresql">Running tests under PostgreSQL</a></h3>
|
<h3 id="running-tests-under-postgresql"><a class="header" href="#running-tests-under-postgresql">Running tests under PostgreSQL</a></h3>
|
||||||
|
|
|
@ -360,6 +360,9 @@ and mounting it to <code>/var/synapse</code> should be taken into consideration.
|
||||||
<li>Python 3.7 or later, up to Python 3.10.</li>
|
<li>Python 3.7 or later, up to Python 3.10.</li>
|
||||||
<li>At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org</li>
|
<li>At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>If building on an uncommon architecture for which pre-built wheels are
|
||||||
|
unavailable, you will need to have a recent Rust compiler installed. The easiest
|
||||||
|
way of installing the latest version is to use <a href="https://rustup.rs/">rustup</a>.</p>
|
||||||
<p>To install the Synapse homeserver run:</p>
|
<p>To install the Synapse homeserver run:</p>
|
||||||
<pre><code class="language-sh">mkdir -p ~/synapse
|
<pre><code class="language-sh">mkdir -p ~/synapse
|
||||||
virtualenv -p python3 ~/synapse/env
|
virtualenv -p python3 ~/synapse/env
|
||||||
|
@ -14193,6 +14196,8 @@ on Windows is not officially supported.</p>
|
||||||
<p>Synapse can connect to PostgreSQL via the <a href="https://pypi.org/project/psycopg2/">psycopg2</a> Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with <code>sudo apt install libpq-dev</code>.</p>
|
<p>Synapse can connect to PostgreSQL via the <a href="https://pypi.org/project/psycopg2/">psycopg2</a> Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with <code>sudo apt install libpq-dev</code>.</p>
|
||||||
<p>The source code of Synapse is hosted on GitHub. You will also need <a href="https://github.com/git-guides/install-git">a recent version of git</a>.</p>
|
<p>The source code of Synapse is hosted on GitHub. You will also need <a href="https://github.com/git-guides/install-git">a recent version of git</a>.</p>
|
||||||
<p>For some tests, you will need <a href="https://docs.docker.com/get-docker/">a recent version of Docker</a>.</p>
|
<p>For some tests, you will need <a href="https://docs.docker.com/get-docker/">a recent version of Docker</a>.</p>
|
||||||
|
<p>A recent version of the Rust compiler is needed to build the native modules. The
|
||||||
|
easiest way of installing the latest version is to use <a href="https://rustup.rs/">rustup</a>.</p>
|
||||||
<h1 id="3-get-the-source"><a class="header" href="#3-get-the-source">3. Get the source.</a></h1>
|
<h1 id="3-get-the-source"><a class="header" href="#3-get-the-source">3. Get the source.</a></h1>
|
||||||
<p>The preferred and easiest way to contribute changes is to fork the relevant
|
<p>The preferred and easiest way to contribute changes is to fork the relevant
|
||||||
project on GitHub, and then <a href="https://help.github.com/articles/using-pull-requests/">create a pull request</a> to ask us to pull your
|
project on GitHub, and then <a href="https://help.github.com/articles/using-pull-requests/">create a pull request</a> to ask us to pull your
|
||||||
|
@ -14249,6 +14254,10 @@ to check that your contributions render correctly. The docs are written in
|
||||||
<p>Some documentation also exists in <a href="https://github.com/matrix-org/synapse/wiki">Synapse's GitHub
|
<p>Some documentation also exists in <a href="https://github.com/matrix-org/synapse/wiki">Synapse's GitHub
|
||||||
Wiki</a>, although this is primarily
|
Wiki</a>, although this is primarily
|
||||||
contributed to by community authors.</p>
|
contributed to by community authors.</p>
|
||||||
|
<p>When changes are made to any Rust code then you must call either <code>poetry install</code>
|
||||||
|
or <code>maturin develop</code> (if installed) to rebuild the Rust code. Using <a href="https://github.com/PyO3/maturin"><code>maturin</code></a>
|
||||||
|
is quicker than <code>poetry install</code>, so is recommended when making frequent
|
||||||
|
changes to the Rust code.</p>
|
||||||
<h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1>
|
<h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1>
|
||||||
<p><a name="test-test-test"></a></p>
|
<p><a name="test-test-test"></a></p>
|
||||||
<p>While you're developing and before submitting a patch, you'll
|
<p>While you're developing and before submitting a patch, you'll
|
||||||
|
@ -14297,7 +14306,7 @@ working directory. Typically, this ends up being <code>_trial_temp/test.db</code
|
||||||
<p>The database file can then be inspected with:</p>
|
<p>The database file can then be inspected with:</p>
|
||||||
<pre><code class="language-sh">sqlite3 _trial_temp/test.db
|
<pre><code class="language-sh">sqlite3 _trial_temp/test.db
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Note that the database file is cleared at the beginning of each test run. Thus it
|
<p>Note that the database file is cleared at the beginning of each test run. Thus it
|
||||||
will always only contain the data generated by the <em>last run test</em>. Though generally
|
will always only contain the data generated by the <em>last run test</em>. Though generally
|
||||||
when debugging, one is only running a single test anyway.</p>
|
when debugging, one is only running a single test anyway.</p>
|
||||||
<h3 id="running-tests-under-postgresql"><a class="header" href="#running-tests-under-postgresql">Running tests under PostgreSQL</a></h3>
|
<h3 id="running-tests-under-postgresql"><a class="header" href="#running-tests-under-postgresql">Running tests under PostgreSQL</a></h3>
|
||||||
|
@ -16669,6 +16678,10 @@ version in future releases.</p>
|
||||||
<p>Details on the upstream support life cycles for Python and PostgreSQL are
|
<p>Details on the upstream support life cycles for Python and PostgreSQL are
|
||||||
documented at <a href="https://endoflife.date/python">https://endoflife.date/python</a> and
|
documented at <a href="https://endoflife.date/python">https://endoflife.date/python</a> and
|
||||||
<a href="https://endoflife.date/postgresql">https://endoflife.date/postgresql</a>.</p>
|
<a href="https://endoflife.date/postgresql">https://endoflife.date/postgresql</a>.</p>
|
||||||
|
<p>A Rust compiler is required to build Synapse from source. For any given release
|
||||||
|
the minimum required version may be bumped up to a recent Rust version, and so
|
||||||
|
people building from source should ensure they can fetch recent versions of Rust
|
||||||
|
(e.g. by using <a href="https://rustup.rs/">rustup</a>).</p>
|
||||||
<h2 id="context"><a class="header" href="#context">Context</a></h2>
|
<h2 id="context"><a class="header" href="#context">Context</a></h2>
|
||||||
<p>It is important for system admins to have a clear understanding of the platform
|
<p>It is important for system admins to have a clear understanding of the platform
|
||||||
requirements of Synapse and its deprecation policies so that they can
|
requirements of Synapse and its deprecation policies so that they can
|
||||||
|
@ -16679,6 +16692,12 @@ long process.</p>
|
||||||
<p>By following the upstream support life cycles Synapse can ensure that its
|
<p>By following the upstream support life cycles Synapse can ensure that its
|
||||||
dependencies continue to get security patches, while not requiring system admins
|
dependencies continue to get security patches, while not requiring system admins
|
||||||
to constantly update their platform dependencies to the latest versions.</p>
|
to constantly update their platform dependencies to the latest versions.</p>
|
||||||
|
<p>For Rust, the situation is a bit different given that a) the Rust foundation
|
||||||
|
does not generally support older Rust versions, and b) the library ecosystem
|
||||||
|
generally bump their minimum support Rust versions frequently. In general, the
|
||||||
|
Synapse team will try to avoid updating the dependency on Rust to the absolute
|
||||||
|
latest version, but introducing a formal policy is hard given the constraints of
|
||||||
|
the ecosystem.</p>
|
||||||
<div style="break-before: page; page-break-before: always;"></div><h2 id="summary-of-performance-impact-of-running-on-resource-constrained-devices-such-as-sbcs"><a class="header" href="#summary-of-performance-impact-of-running-on-resource-constrained-devices-such-as-sbcs">Summary of performance impact of running on resource constrained devices such as SBCs</a></h2>
|
<div style="break-before: page; page-break-before: always;"></div><h2 id="summary-of-performance-impact-of-running-on-resource-constrained-devices-such-as-sbcs"><a class="header" href="#summary-of-performance-impact-of-running-on-resource-constrained-devices-such-as-sbcs">Summary of performance impact of running on resource constrained devices such as SBCs</a></h2>
|
||||||
<p>I've been running my homeserver on a cubietruck at home now for some time and am often replying to statements like "you need loads of ram to join large rooms" with "it works fine for me". I thought it might be useful to curate a summary of the issues you're likely to run into to help as a scaling-down guide, maybe highlight these for development work or end up as documentation. It seems that once you get up to about 4x1.5GHz arm64 4GiB these issues are no longer a problem.</p>
|
<p>I've been running my homeserver on a cubietruck at home now for some time and am often replying to statements like "you need loads of ram to join large rooms" with "it works fine for me". I thought it might be useful to curate a summary of the issues you're likely to run into to help as a scaling-down guide, maybe highlight these for development work or end up as documentation. It seems that once you get up to about 4x1.5GHz arm64 4GiB these issues are no longer a problem.</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -277,6 +277,9 @@ and mounting it to <code>/var/synapse</code> should be taken into consideration.
|
||||||
<li>Python 3.7 or later, up to Python 3.10.</li>
|
<li>Python 3.7 or later, up to Python 3.10.</li>
|
||||||
<li>At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org</li>
|
<li>At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>If building on an uncommon architecture for which pre-built wheels are
|
||||||
|
unavailable, you will need to have a recent Rust compiler installed. The easiest
|
||||||
|
way of installing the latest version is to use <a href="https://rustup.rs/">rustup</a>.</p>
|
||||||
<p>To install the Synapse homeserver run:</p>
|
<p>To install the Synapse homeserver run:</p>
|
||||||
<pre><code class="language-sh">mkdir -p ~/synapse
|
<pre><code class="language-sh">mkdir -p ~/synapse
|
||||||
virtualenv -p python3 ~/synapse/env
|
virtualenv -p python3 ~/synapse/env
|
||||||
|
|
Loading…
Reference in a new issue