frc-frecon / frecon

An API for building scouting apps for FRC competitions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDB Under ARM

claire271 opened this issue · comments

I was setting up the beagle bone black today, and I noticed that mongodb doesn't officially support ARM platforms. It looks like it is possible to compile it for the BBB, but it doesn't look like a lot of fun.
Here are the sites I have looked at so far.
http://stackoverflow.com/questions/20338008/how-do-i-install-mongodb-on-the-beaglebone-black
http://www.horesh-studios.com/linux/beaglebone-black-and-mongodb/
https://github.com/skrabban/mongo-nonx86

It does look like they have managed to port it over to ARM under arch linux.
http://archlinuxarm.org/packages?search=mongodb

Which ARM distribution are you using on the B3? I'd try the Arch thing if it looks like it'll work. Since it seems that all that one would need is an SSH server and Ruby besides MongoDB, it'd be worth a shot. I'm not an expert on Arch, perhaps @samontea could shed some light on it.

It kinda sucks that Mongo doesn't support ARM yet (unless it does, but your sources and the cursory perusing I did yielded no evidence that it does indeed work now). If you can't get the database working on the B3 (which would be a major flaw that we need to address quickly), I do believe that Mongoid has support for connecting to a remote server (@Sammidysam would probably be the guy who would know about that, but I think it's just changing a value in the <environment>.sessions.default.hosts key), so if you urgently need a database that works, you can run a parallel Mongo server on a Pi, and have FReCon call that guy up. It'll slow things down, but it'll also distribute things around. I haven't tested cross-host database transactions for comparison, but it sounds like that could be ugly.

Both the Pi and the B3 seem to be ARM processors, so I'm not entirely sure why it works on one and not the other. Could you try the Arch package? If that works, then I guess crisis has been mostly averted.

If you're looking for instructions for how to install arch linux, basically you just read this and this and you're golden. It's not that hard to do if you don't need to setup graphics which you shouldn't.

If we don't go with Arch, it sounds like the GitHub repo that you linked should work, it might just take a long time.

Also, did we actually ever run MongoDB on the Pi? Did that happen at IRI? I don't remember.

Mongo-nonx86 is already 2.5 years outdated so I would prefer to not use that. That repo is 10773 commits behind mongodb:master

MongoDB ran on the Pi at IRI. It worked fine.

Apparently it's in the pidora repositories: http://pidora.ca/pidora/releases/20/packages/armv6hl/os/Packages/m/. If you're using a rpm-based OS you could try that.

That one is version 2.4.6 while the latest one is 2.6.6. The one on Arch is also 2.6.6. @tigerH let me know he's trying Arch.

We are also trying Arch on our BBB.

I got all the stuff installed on the BBB.
I'm working on the network configuration right now.
I can wget pages from apache but I can't seem to reach pages served by ruby from a seperate computer.

nmap doesn't show 4567 as open when running rackup.

Sounds like a firewall issue, but I would assume you've checked that.

Yea. I set iptables to accept all.

Is nmap's scan range including 4567? If not, just try telnetting.

I found out what was wrong.
According to this thread: http://stackoverflow.com/questions/15685528/cannot-access-local-sinatra-server-from-another-computer-on-same-network
there was a commit to sinatra that caused it to only listen on the local machine, because of security issues.
Passing -o 0.0.0.0 fixed the issue.
I have also gotten it to run on boot. Static IP and dhcpd is working.

Rails made a similar change. Great that you set it up!

-Sam, sent on his iPod. You should be proud of him; typing on that thing is hard.

On Jan 11, 2015, at 8:14 PM, tigerh notifications@github.com wrote:

I found out what was wrong.
According to this thread: http://stackoverflow.com/questions/15685528/cannot-access-local-sinatra-server-from-another-computer-on-same-network
there was a commit to sinatra that caused it to only listen on the local machine, because of security issues.
Passing -o 0.0.0.0 fixed the issue.
I have also gotten it to run on boot. Static IP and dhcpd is working.


Reply to this email directly or view it on GitHub.

So shall we close this now?

Sounds to me like things are working. We should probably document port numbers and arguments necessary, but beyond that I think we're good.

Yea.

Estoy cerrando esto.

👍

Cerrando? Sorry :P that was past participle not present participle.

-Sam, sent on his iPod. You should be proud of him; typing on that thing is hard.

On Jan 11, 2015, at 10:52 PM, Kristofer Rye notifications@github.com wrote:


Reply to this email directly or view it on GitHub.

Oh it changed since I got the email notification sorry.

Haha, yeah you're right. I saw that I made that mistake too so I fixed it.
AP Spanish isn't helping me much . . .

Spanish is fun; I just don't like how my school teaches it. Waaaayyyyy too slow. It was fun speaking it to people in the Dominican Republic when I went there, though.

-Sam, sent on his iPod. You should be proud of him; typing on that thing is hard.

On Jan 12, 2015, at 10:29 AM, Vincent notifications@github.com wrote:

Haha, yeah you're right. I saw that I made that mistake too so I fixed it.
AP Spanish isn't helping me much . . .


Reply to this email directly or view it on GitHub.