|
1 | 1 | # Discord moderation bot
|
2 | 2 |
|
3 |
| -* Source code: [rust-lang-nursery/discord-mods-bot][repo] |
4 |
| -* Hosted on: [`bots.infra.rust-lang.org`][rust-bots] (behind the bastion -- [how to connect][bastion-connect]) |
| 3 | +* Source code: [rust-lang/discord-mods-bot][repo] |
| 4 | +* Hosted on: [`rust-ecs-prod` ECS cluster][ecs] |
5 | 5 | * Maintainers: [technetos]
|
6 | 6 |
|
7 |
| -## Service configuration |
| 7 | +The bot is hosted on the `rust-ecs-prod` ECS cluster, on the project's AWS |
| 8 | +account, with the `discord-mods-bot` service name. Its container image is |
| 9 | +stored in a ECR repository with the same name, and its data is stored in the |
| 10 | +`shared` RDS PostgreSQL instance. |
8 | 11 |
|
9 |
| -The service uses a PostgreSQL database called `discord_mods_bot` hosted on the |
10 |
| -same server, and connects to it with the `discord_mods_bot` user. Backups are |
11 |
| -not yet setup for the database contents. |
| 12 | +Automatic deploys are setup from the [rust-lang/discord-mods-bot][repo] GitHub |
| 13 | +repository. |
12 | 14 |
|
13 |
| -The service is run with docker-compose on the home of the `ec2-user` user, and |
14 |
| -its docker image is hosted on ECR. The image is automatically rebuilt by the |
15 |
| -git repository's CI every time a new commit is pushed to master. |
16 |
| - |
17 |
| -The server doesn't expose anything to the outside, as it uses websockets to |
18 |
| -communicate with Discord. |
19 |
| - |
20 |
| -The bot is [`rustbot#4299`][devportal]. [pietroalbini], [Mark-Simulacrum], |
21 |
| -[alexcrichton] and [aidanhs] have access to the developer portal. |
| 15 | +The Discord bot account is [`rustbot#4299`][devportal]. [pietroalbini], |
| 16 | +[Mark-Simulacrum], [alexcrichton] and [aidanhs] have access to the developer |
| 17 | +portal. |
22 | 18 |
|
23 | 19 | ## Common maintenance procedures
|
24 | 20 |
|
25 |
| -### Deploying changes to the bot |
26 |
| - |
27 |
| -Once the CI build on the `master` branch of [the repo][repo] ends you can SSH |
28 |
| -into the server and run this command: |
29 |
| - |
30 |
| -``` |
31 |
| -./redeploy |
32 |
| -``` |
33 |
| - |
34 |
| -The command might also redeploy other services hosted on the same server. |
| 21 | +[Instructions on how to manage ECS services are available here.][ecs] |
35 | 22 |
|
36 |
| -[repo]: https://github.com/rust-lang-nursery/discord-mods-bot |
37 |
| -[rust-bots]: https://github.com/rust-lang/infra-team/blob/master/docs/hosts/rust-bots.md |
38 |
| -[bastion-connect]: https://github.com/rust-lang/infra-team/blob/master/docs/hosts/bastion.md#logging-into-servers-through-the-bastion |
| 23 | +[repo]: https://github.com/rust-lang/discord-mods-bot |
| 24 | +[ecs]: ecs-services.md |
39 | 25 | [devportal]: https://discordapp.com/developers/applications/615806512790503424
|
40 | 26 | [technetos]: https://github.com/technetos
|
41 | 27 | [pietroalbini]: https://github.com/pietroalbini
|
|
0 commit comments