Exploit the Pi
The Raspberry Pi was created to be a low-cost educational computer, but thanks to hardware upgrades it can be a lot more
Make the best use of the hardware upgrades in the popular little powerhouse.
Server distributions are notoriously difficult to set up, but DietPi simplifies the process with a menu
the Raspberry Pi was designed as an affordable and functional computing device for kids who wanted to learn to program. However, the device hit it off with the hackers and modders who began using it creatively and made it usable to audiences and applications that the original creators hadn’t imagined. The latest iteration of the inexpensive computer has ample resources and yet is small enough to run everything from your smart lamp to your file server. While Raspbian does an excellent job as a general-purpose distribution for the Pi, specialised applications require specialised distributions, such as the following.
One of the most popular uses for singleboard computers such as the Raspberry Pi is as an always-on and efficient standalone server. DietPi (https://dietpi.com) is one of the best options for rolling out such a server.
DietPi installs the bare minimum components you need to flesh out the installation according to your requirements. The reason behind the distribution’s success is its handful of custom scripts, one of which enables you to install software optimised for the Pi. Server distributions are notoriously difficult to set up, but DietPi simplifies the process by offering a nice menu to help you pick and choose a functionality for your device. For example, using DietPi’s custom package management script you can turn the base installation into a streaming media server, file sharing server, backup server, web server, VPN server, seed box and lots more. If servers aren’t your thing, DietPi gives you the option to turn it into a graphical desktop with either Mate, LXDE, Xfce or GNUStep desktops. As it’s a Debian-based system, outside of the script you can use the command-line APT package management system, or pull-in the Synaptic graphical apps for easier package management. Furthermore, the custom script also enables you to overclock the Pi, mount remote shares and even enable the Pi camera module.
Docker in production
Before you can use Docker in production you need to decide an OS to run it on. You can run it on just about every Linux distribution, but RancherOS (https://rancher.com/rancheros) gives you a minimalist Linux environment that’s tailored to explicitly run Docker. RancherOS is stripped right back to the bare essentials with only the minimum amount of software needed to run Docker. Everything inside the OS runs as a Docker container. Architecturally speaking, there’s the Linux kernel over which runs a system docker as the first process, which manages all the system services such as rsyslog and udev. Then there’s another container that runs all the other containers that users want to run. This arrangement works well for a production server as it creates a nice level of isolation and avoids system services being impacted by the users.
Although the OS itself is very interesting, what really makes it useful is the Rancher platform that runs on top of it. Rancher can manage and monitor container hosts and provides things like resource management, container networking, service discovery via DNS, load balancing based on HAproxy and more. You can run RancherOS on bare metal, virtual hosts and various cloud platforms. One of the bare-metal platforms it supports is the Raspberry Pi 3. Transfer the image to an SD card and refer to the online documentation to get started.
Power IoT devices
Besides education, the one area in which the Raspberry Pi has had a monumental impact
is the Internet of Things (IoT). The open, hackable nature of the small and inexpensive computing device has made it one of the most popular prototyping and development boards for developing and programming all kinds of IoT projects.
Of course, standard bare-bones distributions such as Ubuntu Core (www. ubuntu.com/core) give you a wonderful base platform to code your IoT projects – but you don’t really need to be a proficient programmer to interact with your appliances and devices. You can use Prota Pi (https:// prota.info/prota/pi) to make the Pi talk to your devices without writing any code.
Prota Pi is a headless OS with which you can interact with the devices from a pointand-click, HTML5-based user interface. The core automation engine of Prota OS is named Stories and helps you create automation rules for connected devices. These rules are based on the apps available in Prota Pi. One of the most useful is the GPIO app that allows you to control all the GPIO pins on a Raspberry Pi from directly within Prota Pi’s remote interface.
Check out some of the interesting IoT and automation projects shared by the developers of the Prota Pi, Naran Inc, on instructables.com (www.instructables.com/ member/Naran/instructables) to get a taste of the possibilities on offer – you may be surprised at what it can do.
You don’t really need to be a proficient programmer to interact with your
above Besides the Raspberry Pi, you can run the DietPi distrbution on several other SBCs including BeagleBone, Banana Pi, Orange Pi and more