From 7c222835be5eb22561affe3cae77f020d6afd53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 13:11:13 +0100 Subject: [PATCH 01/22] Lay foundation for GoToSocial --- docs/services/gotosocial.md | 42 +++++++++++++++++++++++++++++++++ group_vars/mash_servers | 47 +++++++++++++++++++++++++++++++++++++ setup.yml | 2 ++ 3 files changed, 91 insertions(+) create mode 100644 docs/services/gotosocial.md diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md new file mode 100644 index 0000000..f149942 --- /dev/null +++ b/docs/services/gotosocial.md @@ -0,0 +1,42 @@ +# GoToSocial + +[GoToSocial](https://gotosocial.org/) is a self-hosted [ActivityPub](https://activitypub.rocks/) social network server, that this playbook can install, powered by the [moan0s/role-gotosocial](https://github.com/moan0s/role-gotosocial) Ansible role. + +## Configuration + +To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process: + +```yaml +######################################################################## +# # +# gotosocial # +# # +######################################################################## + +gotosocial_enabled: true +gotosocial_hostname: 'social.example.org' + +######################################################################## +# # +# /gotosocial # +# # +######################################################################## +``` + +After installation, you can use `just run-tags firezone-create-or-reset-admin` any time to: +- create the configured admin account +- or, reset the password to the current password configured in `vars.yml` + +### Networking + +By default, the following ports will be exposed by the container on **all network interfaces**: + +- `51820` over **UDP**, controlled by `firezone_wireguard_bind_port` - used for [Wireguard](https://en.wikipedia.org/wiki/WireGuard) connections + +Docker automatically opens these ports in the server's firewall, so you **likely don't need to do anything**. If you use another firewall in front of the server, you may need to adjust it. + +### Usage + +After [installing](../installing.md), you can login at the URL specified in `firezone_hostname`, with the credentials set in `firezone_default_admin_email` and `firezone_default_admin_password`. + +Refer to the [official documentation](https://www.firezone.dev/docs/user-guides/add-devices/) to figure out how to add devices, etc. diff --git a/group_vars/mash_servers b/group_vars/mash_servers index bf4d12b..9e1c469 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -1348,3 +1348,50 @@ firezone_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certReso # /firezone # # # ######################################################################## + + +######################################################################## +# # +# gotsocial # +# # +######################################################################## + +gotosocial_enabled: false + +gotosocial_identifier: "{{ mash_playbook_service_identifier_prefix }}gotosocial" + +gotosocial_base_path: "{{ mash_playbook_base_path }}/gotosocial" + +gotosocial_uid: "{{ mash_playbook_uid }}" +gotosocial_gid: "{{ mash_playbook_gid }}" + +gotosocial_database_host: "{{ devture_postgres_identifier if devture_postgres_enabled else '' }}" +gotosocial_database_port: "{{ '5432' if devture_postgres_enabled else '' }}" +gotosocial_database_name: "{{ gotosocial_identifier }}" +gotosocial_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.gotosocial', rounds=655555) | to_uuid }}" +gotosocial_database_user: "{{ gotosocial_identifier }}" + +gotosocial_systemd_required_services_list: | + {{ + (['docker.service']) + + + ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and gotosocial_database_host == devture_postgres_identifier else []) + }} + +gotosocial_container_additional_networks: | + {{ + ([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else []) + + + ([devture_postgres_container_network] if devture_postgres_enabled and gotosocial_database_host == devture_postgres_identifier and gotosocial_container_network != devture_postgres_container_network else []) + }} + +gotosocial_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}" +gotosocial_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}" +gotosocial_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}" +gotosocial_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}" + +######################################################################## +# # +# /gotosocial # +# # +######################################################################## diff --git a/setup.yml b/setup.yml index 4413310..14173b7 100644 --- a/setup.yml +++ b/setup.yml @@ -66,6 +66,8 @@ - role: galaxy/gitea + - role: galaxy/gotosocial + - role: galaxy/grafana - role: galaxy/miniflux From 1b5d5bfeeb36e8de6a0b9b19b80a01d386afef1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 15:35:53 +0100 Subject: [PATCH 02/22] Add GotoSocial --- docs/services/gotosocial.md | 24 +++++++++++------------- group_vars/mash_servers | 8 +++++++- requirements.yml | 4 ++++ 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index f149942..195c81c 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -23,20 +23,18 @@ gotosocial_hostname: 'social.example.org' ######################################################################## ``` -After installation, you can use `just run-tags firezone-create-or-reset-admin` any time to: -- create the configured admin account -- or, reset the password to the current password configured in `vars.yml` - -### Networking - -By default, the following ports will be exposed by the container on **all network interfaces**: - -- `51820` over **UDP**, controlled by `firezone_wireguard_bind_port` - used for [Wireguard](https://en.wikipedia.org/wiki/WireGuard) connections - -Docker automatically opens these ports in the server's firewall, so you **likely don't need to do anything**. If you use another firewall in front of the server, you may need to adjust it. +After installation, you can use `ansible-playbook -i inventory/hosts setup.yml --tags=gotosocial-add-user --extra-vars "username= email= password="` +to create your a user. Change `--tags=gotosocial-add-user` to `--tags=gotosocial-add-admin` to create an admin account. ### Usage -After [installing](../installing.md), you can login at the URL specified in `firezone_hostname`, with the credentials set in `firezone_default_admin_email` and `firezone_default_admin_password`. +After [installing](../installing.md), you can visti at the URL specified in `firezone_hostname` and should see your instance. +Start to customize it at `social.example.org/admin`. -Refer to the [official documentation](https://www.firezone.dev/docs/user-guides/add-devices/) to figure out how to add devices, etc. +Use the [GtS CLI Tool](https://docs.gotosocial.org/en/latest/admin/cli/) to do admin & maintenance tasks. E.g. use +```bash +docker exec -it mash-gotosocial /gotosocial/gotosocial admin account demote --username +``` +to demote a user from admin to normal user. + +Refer to the [great official documentation](https://docs.gotosocial.org/en/latest/) for more information on GoToSocial. diff --git a/group_vars/mash_servers b/group_vars/mash_servers index 9e1c469..41af26a 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -174,6 +174,12 @@ devture_postgres_managed_databases_auto: | 'password': devture_woodpecker_ci_server_database_datasource_password, }] if devture_woodpecker_ci_server_enabled else []) + + ([{ + 'name': gotosocial_database_name, + 'username': gotosocial_database_username, + 'password': gotosocial_database_password, + }] if gotosocial_enabled else []) + + ([{ 'name': miniflux_database_name, 'username': miniflux_database_username, @@ -1369,7 +1375,7 @@ gotosocial_database_host: "{{ devture_postgres_identifier if devture_postgres_en gotosocial_database_port: "{{ '5432' if devture_postgres_enabled else '' }}" gotosocial_database_name: "{{ gotosocial_identifier }}" gotosocial_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.gotosocial', rounds=655555) | to_uuid }}" -gotosocial_database_user: "{{ gotosocial_identifier }}" +gotosocial_database_username: "{{ gotosocial_identifier }}" gotosocial_systemd_required_services_list: | {{ diff --git a/requirements.yml b/requirements.yml index 5666498..214219a 100644 --- a/requirements.yml +++ b/requirements.yml @@ -130,3 +130,7 @@ - src: git+https://github.com/moan0s/role-firezone.git name: firezone version: 260f0049ea07e1a39df7cf118b267c15477f70be + +- src: git+https://github.com/moan0s/role-gotosocial.git + name: gotosocial + version: 837b94371e6d8629a8c5a659c6362fc678f775ef From e3543beb1dfc9d9c6a37fbc16b7127a2e0d5c0d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 15:47:34 +0100 Subject: [PATCH 03/22] Add GotoSocial to systemd service list --- group_vars/mash_servers | 2 ++ 1 file changed, 2 insertions(+) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index 41af26a..d63667a 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -120,6 +120,8 @@ devture_systemd_service_manager_services_list_auto: | ([{'name': (hubsite_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'hubsite']}] if hubsite_enabled else []) + ([{'name': (firezone_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'firezone']}] if firezone_enabled else []) + + + ([{'name': (gotosocial_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'gotosocial']}] if gotosocial_enabled else []) }} ######################################################################## From 5516c5769744b6f36ae0227550ec7a7fdbf07703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 15:54:43 +0100 Subject: [PATCH 04/22] docs: Add gotosocial to supported services --- docs/supported-services.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/supported-services.md b/docs/supported-services.md index ac2aa9b..c78d14a 100644 --- a/docs/supported-services.md +++ b/docs/supported-services.md @@ -11,6 +11,7 @@ | [Focalboard](https://www.focalboard.com/) | An open source, self-hosted alternative to [Trello](https://trello.com/), [Notion](https://www.notion.so/), and [Asana](https://asana.com/). | [Link](services/focalboard.md) | | [Firezone](https://www.firezone.dev/) | A self-hosted VPN server (based on [WireGuard](https://en.wikipedia.org/wiki/WireGuard)) with a Web UI | [Link](services/firezone.md) | | [Gitea](https://gitea.io/) | A painless self-hosted Git service. | [Link](services/gitea.md) | +| [GotoSocial](https://gotosocial.org/) | [GoToSocial](https://gotosocial.org/) is a self-hosted [ActivityPub](https://activitypub.rocks/) social network server | [Link](services/gotosocial.md) | | [Grafana](https://grafana.com/) | An open and composable observability and data visualization platform, often used with [Prometheus](services/prometheus.md) | [Link](services/grafana.md) | | [Hubsite](https://github.com/moan0s/hubsite) | A simple, static site that shows an overview of the available services | [Link](services/hubsite.md) | | [Miniflux](https://miniflux.app/) | Minimalist and opinionated feed reader. | [Link](services/miniflux.md) | From 1487e8ad17812ee637ae4a2ab8efd336ad906120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 17:10:22 +0100 Subject: [PATCH 05/22] chore: Bump gts role version, always creates label, change role location to mash --- requirements.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.yml b/requirements.yml index 9aef5be..ade7763 100644 --- a/requirements.yml +++ b/requirements.yml @@ -131,6 +131,6 @@ name: firezone version: ac8564d5e11a75107ba93aec6427b83be824c30a -- src: git+https://github.com/moan0s/role-gotosocial.git +- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-gotosocial.git name: gotosocial - version: 837b94371e6d8629a8c5a659c6362fc678f775ef + version: 955e59bf610c4ab1de44240ea09fe4766d140ed7 From 2573c3c385f8e136f91988e10e4693fe18051d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 18:55:55 +0100 Subject: [PATCH 06/22] chore: Bump gts role version * Add gotosocial_container_http_port * Use var for docker base command * Add identifier to service * Remove hardcoded uid/gid * Add option to expose gotosocial 8080 port to host * Formatting: identation * Formatting: newline * Remove unused setting * Use identifier for traefik too * Remove uneccessary var (copy artifact) * Add container registry options --- requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index ade7763..2385f8c 100644 --- a/requirements.yml +++ b/requirements.yml @@ -133,4 +133,4 @@ - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-gotosocial.git name: gotosocial - version: 955e59bf610c4ab1de44240ea09fe4766d140ed7 + version: 525a7a934711a57aa7aaccfa71fa27e1cc3f9fbf From 1605ca2539b37f325c21cff0ffdb75c967d23ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 19:33:48 +0100 Subject: [PATCH 07/22] chore: Bump gts role version * Add http security headers * Extend traefik configuarability * Use port --- requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index 2385f8c..33757ce 100644 --- a/requirements.yml +++ b/requirements.yml @@ -133,4 +133,4 @@ - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-gotosocial.git name: gotosocial - version: 525a7a934711a57aa7aaccfa71fa27e1cc3f9fbf + version: 883bc23dcd0df782505a58f50c53c984e739ebbd From fc4f415d961c08ebf20cd9587121bf86bdadaa2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 20:55:22 +0100 Subject: [PATCH 08/22] Add GoToSocial to hubsite --- group_vars/mash_servers | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index adca8de..8f0edc6 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -1248,6 +1248,14 @@ hubsite_service_gitea_logo_location: "{{ role_path }}/assets/gitea.png" hubsite_service_gitea_description: "A git service" hubsite_service_gitea_priority: 1000 +# GoToSocial +hubsite_service_gotosocial_enabled: "{{ gotosocial_enabled }}" +hubsite_service_gotosocial_name: GoToSocial +hubsite_service_gotosocial_url: "https://{{ gotosocial_hostname }}" +hubsite_service_gotosocial_logo_location: "{{ role_path }}/assets/gotosocial.png" +hubsite_service_gotosocial_description: "A fediverse server" +hubsite_service_gotosocial_priority: 1000 + # Miniflux hubsite_service_miniflux_enabled: "{{ miniflux_enabled }}" hubsite_service_miniflux_name: Miniflux @@ -1293,6 +1301,8 @@ hubsite_service_list_auto: | {{ ([{'name': hubsite_service_gitea_name, 'url': hubsite_service_gitea_url, 'logo_location': hubsite_service_gitea_logo_location, 'description': hubsite_service_gitea_description, 'priority': hubsite_service_gitea_priority}] if hubsite_service_gitea_enabled else []) + + ([{'name': hubsite_service_gotosocial_name, 'url': hubsite_service_gotosocial_url, 'logo_location': hubsite_service_gotosocial_logo_location, 'description': hubsite_service_gotosocial_description, 'priority': hubsite_service_gotosocial_priority}] if hubsite_service_gotosocial_enabled else []) + + ([{'name': hubsite_service_miniflux_name, 'url': hubsite_service_miniflux_url, 'logo_location': hubsite_service_miniflux_logo_location, 'description': hubsite_service_miniflux_description, 'priority': hubsite_service_miniflux_priority}] if hubsite_service_miniflux_enabled else []) + ([{'name': hubsite_service_nextcloud_name, 'url': hubsite_service_nextcloud_url, 'logo_location': hubsite_service_nextcloud_logo_location, 'description': hubsite_service_nextcloud_description, 'priority': hubsite_service_nextcloud_priority}] if hubsite_service_nextcloud_enabled else []) From e124241e1a40c8f627578de7052a8e5dc9d8daeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 21:00:52 +0100 Subject: [PATCH 09/22] Bump hubsite version to include gts logo --- requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index 33757ce..2c2fb8b 100644 --- a/requirements.yml +++ b/requirements.yml @@ -125,7 +125,7 @@ - src: git+https://github.com/moan0s/hubsite.git name: hubsite - version: da6fed398a9dd0761db941cb903b53277c341cc6 + version: b64a45e4b9e01a773598a9a753dcd2dff1179c1b - src: git+https://github.com/moan0s/role-firezone.git name: firezone From 94d0e1414b0e6c91ff751eb17c251f354df86c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 23:51:37 +0100 Subject: [PATCH 10/22] Adjust role path --- docs/services/gotosocial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index 195c81c..f93f941 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -1,6 +1,6 @@ # GoToSocial -[GoToSocial](https://gotosocial.org/) is a self-hosted [ActivityPub](https://activitypub.rocks/) social network server, that this playbook can install, powered by the [moan0s/role-gotosocial](https://github.com/moan0s/role-gotosocial) Ansible role. +[GoToSocial](https://gotosocial.org/) is a self-hosted [ActivityPub](https://activitypub.rocks/) social network server, that this playbook can install, powered by the [mother-of-all-self-hosting/ansible-role-gotosocial](https://github.com/mother-of-all-self-hosting/ansible-role-gotosocial) Ansible role. ## Configuration From d346fd1c0b6cae24b682689ece125ed4001b51d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Sat, 25 Mar 2023 09:13:45 +0100 Subject: [PATCH 11/22] Fix domain variable --- requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index 2c2fb8b..12f6b89 100644 --- a/requirements.yml +++ b/requirements.yml @@ -133,4 +133,4 @@ - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-gotosocial.git name: gotosocial - version: 883bc23dcd0df782505a58f50c53c984e739ebbd + version: 148933d390a2a789ee4595a593d825e64d5e6f46 From b4dfdcf2ff275b63fcdd01246aa8e27b67551f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Sat, 25 Mar 2023 09:15:53 +0100 Subject: [PATCH 12/22] Make use of mash_playbook_service_base_directory_name_prefix --- group_vars/mash_servers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index 8f0edc6..3b2ff5c 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -1378,7 +1378,7 @@ gotosocial_enabled: false gotosocial_identifier: "{{ mash_playbook_service_identifier_prefix }}gotosocial" -gotosocial_base_path: "{{ mash_playbook_base_path }}/gotosocial" +gotosocial_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}gotosocial" gotosocial_uid: "{{ mash_playbook_uid }}" gotosocial_gid: "{{ mash_playbook_gid }}" From b1bf911072988693755f8b8e4cbeb22e37dba3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 29 Mar 2023 10:02:55 +0200 Subject: [PATCH 13/22] Add migration guide --- docs/services/gotosocial.md | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index f93f941..5670cb7 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -38,3 +38,41 @@ docker exec -it mash-gotosocial /gotosocial/gotosocial admin account demote --us to demote a user from admin to normal user. Refer to the [great official documentation](https://docs.gotosocial.org/en/latest/) for more information on GoToSocial. + + +## Migrate an existing instance + +The following assumes you want to migrate from `serverA` to `serverB` (managed by mash) but you just cave to adjust the copy commands if you are on the same server. + +Stop the initial instance on `serverA` + +```bash +serverA$ systemctl stop gotosocial +``` + +Dump the database (depending on your existing setup you might have to adjust this) +``` +serverA$ pg_dump gotosocial > latest.sql +``` + +Copy the files to the new server + +```bash +serverA$ rsync -av -e "ssh" latest.sql root@serverB:/mash/gotosocial/ +serverA$ rsync -av -e "ssh" data/* root@serverB:/mash/gotosocial/data/ +``` + +Install (but don't start) the service and database on the server. + +```bash +yourPC$ ansible-playbook -i inventory/hosts setup.yml --tags=install-all +yourPC$ just run-tags import-postgres --extra-vars=server_path_postgres_dump=/mash/gotosocial/latest.sql --extra-vars=postgres_default_import_database=mash-gotosocial +``` + +Start the services on the new server + +```bash +yourPC$ ansible-playbook -i inventory/hosts setup.yml --tags=install-all +``` + +Done 🥳 From 5e7ab98e025dab3b21a5a6f2020bddc00cd9a868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 29 Mar 2023 10:54:51 +0200 Subject: [PATCH 14/22] Correct command tag --- docs/services/gotosocial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index 5670cb7..ae93152 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -72,7 +72,7 @@ yourPC$ just run-tags import-postgres --extra-vars=server_path_postgres_dump=/ma Start the services on the new server ```bash -yourPC$ ansible-playbook -i inventory/hosts setup.yml --tags=install-all +yourPC$ ansible-playbook -i inventory/hosts setup.yml --tags=start ``` Done 🥳 From c3ac6200a98857296ed5979bb96b9e4f065127db Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 29 Mar 2023 14:14:29 +0300 Subject: [PATCH 15/22] Upgrade Nextcloud (v26.0.0-0 -> v26.0.0-1) --- group_vars/mash_servers | 6 ++---- requirements.yml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index b5cc364..be91cb0 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -831,14 +831,12 @@ nextcloud_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_bas nextcloud_uid: "{{ mash_playbook_uid }}" nextcloud_gid: "{{ mash_playbook_gid }}" -nextcloud_systemd_required_systemd_services_list: | +nextcloud_systemd_required_systemd_services_list_auto: | {{ - (['docker.service']) - + ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and nextcloud_database_hostname == devture_postgres_identifier else []) }} -nextcloud_container_additional_networks: | +nextcloud_container_additional_networks_auto: | {{ ([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else []) + diff --git a/requirements.yml b/requirements.yml index b79a621..b20d641 100644 --- a/requirements.yml +++ b/requirements.yml @@ -85,7 +85,7 @@ version: v3.4.6-2.5.1-0 name: netbox - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-nextcloud.git - version: v26.0.0-0 + version: v26.0.0-1 name: nextcloud - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-peertube.git version: v5.1.0-2 From ea0ab44b876b4b4fc5f8918be666ca158f7b6e3a Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 29 Mar 2023 14:20:18 +0300 Subject: [PATCH 16/22] Upgrade Navidrome (v0.49.3-0 -> v0.49.3-1) --- requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index b20d641..f98f2eb 100644 --- a/requirements.yml +++ b/requirements.yml @@ -79,7 +79,7 @@ version: v21.0.1-1 name: keycloak - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-navidrome.git - version: v0.49.3-0 + version: v0.49.3-1 name: navidrome - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-netbox.git version: v3.4.6-2.5.1-0 From f6cc08b33e294bd3839d2a9ba10da9fa4a7ca546 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 29 Mar 2023 14:23:59 +0300 Subject: [PATCH 17/22] Fix variable typo --- group_vars/mash_servers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index be91cb0..dcd32dc 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -831,7 +831,7 @@ nextcloud_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_bas nextcloud_uid: "{{ mash_playbook_uid }}" nextcloud_gid: "{{ mash_playbook_gid }}" -nextcloud_systemd_required_systemd_services_list_auto: | +nextcloud_systemd_required_services_list_auto: | {{ ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and nextcloud_database_hostname == devture_postgres_identifier else []) }} From 0c5d9b0ae1e7b698bce0b025beb0882abfdb1684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 29 Mar 2023 13:31:17 +0200 Subject: [PATCH 18/22] Use just command --- docs/services/gotosocial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index ae93152..b5d5a54 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -65,14 +65,14 @@ serverA$ rsync -av -e "ssh" data/* root@serverB:/mash/gotosocial/data/ Install (but don't start) the service and database on the server. ```bash -yourPC$ ansible-playbook -i inventory/hosts setup.yml --tags=install-all +yourPC$ just run-tags install-all yourPC$ just run-tags import-postgres --extra-vars=server_path_postgres_dump=/mash/gotosocial/latest.sql --extra-vars=postgres_default_import_database=mash-gotosocial ``` Start the services on the new server ```bash -yourPC$ ansible-playbook -i inventory/hosts setup.yml --tags=start +yourPC$ just run-tags start ``` Done 🥳 From 040a64c29ba6d74a68c7c0eb75d9e203d6032a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 29 Mar 2023 13:42:29 +0200 Subject: [PATCH 19/22] use jsut and correct wrong role prefix --- docs/services/gotosocial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index b5d5a54..893e4f8 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -23,12 +23,12 @@ gotosocial_hostname: 'social.example.org' ######################################################################## ``` -After installation, you can use `ansible-playbook -i inventory/hosts setup.yml --tags=gotosocial-add-user --extra-vars "username= email= password="` +After installation, you can use `just run-tags gotosocial-add-user --extra-vars=username=USERNAME --extra-vars=password=PASSWORD --extra-vars=email="` to create your a user. Change `--tags=gotosocial-add-user` to `--tags=gotosocial-add-admin` to create an admin account. ### Usage -After [installing](../installing.md), you can visti at the URL specified in `firezone_hostname` and should see your instance. +After [installing](../installing.md), you can visti at the URL specified in `gotosocial_hostname` and should see your instance. Start to customize it at `social.example.org/admin`. Use the [GtS CLI Tool](https://docs.gotosocial.org/en/latest/admin/cli/) to do admin & maintenance tasks. E.g. use From 80471fc55ca6b22ce208461d54fe100029adeed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 29 Mar 2023 13:49:44 +0200 Subject: [PATCH 20/22] Add documentation on hostname and domain --- docs/services/gotosocial.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index 893e4f8..5e78e14 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -14,8 +14,21 @@ To enable this service, add the following configuration to your `vars.yml` file ######################################################################## gotosocial_enabled: true + + +# Hostname that this server will be reachable at. +# DO NOT change this after your server has already run once, or you will break things! +# Examples: ["gts.example.org","some.server.com"] gotosocial_hostname: 'social.example.org' +# Domain to use when federating profiles. It defaults to `gotosocial_hostname` but you can cange it when you want your server to be at +# eg., `gotosocial_hostname: gts.example.org`, but you want the domain on accounts to be "example.org" because it looks better +# or is just shorter/easier to remember. +# +# Please read the appropriate section of the installation guide before you go messing around with this setting: +# https://docs.gotosocial.org/installation_guide/advanced/#can-i-host-my-instance-at-fediexampleorg-but-have-just-exampleorg-in-my-username +# gotosocial_account_domain: "example.org" + ######################################################################## # # # /gotosocial # From 92eac9df3bd8e2a710aeea0ca92841183e829476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 29 Mar 2023 13:53:46 +0200 Subject: [PATCH 21/22] Streamline placeholders & typo --- docs/services/gotosocial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index 5e78e14..3558709 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -36,12 +36,12 @@ gotosocial_hostname: 'social.example.org' ######################################################################## ``` -After installation, you can use `just run-tags gotosocial-add-user --extra-vars=username=USERNAME --extra-vars=password=PASSWORD --extra-vars=email="` +After installation, you can use `just run-tags gotosocial-add-user --extra-vars=username= --extra-vars=password= --extra-vars=email="` to create your a user. Change `--tags=gotosocial-add-user` to `--tags=gotosocial-add-admin` to create an admin account. ### Usage -After [installing](../installing.md), you can visti at the URL specified in `gotosocial_hostname` and should see your instance. +After [installing](../installing.md), you can visit at the URL specified in `gotosocial_hostname` and should see your instance. Start to customize it at `social.example.org/admin`. Use the [GtS CLI Tool](https://docs.gotosocial.org/en/latest/admin/cli/) to do admin & maintenance tasks. E.g. use From f08a2077221b9fe9474acefea39adb3f196fb18a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 29 Mar 2023 14:44:38 +0200 Subject: [PATCH 22/22] Rename mash-gotosocial db to gotosocial --- group_vars/mash_servers | 1 - requirements.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index 89f008f..d5e47e9 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -1616,7 +1616,6 @@ gotosocial_gid: "{{ mash_playbook_gid }}" gotosocial_database_host: "{{ devture_postgres_identifier if devture_postgres_enabled else '' }}" gotosocial_database_port: "{{ '5432' if devture_postgres_enabled else '' }}" -gotosocial_database_name: "{{ gotosocial_identifier }}" gotosocial_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.gotosocial', rounds=655555) | to_uuid }}" gotosocial_database_username: "{{ gotosocial_identifier }}" diff --git a/requirements.yml b/requirements.yml index 03c9dc9..534f68d 100644 --- a/requirements.yml +++ b/requirements.yml @@ -104,4 +104,4 @@ name: firezone - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-gotosocial.git name: gotosocial - version: 148933d390a2a789ee4595a593d825e64d5e6f46 + version: d608eb330af28b75d3e4881b2e8c09af64d078f1