Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Update raspberrypi.md #651

Merged
merged 1 commit into from
Oct 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 46 additions & 23 deletions docs/raspberrypi.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,57 @@
(I'm running it on a Raspberry Pi 3 with Raspbian Stretch)
You can run zenbot on a Raspberry Pi and the default Raspbian OS, but I don't recommend it because mongo has problems with ARM systems as well as 32-bit OSes since it limits the database to 2GB.

**1. Install nodejs.**
http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/
**1. Make sure packages are updated**

**2. Install docker and docker-compose.**
Docker:
https://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/
Docker-compose instructions at the end of this page:
https://pixelchrome.org/blog/quickstart-guide-how-to-install-docker-a-raspberry-pi/
```
sudo apt update
sudo apt upgrade
```

**2. Install docker and docker-compose**

Install docker

`curl -sSL https://get.docker.com | sh`

Autostart on startup:

`sudo systemctl enable docker`

Give user permissions:

`sudo usermod -aG docker <username>`

Reboot, or `sudo systemctl start docker`

Install docker-compose:

```
apt-get install python-pip
pip install docker-compose
```

**3. Install this or another mongodb docker image made for the rapsberry pi**

**3. Install this or another mongodb dockerfile made for the rapsberry pi.**
https://hub.docker.com/r/nonoroazoro/rpi-mongo/

**4.Rename the mongodb dockerfile to "mongo"** so that the conf.js from zenbot works with it.
In my case:
`docker tag nonoroazoro/rpi-mongo:latest mongo:latest`
`docker pull nonoroazoro/rpi-mongo`

**4.Rename the mongodb dockerfile to "mongo"**

**5.Run the mongo dockerfile.**
`docker run mongo`
(You can control-c or command-c to close the dialogue after it stays at "waiting for connections on port 27017")
`docker ps`
to make sure mongo is running
If you use the above image:

**6. Run zenbot.**
`cd zenbot`
`docker-compose build`
`docker-compose up -d`
`docker tag nonoroazoro/rpi-mongo mongo`

**6. Run zenbot**

```
cd zenbot
docker-compose build
docker-compose up -d
```

Commands are the same
`docker run --rm --link zenbot_mongodb_1:mongodb -it zenbot_server ./zenbot.sh [command]`

`docker run --rm --link zenbot_mongodb_1:mongodb -it zenbot_server [command]`


There ya go