RocketChat / Rocket.Chat.RaspberryPi

Run a private social network on your Pi for iPhone and Android devices !
MIT License
337 stars 57 forks source link

MongoDB version? #10

Closed mattbk closed 8 years ago

mattbk commented 8 years ago

README says the current MongoDB version available for Rpi is too old for Rocket.Chat. What version of MongoDB is needed?

Would this build be useful? http://andyfelong.com/2016/01/mongodb-3-0-9-binaries-for-raspberry-pi-2-jessie/

mattbk commented 8 years ago

At https://github.com/RocketChat/Rocket.Chat/wiki/Deploy-Rocket.Chat-without-docker#3-setup-mongodb-replica-set, instructions are included for MongoDB both 2.4 (and below) and 2.6 (and above).

Sing-Li commented 8 years ago

Version 2.6.latest and/or 3.0.latest

Rocket.Chat has lived through many different versions of Mongo - and somewhat dependent on the ones that the current Meteor version will work with.

Please see community member @j8r 's DPlatform - it completely automates the installation of a working Mongo version together with the Rocket.Chat server on a Pi 2 or Pi 3

TinajaLabs commented 8 years ago

I note this is closed, but sadly, it does not seem to be satisfactorily resolved...

I'm building a home automation system based on a few Raspberry Pis. One of them I want to build as a rocket.chat / hubot system where I can converse (and control) with my home via chatbot.

It needs to be a stand-alone system, so the online version of mongodb won't do.

Also, I'm trying to puppet the setup so looking for a way to package and easily repeat the installs for this system. Just tired of rebuilding micro-sd cards by hand. The DPlatform looks interesting but... doesn't use the same working approach as my other hosts.

I've got 3 other systems that I'm puppeting;

Also, I'm a tinkerer with a lot yet to do to show my new configuration at this year's Maker Faire in mid-May. I need to decide and get something installed soon.

If your dependency on mongodb is a problem will you be supporting a different db backend? Or should I be looking for some other alternative?

Thanks for any advice, Chris.

Sing-Li commented 8 years ago

@TinajaLabs Running any write and re-write intensive app such as a database on SD card is a high-wire act. SD cards are not designed for such duty cycles. For databases, Mongo is easily already the best of the bunch, due to its heavy reliance on in-memory cache. Even though we have efforts in migrating to another (SQL based) database, that won't help the case at all.

With the newest available 'made-for-Pi' hard drive from WD - http://wdlabs.wd.com/products/wd-pidrive-314gb/ ... there's hope that you can reliably run mongo off a dedicated Pi 2 or Pi 3 connected to the same LAN. These sort of requirements are pre-requisites for those who want to run a reliable small Rocket.Chat deployment in a production scenario.

Having said all of that, if it is for hobby use only, there is no reason why the working mongo version in DPlatform cannot be used locally - all running on the same Pi 2 / Pi 3 - and on an SD card.

If you'd come over and join the active community at https://demo.rocket.chat/channel/raspberrypi ... we can get you setup running a local mongo; @j8r , author of DPlatform, is frequently around to field any questions in this area.

j8r commented 8 years ago

@TinajaLabs If you want to install a working mongodb 3.0.9, you can look at the DPlatform's mongodb install script. I've made this thanks to Andy Felong's tutorial So to resume, you need to:

# Install MongoDB for you distribution
apt-get install -y mongodb

# Download the mongodb 3.0.9 "striped" bins (409MoGziped -> 27MoGzipped)
wget https://www.dropbox.com/s/diex8k6cx5rc95d/core_mongodb.tar.gz

# Extract and override the old 2.4 bins by new 3.0.9 ones
tar zxvf core_mongodb.tar.gz -C /usr/bin
rm core_mongodb.tar.gz

# Restart mongodb
systemctl restart mongodb

It works perfectly, that it :)

TinajaLabs commented 8 years ago

@j8r @Sing-Li Thanks so much for your encouragement. After last night I was feeling a bit down about the prospects of getting a chatbot configured.

One thing to understand about my requirement is that it will be a conversation between me, my wife, and our home/automation system. It will unlikely be a high volume configuration.

The second thing (for me to resolve) is that I am using an Odroid C2 running odrobian (jessie) for this setup. It's very fast and capable, but perhaps too incompatible.

When I installed DPlatform, it complained that it did not support aarch64. It continued but nothing seems to be installed after.

Here's what I get from uname -a:

Linux tinaja-bot 3.14.29-14-odrobian+ #2 SMP PREEMPT Wed Mar 16 19:03:55 MDT 2016 aarch64 GNU/Linux

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.3 (jessie)
Release:        8.3
Codename:       jessie

I have a raspi 3 on the way... and a 314 hd.

The general idea for this setup is to have rocket.chat and hubot scripted to handle info requests and command execution of sensors and actuators in the home. It will primarily be communication with another raspi which is running node-red and rabbitmq.

I'll try a few more tricks and pick up the conversation on the demo.rocket.chat raspberrypi channel when I get back to this.

Again, thanks for your encouragement and help.

Regards, Chris.

j8r commented 8 years ago

@TinajaLabs Thank you for your uname -a. I've just set a wrong arch for ARM 64; armv8* instead aarch64 to detect the arm 64bit CPU.