Skip to content

Commit

Permalink
Merge pull request #30 from hacklab-fi/fix_links_bit_restructuring
Browse files Browse the repository at this point in the history
fix external plain links, restructure a bit
  • Loading branch information
tswfi authored Dec 11, 2023
2 parents e6f8e1d + 8b2b509 commit 4e01aba
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 28 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# IT-infra

Document hacklab.fi common use infra

## Matrix server

Documentation for hacklab.fi usage, Matrix-server and other things

This repository is source, actual site is here:
Expand Down
4 changes: 3 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Summary

[Readme](./readme.md)

- [Matrix](./matrix/general.md)
- [Discord](./matrix/discord.md)
- [Facebook](./matrix/facebook.md)
Expand All @@ -9,4 +11,4 @@
- [Telegram](./matrix/telegram.md)
- [Whatsapp](./matrix/whatsapp.md)
- [Hookshot](./matrix/hookshot.md)
- [Server Admin minutes](./Server-admin-minutes.md)
- [Sysops](./sysops/general.md)
2 changes: 1 addition & 1 deletion src/matrix/discord.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ An Matrix<->Discord bridge for receiving and sending Discord messages with Matri
- Invite the bridge to your Discord server using the link. The bridge will need all the permissions selected.
- Invite `@_discord_bot:hacklab.fi` to your Matrix room. The bot should have permissions to invite users.
- Open the text channel you'd like to bridge in the Discord web application.
- In the address bar there should be a URL like https://discordapp.com/channels/ServerID/ChannelID
- In the address bar there should be a URL like `https://discordapp.com/channels/ServerID/ChannelID`
- Use that as a reference to say in your Matrix room `!discord bridge ServerID ChannelID`
- The bridge will ask for confirmation on Discord side, and after approved your room should be bridged to Discord.
4 changes: 2 additions & 2 deletions src/matrix/facebook.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Matrix<->Facebook bridge

Up to date info about Mautrix-facebook itself: https://docs.mau.fi/bridges/python/facebook/index.html
Up to date info about Mautrix-facebook itself: <https://docs.mau.fi/bridges/python/facebook/index.html>

## What?

Expand All @@ -19,7 +19,7 @@ An Matrix<->Facebook bridge for receiving and sending Facebook messages with Mat

You can replace the Matrix puppet of your Messenger account with your Matrix account. When you do so, messages that you send from other Messenger clients will be sent from your Matrix account instead of the default puppet user.

How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method.
How to get virgin Access-token: Use <https://gitlab.com/vurpo/matrix-login/> for currently most effortless method.

As with the Messenger account login, you must do this in a private chat with the bridge bot.

Expand Down
4 changes: 2 additions & 2 deletions src/matrix/gmessages.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Matrix<->Google Messages bridge

Up to date info about Mautrix-gmessages itself: https://docs.mau.fi/bridges/go/gmessages/index.html
Up to date info about Mautrix-gmessages itself: <https://docs.mau.fi/bridges/go/gmessages/index.html>

## What?

Expand All @@ -23,7 +23,7 @@ This bridge uses the GMessages API, so your phone must be connected to the inter

You can replace the Matrix puppet of your GMessages account with your Matrix account. When you do so, messages sent with GMessages app should be seen normally on Matrix-side.

How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method.
How to get virgin Access-token: Use <https://gitlab.com/vurpo/matrix-login/> for currently most effortless method.

As with the GMessages account login, you must do this in a private chat with the bridge bot.

Expand Down
10 changes: 5 additions & 5 deletions src/matrix/hookshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Github, Gitlab, Jira and generic webhooks!

https://matrix-org.github.io/matrix-hookshot/latest/hookshot.html
<https://matrix-org.github.io/matrix-hookshot/latest/hookshot.html>

https://github.com/matrix-org/matrix-hookshot
<https://github.com/matrix-org/matrix-hookshot>

## What?

Expand Down Expand Up @@ -65,7 +65,7 @@ And to remove a feed

Github has a github app registered for us `Hacklab.fi Matrix Hookshot` to use for the integration (@tsw:hacklab.fi, github username tswfi is the owner)

