-
Notifications
You must be signed in to change notification settings - Fork 325
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
Convert docs from reStructuredText to MyST markdown #2980
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env sh | ||
|
||
import subprocess | ||
import os | ||
|
||
output = subprocess.check_output(['find', 'screenshots', '-name', '*_dev.png']).decode('utf8') | ||
|
||
for dev in output.splitlines(): | ||
ref = dev.replace('_dev.png', '_ref.png') | ||
if os.path.exists(dev) and os.path.exists(ref): | ||
print(dev) | ||
cmd = ['compare', '-compose', 'src', dev, ref, dev.replace('_dev.png', '_diff.png')] | ||
print(cmd) | ||
subprocess.run(cmd) | ||
else: | ||
print(f'Cannot compare {dev}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
colon_fences: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sphinx.domains.std.Glossary: eval_rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
# | ||
set -e | ||
# shellcheck disable=SC2044,SC3010 | ||
for f in $(find . -type f -name '*.rst'); do | ||
if [[ "$f" == */includes/* ]]; then | ||
echo skipping "$f" | ||
continue | ||
fi | ||
rst2myst convert -c convert/conversions.yaml --no-colon-fences "$f" | ||
rm -f "$f" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
|
||
git checkout src | ||
git clean src -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from selenium import webdriver | ||
from selenium.webdriver.common.keys import Keys | ||
from selenium.webdriver.common.by import By | ||
import subprocess | ||
import os.path | ||
|
||
def sanitize_name(name): | ||
r = '' | ||
for c in name: | ||
if c.isalpha(): | ||
r += c | ||
else: | ||
r += '_' | ||
return r | ||
|
||
driver = webdriver.Firefox() | ||
|
||
output = subprocess.check_output(['find', 'build', '-name', '*.html']).decode('utf8') | ||
for i, p in enumerate(output.splitlines()): | ||
n = os.path.relpath(p, 'build') | ||
url_dev = f'http://localhost:3000/{n}' | ||
url_ref = f'https://docs.wire.com/{n}' | ||
img_basename = sanitize_name(n) + '_' + str(i) | ||
|
||
try: | ||
print(f'./screenshots/{i:03}-{img_basename}_dev.png') | ||
driver.get(url_dev) | ||
driver.get_full_page_screenshot_as_file(f'./screenshots/{i:03}-{img_basename}_dev.png') | ||
print(url_ref) | ||
driver.get(url_ref) | ||
driver.get_full_page_screenshot_as_file(f'./screenshots/{i:03}-{img_basename}_ref.png') | ||
except: | ||
pass | ||
|
||
driver.close() | ||
|
||
|
||
|
||
# assert "Python" in driver.title | ||
# elem = driver.find_element(By.NAME, "q") | ||
# elem.clear() | ||
# elem.send_keys("pycon") | ||
# elem.send_keys(Keys.RETURN) | ||
# assert "No results found." not in driver.page_source | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
(pkgs.buildFHSUserEnv { | ||
name = "pipzone"; | ||
targetPkgs = pkgs: (with pkgs; [ | ||
python3 | ||
python3Packages.pip | ||
python3Packages.virtualenv | ||
]); | ||
runScript = "bash"; | ||
}).env | ||
|
||
# then | ||
# virtualenv venv | ||
# pip install rst-to-myst | ||
# Fix this bug locally: https://github.com/executablebooks/rst-to-myst/issues/49 | ||
# pip install sphinx-reredirects | ||
# pip install sphinx-multiversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Developer | ||
|
||
```{toctree} | ||
:caption: 'Contents:' | ||
:glob: true | ||
:numbered: true | ||
:titlesonly: true | ||
|
||
** | ||
``` |
This file was deleted.
Oops, something went wrong.
20 changes: 10 additions & 10 deletions
20
docs/src/developer/index.rst → docs/src/developer/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
Notes for developers | ||
==================== | ||
# Notes for developers | ||
|
||
If you are an on-premise operator (administrating your own self-hosted installation of wire-server), you may want to go back to `docs.wire.com <https://docs.wire.com/>`_ and ignore this section of the docs. | ||
If you are an on-premise operator (administrating your own self-hosted installation of wire-server), you may want to go back to [docs.wire.com](https://docs.wire.com/) and ignore this section of the docs. | ||
|
||
If you are a wire end-user, please check out our `support pages <https://support.wire.com/>`_. | ||
If you are a wire end-user, please check out our [support pages](https://support.wire.com/). | ||
|
||
What you need to know as a user of the Wire backend: concepts, features, | ||
and API. We want to keep these up to date. They could benefit from some | ||
re-ordering, and they are far from complete, but we hope they will still | ||
help you. | ||
|
||
.. toctree:: | ||
:titlesonly: | ||
:caption: Contents: | ||
:glob: | ||
```{toctree} | ||
:caption: 'Contents:' | ||
:glob: true | ||
:titlesonly: true | ||
|
||
developer/index.rst | ||
reference/index.rst | ||
developer/index.rst | ||
reference/index.rst | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Reference | ||
|
||
```{toctree} | ||
:caption: 'Contents:' | ||
:glob: true | ||
:numbered: true | ||
:titlesonly: true | ||
|
||
** | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Cassandra | ||
|
||
```{eval-rst} | ||
.. include:: includes/intro.rst | ||
``` | ||
|
||
This section only covers the bare minimum, for more information, see the [cassandra | ||
documentation](https://cassandra.apache.org/doc/latest/) | ||
|
||
(check-the-health-of-a-cassandra-node)= | ||
|
||
## Check the health of a Cassandra node | ||
|
||
To check the health of a Cassandra node, run the following command: | ||
|
||
```sh | ||
ssh <ip of cassandra node> /opt/cassandra/bin/nodetool status | ||
``` | ||
|
||
or if you are running a newer version of wire-server (altough it should be backwards compatibile) | ||
|
||
```sh | ||
ssh <ip of cassandra node> /opt/cassandra/bin/nodetool -h ::FFFF:127.0.0.1 status | ||
``` | ||
|
||
You should see a list of nodes like this: | ||
|
||
```sh | ||
Datacenter: datacenter1 | ||
======================= | ||
Status=Up/Down | ||
|/ State=Normal/Leaving/Joining/Moving | ||
-- Address Load Tokens Owns (effective) Host ID Rack | ||
UN 192.168.220.13 9.51MiB 256 100.0% 3dba71c8-eea7-4e35-8f35-4386e7944894 rack1 | ||
UN 192.168.220.23 9.53MiB 256 100.0% 3af56f1f-7685-4b5b-b73f-efdaa371e96e rack1 | ||
UN 192.168.220.33 9.55MiB 256 100.0% RANDOMLY-MADE-UUID-GOES-INTHISPLACE! rack1 | ||
``` | ||
|
||
A `UN` at the begginng of the line, refers to a node that is `Up` and `Normal`. | ||
|
||
## How to inspect tables and data manually | ||
|
||
```sh | ||
cqlsh | ||
# from the cqlsh shell | ||
describe keyspaces | ||
use <keyspace>; | ||
describe tables; | ||
select * from <tablename> WHERE <primarykey>=<some-value> LIMIT 10; | ||
``` | ||
|
||
## How to rolling-restart a cassandra cluster | ||
|
||
For maintenance you may need to restart the cluster. | ||
|
||
On each server one by one: | ||
|
||
1. check your cluster is healthy: `nodetool status` or `nodetool -h ::FFFF:127.0.0.1 status` (in newer versions) | ||
2. `nodetool drain && systemctl stop cassandra` (to stop accepting writes and flush data to disk; then stop the process) | ||
3. do any operation you need, if any | ||
4. Start the cassandra daemon process: `systemctl start cassandra` | ||
5. Wait for your cluster to be healthy again. | ||
6. Do the same on the next server. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These links are for people who may have bookmarked old URLs, they then get a redirect and the old links still work.
I'm not sure how important this is; but it's certainly nice user experience if previous links someone may have saved/bookmarked still work. Perhaps we should add a comment here for the next person stumbling over this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this, since
how-to-/single-sign-on/index
now points to https://docs.wire.com/how-to/single-sign-on/index.html which is a nice index of all thing sso I thought it's okay enough