If you have your ear even slightly to the ground of the software community, you’ll have heard of Docker. Having recently enjoyed a tremendous rise in popularity, it continues to attract users at a rapid pace, including many global firms whose infrastructure depends on it. Part of Docker’s rise to fame can be attributed to its users becoming instant fans with evangelical tendencies.
But what’s behind the popularity, and how does it work? Let’s go through a conceptual introduction and then explore Docker with a bit of hands-on playing around.
Continue reading “Intro To Docker: Why And How To Use Containers On Any System”
[curcuz]’s BoomBeastic mini is a Raspberry Pi based smart connected speaker. But don’t dis it as just another media center kind of project. His blog post is more of a How-To guide on setting up container software, enabling OTA updates and such, and can be a good learning project for some. Besides, the design is quite elegant and nice.
The hardware is simple. There’s the Raspberry-Pi — he’s got instructions on making it work with the Pi2, Pi2+, Pi3 or the Pi0. Since the Pi’s have limited audio capabilities, he’s using a DAC, the Adafruit I2S 3W Class D Amplifier Breakout for the MAX98357A, to drive the Speaker. The I2S used by that part is Inter-IC Sound — a 3 wire peer to peer audio bus — and not to be confused with I2C. For some basic visual feedback, he’s added an 8×8 LED matrix with I2C interface. A Speaker rounds out the BoM. The enclosure is inspired by the Pimoroni PiBow which is a stack of laser cut MDF sheets. The case design went through four iterations, but the final result looks very polished.
On the software side, the project uses Mopidy — a Python application that runs in a terminal or in the background on devices that have network connectivity and audio output. Out of the box, it is an MPD and HTTP server. Additional front-ends for controlling Mopidy can be installed from extensions, enabling Spotify, Soundcloud and Google Music support, for example. To allow over-the-air programming, [curcuz] is using resin.io which helps streamline management of devices that are hard to reach physically. The whole thing is containerized using Docker. Additional instructions on setting up all of the software and libraries are posted on his blog post, and the code is hosted on GitHub.
There’s a couple of “To-Do’s” on his list which would make this even more interesting. Synced audio being one: in a multi-device environment, have the possibility to sync them and reproduce the same audio. The other would be to add an Emoji and Equalizer display mode for the LED matrix. Let [curcuz] know if you have any suggestions.
Continue reading “An Eye-Catching Raspberry Pi Smart Speaker”
It used to be tedious to set up a cross compile environment. Sure you can compile on the Raspberry Pi itself, but sometimes you want to use your big computer — and you can use it when your Pi is not on hand like when on an airplane with a laptop. It can be tricky to set up a cross compiler for any build tools, but if you go through one simple step, it becomes super easy regardless of what your real computer looks like. That one step is to install Docker.
Docker is available for Linux, Windows, and Mac OS. It allows developers to build images that are essentially preconfigured Linux environments that run some service. Like a virtual machine, these images can run together without interfering with each other. Unlike a virtual machine, Docker containers (the running software) are lightweight because they share the same underlying kernel and hardware of the computer.
The reality is, setting up the Raspberry Pi build environment isn’t any easier. It is just that with Docker, someone else has already done the work for you and you can automatically grab their setup and keep it up to date. If you are already running Linux, your package manager probably makes the process pretty easy too (see [Rud Merriam’s] post on that process). However, the nice thing about the images is it is a complete isolated environment that can move from machine to machine and from platform to platform (the Windows and Mac platforms use a variety of techniques to run the Linux software, but it is done transparently).
Continue reading “How To Use Docker To Cross Compile For Raspberry Pi (and More)”
Setting up a cluster of computers used to be a high-end trick used in big data centers and labs. After all, buying a bunch of, say, VAX computers runs into money pretty quickly (not even counting the operating expense). Today, though, most of us have a slew of Raspberry Pi computers.
Because the Pi runs Linux (or, at least, can run Linux), there are a wealth of tools out there for doing just about anything. The trick is figuring out how to install it. Clustering several Linux boxes isn’t necessarily difficult, but it does take a lot of work unless you use a special tool. One of those tools is Docker, particularly Docker Swarm Mode. [Alex Ellis] has a good video (see below) showing the details of a 28 CPU cluster.
Continue reading “Raspberry Pi Hive Mind”