Install the app https://github.com/apps/hacklab-fi-matrix-hookshot into your account / organisation you want to use with hookshot.
Install the app <https://github.com/apps/hacklab-fi-matrix-hookshot> into your account / organisation you want to use with hookshot.

To login to your github account talk with `@hookshot:hacklab.fi` and check with `github status` if you are already logged in and with `github login` you can complete oauth with github.

Expand All @@ -89,7 +89,7 @@ Closing an issue

Hookshot github app will also push changes to the channel. Managing what to show is defined in the room state. TODO: document how to change these:

Check all the available options in https://matrix-org.github.io/matrix-hookshot/latest/usage/room_configuration/github_repo.html#configuration
Check all the available options in <https://matrix-org.github.io/matrix-hookshot/latest/usage/room_configuration/github_repo.html#configuration>

## How it was installed

Expand All @@ -105,7 +105,7 @@ sudo apt install curl build-essential gcc make
sudo apt install build-essential libssl-dev
```

basic steps for creating the user, installing necessary stuff and so on (note, the curl commands are taken from https://github.com/nvm-sh/nvm#installing-and-updating and https://rustup.rs/)
basic steps for creating the user, installing necessary stuff and so on (note, the curl commands are taken from <https://github.com/nvm-sh/nvm#installing-and-updating> and <https://rustup.rs/>)

### Create user

Expand Down
6 changes: 4 additions & 2 deletions src/matrix/signal.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Matrix<->Signal bridge

Up to date info about Mautrix-signal itself: https://docs.mau.fi/bridges/python/signal/index.html
Up to date info about Mautrix-signal itself: <https://docs.mau.fi/bridges/python/signal/index.html>

## What?

An Matrix<->signal bridge for receiving and sending signal messages with Matrix-client, bridging groupchats, puppeting.. At the time of writing still pretty early version, but basic functionality exist and should work, like start chat from matrix, using as primary or linked device (signal stuff), direct messaging and group chats

## Set up

- On matrix: Open chat with `@signalbot:hacklab.fi`
- Issue _either_
- `link [device name]` to link the bridge as a secondary device
Expand All @@ -15,7 +17,7 @@ An Matrix<->signal bridge for receiving and sending signal messages with Matrix-

You can replace the Matrix puppet of your Signal account with your Matrix account. When you do so, messages that you send from other Signal clients will be sent from your Matrix account instead of the default puppet user.

How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method.
How to get virgin Access-token: Use <https://gitlab.com/vurpo/matrix-login/> for currently most effortless method.

As with the Signal account login, you must do this in a private chat with the bridge bot.

Expand Down
9 changes: 5 additions & 4 deletions src/matrix/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
## Mautrix-slack:
Mautrix-slack (puppeting bridge, channel bridging is not available), Mautrix-slack is recommended for new setups, Appservice-slack is deprecated.

Up to date info about Mautrix-slack itself: https://docs.mau.fi/bridges/go/slack/index.html
Up to date info about Mautrix-slack itself: <https://docs.mau.fi/bridges/go/slack/index.html>

## What?

An Matrix<->Slack bridge for individial using Slack through Matrix.

## Set up
- General setup finds from: https://docs.mau.fi/bridges/go/slack/authentication.html
- General setup finds from: <https://docs.mau.fi/bridges/go/slack/authentication.html>
- Ask details Matrix-channel: `#general:hacklab.fi` if unsure.

## Appservice-slack (deprecated)
Up to date info about matrix-appservice-slack itself: https://github.com/matrix-org/matrix-appservice-slack

Up to date info about matrix-appservice-slack itself: <https://github.com/matrix-org/matrix-appservice-slack>

## What?

Expand All @@ -24,7 +25,7 @@ An Matrix<->Slack bridge for bridging Slack-room to Matrix-room; puppets Slack-u

You can replace the Matrix puppet of your Slack account with your Matrix account. When you do so, messages that you send from other Slack clients will be sent from your Matrix account instead of the default puppet user.

