Skip to content

Conversation

@d-sko
Copy link
Contributor

@d-sko d-sko commented Mar 20, 2020

Hi, I've added a guide for Rocket.Chat.

closes #584

@luto luto self-assigned this Mar 23, 2020
Copy link
Member

@luto luto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this guide! Despite the complexity, it is nice and easy to follow. I left a few comments to streamline it for less-experienced users.


::

[isabell@stardust ~]$ uberspace web backend set / --http --port 3000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an include for web backends, used like this. Can you please change this to match?


This is required because Rocket.Chat uses Meteor Oplog Tailing for performance improvements (see `the docs <https://rocket.chat/docs/installation/manual-installation/mongo-replicas/>`_ for further information).

Then tell supervisord to update and start the service:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably also needs supervisorctl reread to reload the config file.


[program:rocket.chat]
command=node %(ENV_HOME)s/rocket.chat/main.js
environment=MONGO_URL="mongodb://<username>_rocketchat:<password>@localhost:27017/rocketchat?replicaSet=rs01&authSource=admin",MONGO_OPLOG_URL="mongodb://<username>_rocketchat:<password>@localhost:27017/local?replicaSet=rs01&authSource=admin",ROOT_URL="https://<username>.uber.space/",PORT=3000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split this into multiple lines (one per var), like in the synapse guide.


::

[isabell@stardust ~]$ mongo --username <username>_mongoroot --eval "printjson(rs.initiate())"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mongodb guide suggest to use the uberspace username as <username>, so I think we can replace all <username>_mongoroot with ${USER}_mongoroot to make the guide easier to follow.


[program:rocket.chat]
command=node %(ENV_HOME)s/rocket.chat/main.js
environment=MONGO_URL="mongodb://<username>_rocketchat:<password>@localhost:27017/rocketchat?replicaSet=rs01&authSource=admin",MONGO_OPLOG_URL="mongodb://<username>_rocketchat:<password>@localhost:27017/local?replicaSet=rs01&authSource=admin",ROOT_URL="https://<username>.uber.space/",PORT=3000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using %(ENV_USER)s_rocketchat here to reduce the number of things to manually replace?

Using 'Node.js' version: '12'
[isabell@stardust ~]$

We'll also need :lab:`MongoDB <guide_mongodb>`, so follow the MongoDB guide and come back when it's running.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we feature this more prominently? Maybe add it to the "familiar with the basic concepts of"-list? put it into a note box? List it as the first (or last) prerequisite?


::

[isabell@stardust ~]$ uberspace web domain list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like web backends, there is also an include for this.

@d-sko
Copy link
Contributor Author

d-sko commented Mar 23, 2020

Thanks for the feedback! I'll change the guide accordingly.

d-sko added 8 commits March 23, 2020 17:30
the environment variable in the rocket.chat.ini is now split into
multiple lines, one per variable
reread the config for mongo after updating
Moved the web backend configuration to the Configuration section and
used the web-backend include
- forgot a shell prompt at the end of a listing
- added missing colon
- improved note for service ini
@d-sko
Copy link
Contributor Author

d-sko commented Mar 23, 2020

Damn. I've fixed everything but upon testing I stumbled over RocketChat/Rocket.Chat#7465, this didn't happen on my other tests. I'll update the PR when I find a reasonable solution.

@d-sko
Copy link
Contributor Author

d-sko commented Mar 24, 2020

I think I've found a solution that's not too bad 😅 . I've also fixed all points you mentioned.

<username> mention not required
@d-sko d-sko requested a review from luto March 24, 2020 11:12
@luto
Copy link
Member

luto commented Mar 24, 2020

Would you like to try to submit your /tmp/ufs change as a pull request to rocketchat? If at all possible, we do not want to force users to edit the source code. That increases the complexity and tends to break on updates because, well, the code changes 😅

@d-sko
Copy link
Contributor Author

d-sko commented Mar 24, 2020

Yes, fixing this in Rocket.Chat would be nicer of course. I just figured that a breaking change is unlikely here since the change is not in Rocket.Chat but the UploadFS package, which is deprecated (see https://github.com/jalik/meteor-jalik-ufs#uploadfs) and is unlikely to change much.

But regardless of that I'll have a look at the Rocket.Chat code... well, that escalated quickly 😁

@off1ine
Copy link

off1ine commented Mar 25, 2020

Hi and thanks a lot for this guide - just what I was looking for :)
Sorry for maybe breaking protocol, I'm still figuring out github. Is there a way you could add the content for the rocket.chat-user-setup.js file in line 193? I can see it in the raw code for the guide but it doesn't seem to show up for me (OS X FF, Chrome). Thanks a lot for your work!

@d-sko
Copy link
Contributor Author

d-sko commented Mar 25, 2020

Hi, you can view the full guide in the netlify preview: https://deploy-preview-585--uberlab.netlify.com/guide_rocketchat.html. But here is the content for this file:

db.createUser(
   {
     user: "<username>_rocketchat",
     pwd: "<password>",
     roles: [
       {role:"dbOwner", db:"rocketchat"},
       {role:"readWrite", db:"local"},
       {role:"clusterMonitor", db:"admin"}
     ]
   }
)

@d-sko
Copy link
Contributor Author

d-sko commented Mar 25, 2020

I've made a PR in Rocket.Chat, lets see what happens 😅

RocketChat/Rocket.Chat#17012

@off1ine
Copy link

off1ine commented Mar 26, 2020

Perfect, thank you! It worked and I'm up and running :)

@luto
Copy link
Member

luto commented Mar 27, 2020

Thank you very much for all the work and the upstream PR! 🎉

@luto luto merged commit b0dc42b into Uberspace:master Mar 27, 2020
@luto
Copy link
Member

luto commented Mar 27, 2020

@d-sko I can't find your mail address. Please write us an email to hallo@uberspace.de for your reward :)

@d-sko d-sko deleted the rocketchat-guide branch March 31, 2020 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guide for Rocket.Chat

3 participants