spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.76k stars 1.03k forks source link

Google Chat #1289

Open ljlongwing opened 3 years ago

ljlongwing commented 3 years ago

Is there any plans to retire the use of Google Hangouts and replace it with Google Chat? https://github.com/mautrix/googlechat I have hangouts configured and working well, but according to Google, Hangouts is 'going away' and being replaced by Chat....they currently work in tandem with each other, but eventually I expect Hangouts will stop working. Mautrix has a Google Chat bridge that looks to be a replacement for hangouts, so I was hoping you had plans to do this replacement :)

aaronraimist commented 3 years ago

As far as I know it is the same bridge that is already in the playbook. It has just been renamed and updated. https://github.com/mautrix/googlechat/commit/483d3a42ff81f2f895914447d599e681e763d5dc

ljlongwing commented 3 years ago

hmmmm....so, it's just an alias for the same project? Ok...if that's the case then no need to 'replace' it because it's the same thing I guess....but if he's renamed his, should it be renamed in this project?

aaronraimist commented 3 years ago

I think the documentation should definitely be updated but I'm not sure about all of the variables. If they were just straight up changed then it would break the config of everyone currently using the bridge. I guess there would need to be a bunch of variables that translate the name from the old one to the new one.

pszypowicz commented 2 years ago

They indeed just had a 'search and replace' sort of commit, but currently they keep both old prebuild docker images as mautrix-hangouts, as well as new 'mautrix-googlechat'

Do I understand code properly that in master we still point to the old repo: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/b5d84447643ab10c8b66428a1fc9dee75ffaff9c/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml#L11

This would mean that we will not benefit automatically from future updates?

aaronraimist commented 2 years ago

That appears to be correct. You can submit a PR to change it. I don't use that bridge so I can't easily test it and don't want to change something that will break things.

pszypowicz commented 2 years ago

I think it would make sense to introduce a new role - mautrix-googlechat - and it would be basically a similar approach as they did, by simply modifying the keywords and links to new image. We could then inform that mautrix-hangouts is deprecated and anyone could just move to googlechat.

What should the upgrade procedure be:

  1. Removing manually old bridge?
  2. Detect if both old and new bridge is used at the same time and fail?
spantaleev commented 2 years ago

There's probably no need to maintain both roles operational simultaneously and accumulate cruft and cause confusion.

We can just replace the current role with a new role and list a few of its configuration keys in tasks/validate_config.yml, so it would tell you that you need to adjust your vars.yml configuration.

As an example, see how we do it in the Synapse role: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/b5d84447643ab10c8b66428a1fc9dee75ffaff9c/roles/matrix-synapse/tasks/validate_config.yml#L25-L50

It'd be nice if someone who uses this bridge can take care of this "mass replace" migration and test things out properly. I don't use this bridge, so I can't help much.


We should probably also instruct people to rename the old bridge's database, etc. (unless we stick to using the matrix_mautrix_hangouts database). Maybe we should just do this migration at the same time and have a changelog entry to let people know how to cleanly migrate:

  1. Stop the bridge (systemctl stop matrix-mautrix-hangouts)
  2. Use /usr/local/bin/matrix-postgres-cli and run ALTER DATABASE matrix_mautrix_hangouts RENAME TO matrix_mautrix_googlechat;)
  3. Adjust your variables in vars.yml (matrix_mautrix_hangouts_enabled -> matrix_mautrix_googlechat_enabled, etc.)
  4. Re-run the playbook (ansible-playbook ....... --tags=setup-all,start)

We may be able to automate this migration in the role's tasks/setup_install.yml, but it's easier if we just make it manual.

mochman commented 2 years ago

I have a working setup of this. I can submit a pull request to get this added. I'm not great with ansible, so before I submit it, which validate_config.yml file should I add the old/new config key to?

I initially put it in the new googlechat validate_config.yml. But if matrix_mautrix_googlechat_enabled isn't set to true, that validation script doesn't run. If googlechat is a direct replacement for hangouts, then there won't be a matrix-bridge-mautrix-hangouts/tasks/validate_config.yml file to put it into either.

spantaleev commented 2 years ago

My understanding is that it will go to the new role. The old role is to be removed completely.