How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method.
How to get virgin Access-token: Use <https://gitlab.com/vurpo/matrix-login/> for currently most effortless method.

As with the Slack account login, you must do this in a private chat with the bridge bot.

Expand Down
4 changes: 2 additions & 2 deletions src/matrix/telegram.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Matrix<->Telegram bridge

Up to date info about Mautrix-telegram itself: https://docs.mau.fi/bridges/python/telegram/index.html
Up to date info about Mautrix-telegram itself: <https://docs.mau.fi/bridges/python/telegram/index.html>

## What?

Expand All @@ -20,7 +20,7 @@ You can replace the Matrix puppet of your Telegram account with your Matrix acco

As with the Telegram account login, you must do this in a private chat with the bridge bot.

How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method.
How to get virgin Access-token: Use <https://gitlab.com/vurpo/matrix-login/> for currently most effortless method.

- Log in with `login-matrix <access token>`
- After logging in, the default Matrix puppet of your Telegram account should leave rooms and your account should join all rooms the puppet was in automatically.
Expand Down
4 changes: 2 additions & 2 deletions src/matrix/whatsapp.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Matrix<->Whatsapp bridge

Up to date info about Mautrix-whatsapp itself: https://docs.mau.fi/bridges/go/whatsapp/index.html
Up to date info about Mautrix-whatsapp itself: <https://docs.mau.fi/bridges/go/whatsapp/index.html>

## What?

Expand All @@ -24,7 +24,7 @@ There also exist instructions how to run Android in virtual machine so you could

You can replace the Matrix puppet of your Whatsapp account with your Matrix account. When you do so, messages that you send from other Whatsapp clients will be sent from your Matrix account instead of the default puppet user.

How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method.
How to get virgin Access-token: Use <https://gitlab.com/vurpo/matrix-login/> for currently most effortless method.

As with the Whatsapp account login, you must do this in a private chat with the bridge bot.

Expand Down
12 changes: 12 additions & 0 deletions src/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Hacklab IT Infra documentation

This site contains documentation for Hacklab IT services for both users and for sysops.

Site is WIP and more information will be added as time permits.

* [Matrix](/matrix/general.html)
* TODO: [DNS](/dns/general.html)
* TODO: [Websites](/websites/general.html)
* TODO: [Jitsi](/jitsi/general.html)
* TODO: [Discourse](/websites/general.html)
* [Sysops](/sysops/general.html)
26 changes: 19 additions & 7 deletions src/Server-admin-minutes.md → src/sysops/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,36 @@

We use /opt/ for base home folder for system users, give it nologin as shell, etc

`sudo useradd --shell /usr/sbin/nologin --system --user-group --create-home --comment "Service longname" --home-dir /opt/servicehomedir username`
```bash
sudo useradd --shell /usr/sbin/nologin \
--system --user-group \
--create-home \
--comment "Service longname" \
--home-dir /opt/servicehomedir username
```

# Getting shell as system user for admin to do thing as the user
`sudo -Hu username /bin/bash -l`

```bash
sudo -Hu username /bin/bash -l
```

Same can be used to run psql on postgres user directly
`sudo -Hu postgres psql`

```bash
sudo -Hu postgres psql
```

# Software installations

We've used apt repositories where possible and rest is "directly on the host" installations, following given documentation per bot or automaton, provides update instructions too

Links to most of them:

mautrix-bridges: https://docs.mau.fi/bridges/index.html
mx-puppet-discord: https://github.com/matrix-discord/mx-puppet-discord
appservice-slack: https://matrix-appservice-slack.readthedocs.io/en/latest/getting_started/
heisenbridge: https://github.com/hifi/heisenbridge
* mautrix-bridges: <https://docs.mau.fi/bridges/index.html>
* mx-puppet-discord: <https://github.com/matrix-discord/mx-puppet-discord>
* appservice-slack: <https://matrix-appservice-slack.readthedocs.io/en/latest/getting_started/>
* heisenbridge: <https://github.com/hifi/heisenbridge>

# SSH related

Expand Down

0 comments on commit 4e01aba

Please sign in to comment.