The PiStack Project
I have a strong background in ops/infrastructure, but development has always been something that I have had an interest for.
It’s part of the reason I decided to look at Hugo and Jekyll to blog over a hosted solution like WordPress.
So what have I been up to? Learning JavaScript development!
The Idea
A shopping list for types of jam. Each jam entry should have an MSRP value that is totaled and displayed.
A To-Do list type of app may be over-done, but I feel that it’s the perfect app stack to cover building API’s and handling state + multiple components in React.
The Web Stack
API driven applications seem to be the most modern and mature way to build from scratch, so I’ll be building one with NodeJS.
The backend will be MongoDB, and the frontend will be developed in React :D.
React will pull any existing jam entries from MongoDB via NodeJS and display them. In a separate React component, we will add/remove items from the list. Finally, another component to calculate the total.
Docker Stack
It’s one thing to write an API-first JavaScript application..
But what if it was in a Docker container?! In the cloud?! /s
Buzz words aside, containerized apps is something that I’ve wanted to play with for a while, so this would be a perfect opportunity!
I plan on creating 3 containers:
-
MongoDB
-
NodeJS API
-
ReactJS
And with those 3 defined, I’ll reference them when creating a Docker Stack that creates 2 instances of each container.
Stacks on Stacks on Pi
“But it works on my local. There must be something wrong with the server.”
Taking Docker a step further, I want to set up a Docker Swarm cluster across a few Raspberry Pi’s.
Sure, the stack could be virtualized on the same host, but there’s something special about physically pulling the power/network from a node and watching failovers happen >:D.
Once it’s functional there, we can try switching to Kubernetes and do some comparisons.