Alright, so I finally got the installation working on a Raspberry Pi 3 B+ running Raspbian Stretch OS. The instructions are a little crazy and I may try to script this out so it’s easier, but in the meantime here we go!
Standard Pi Setup Stuff
- Flash the latest Raspbian Stretch, either Lite or with Desktop will work
- Boot the PI+
- Resize will Happen Automatically and then reboot
- Pi will then start up
- Login with pi/raspberry
- Run:
sudo raspi-config
- Reset your password (optional)
- Turn on SSH under Interfacing Options
- Change keyboard layout if necessary (defaults to English UK)
- Connect to WiFi by selecting country, entering SSID, and password (not required if using a network cable)
- Run
ifconfig
to get the IP Address of your Pi (either eth0 interface (wired) or wlan0 (WiFi) - Exit raspi-config
- Run
sudo apt-get update
- Run
sudo apt-get upgrade
The rest of these steps can either be performed via the attached keyboard/mouse or over SSH. I prefer SSH so you can scroll up/down to see historical messages.
Get My Updated Kegbot Packages and Scripts
- Download my packages into your home directory by running:
wget https://github.com/johnnyruz/kegbot-server/raw/add_my_pkgs_to_github/my_kegbot_packages.zip
- You should have a file my_kegbot_packages.zip in the folder
/home/pi/
- Unzip by running
unzip my_kegbot_packages.zip
- You should now have a folder at
/home/pi/mypkgs
- Execute the command:
bash -c /home/pi/mypkgs/install.sh
Fix issue with missing Six module and libmysqlclient-dev
- After running the install script for the first time, the installer should fail with message
ImportError: no module named six
- Run the command
sudo pip install six
- Next, open the file located at
/usr/local/lib/python2.7/dist-packages/kegberry/app.py
- Find the section for REQUIRED_PACKAGES, and change the entry for
libmysqlclient-dev
todefault-libmysqlclient-dev
- Execute the command
bash -c /home/pi/mypkgs/install.sh
Fix issue with MySQL/MariaDB Permissions & Index
- After running the install script for the second time, the installer should fail with message
Permission denied for user ‘root’@‘localhost’
- Open the file /etc/mysql/mariadb.conf.d/50-server.cnf
- In the [mysqld] section at the top of the file, find the line that says “skip-external-locking” and add the line
skip-grant-tables
directly below that - Scroll down and find the two lines for
character-set-server
andcollation-server
- Change these lines to the following:
character-set-server = utf8
collation-server = utf8_general_ci
- Reboot your Raspberry Pi
- After the reboot, execute the command
bash -c /home/pi/mypkgs/install.sh
Fix issue with SSL Package Repository
- After running the install script for the 3rd time, the installer should fail with message
HTTP Error 403: SSL is required
- Execute the command
bash -c /home/pi/mypkgs/install_part2.sh
- After this finishes, again run
bash -c /home/pi/mypkgs/install.sh
Wrapping Up
On my Pi, this final step took a long time, but I have a very slow internet connection which may impact things. But once it completes you should have a fully functioning Kegberry installation.
Kegboard Controller Issue
User @danc discovered an issue with the Kegbot Server’s auto-discovery of controllers when connected via USB to the Raspberry Pi. I tracked this down to an issue with the pycore-flags.txt file located at /home/kegbot/.kegbot/pycore-flags.txt
You will need to make sure that the contents of this file look exactly like the following, but with your own API key:
–api_url=http://localhost/api
–api_key=2a54012341ba932a264182d45d35fe69
You should only have these two lines (including the double-dashes in front) with no additional text in the file.
Wrapping Up
Please let me know if this works for you, and if any linux masters out there can turn this into a stand-alone script that would be awesome for future users.