Open hungrymonkey opened 4 years ago
sudo systemctl status mongodb
● mongodb.service - An object/document-oriented database
Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-04-11 21:05:59 UTC; 9min ago
Docs: man:mongod(1)
Main PID: 2753 (mongod)
Tasks: 23 (limit: 1152)
CGroup: /system.slice/mongodb.service
└─2753 /usr/bin/mongod --unixSocketPrefix=/run/mongodb --config /etc/mongodb.conf
Apr 11 21:05:59 ip-172-31-94-233 systemd[1]: Started An object/document-oriented database.
ubuntu@hostname:~$ sudo systemctl stop mongodb
systemctl status mongod
Unit mongod.service could not be found.
``
At /etc/ansible/roles/defaults/main.yml change
_rocket_chat_mongodb_servicename: mongod to rocket_chat_mongodb_service_name: mongodb
@hungrymonkey Did you manage to deploy Rocket.Chat?
I'm getting an error when executing MongoDb replica Set:
_{"msg": "The conditional check '('ok' in (replSet_result.stdout | fromjson))' failed. The error was: No JSON object could be decoded"}
@chrinats
I gave up and deployed the snap releases. This ansible does not seem to be maintained. You can peak at the effort to deploy the snapd below
https://docs.rocket.chat/installation/snaps
rocketchat.domain.com
sudo snap install rocketchat-server --channel=3.x/stable
sudo snap set rocketchat-server caddy-url=https://rocketchat.domain.com
sudo snap set rocketchat-server caddy=enable
sudo snap set rocketchat-server https=enable
sudo snap run rocketchat-server.initcaddy
sudo systemctl restart snap.rocketchat-server.rocketchat-server.service
sudo systemctl restart snap.rocketchat-server.rocketchat-caddy.service
sudo service snap.rocketchat-server.rocketchat-server status
sudo service snap.rocketchat-server.rocketchat-mongo status
sudo service snap.rocketchat-server.rocketchat-caddy status
systemd/myrocketchat-backup.timer
and systemd/myrocketchat-backup.service
to /etc/systemd/system/
/etc/systemd/system/myrocketchat-backup.timer
/etc/systemd/system/myrocketchat-backup.service
sudo systemctl enable myrocketchat-backup.timer
sudo systemctl start myrocketchat-backup.timer
sudo journalctl -f -u snap.rocketchat-server.rocketchat-server
sudo journalctl -f -u snap.rocketchat-server.rocketchat-mongo
sudo journalctl -f -u snap.rocketchat-server.rocketchat-caddy
Google Oauth2 - redirect_uri_mismatch
In the Authorized redirect URIs
field, add both urls
https://rocketchat.domain.com/_oauth/google
https://rocketchat.domain.com/_oauth/google?close
https://snapcraft.io/rocketchat-server
[Unit]
Description=Backup service for Rocketchat
[Service]
Environment=ROCKETCHAT_BACKUP_DIR=/var/snap/rocketchat-server/common/backup/
Type=oneshot
ExecStartPre=/usr/bin/sudo /usr/sbin/service snap.rocketchat-server.rocketchat-server stop 1
ExecStartPre=-/usr/bin/sudo /usr/bin/snap run rocketchat-server.backupdb 2
ExecStartPre=-/usr/bin/sudo /bin/sh -c 'aws s3 sync ${ROCKETCHAT_BACKUP_DIR} s3://domain-backups/rocketchat/$$(date +%%m-%%d-%%Y)/' 3
ExecStart=/usr/bin/sudo /bin/sh -c '/bin/rm ${ROCKETCHAT_BACKUP_DIR}*; /usr/sbin/service snap.rocketchat-server.rocketchat-server start'
User=ubuntu
Group=systemd-journal
## Issue 1
## Snap has to be run with sudo
## permanently dropping privilege did not work: File exists
## Issue 2
## rm glob * become expanded when the service starts
## /var/snap/rocketchat-server/common/backup/ will be empty
## Moved the command to exec start so the glob will be
## populated properly
[Unit]
Description=Backup timer for Rocketchat
Requires=myrocketchat-backup.service
[Timer]
OnCalendar=Mon,Wed,Fri,Sun 02:00
Persistent=true
[Install]
WantedBy=timers.target
requirements.yaml