Skip to content

Instantly share code, notes, and snippets.

@giorgiosironi
Created December 13, 2019 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giorgiosironi/c7d1cd1f6163fd2250ae1162e4e844fe to your computer and use it in GitHub Desktop.
Save giorgiosironi/c7d1cd1f6163fd2250ae1162e4e844fe to your computer and use it in GitHub Desktop.
## 1. Lego
What is this? A set of Lego bricks ok. Trademarked name.
It's also one of the most overused metaphors in software development. You can replicate software an infinite number of times. So if you have reusable components that you or someone else have built, you put them together to get a complete application like GMail or Microsoft Word.
## 2. Cables
Reality is more similar to this. Software components and libraries follow different standards, are built for different audiences and incorporate different assumptions. So they need to be put together with duct tape, screws, adapters; completely custom parts need to be fitted in to get a polished product.
The end result can be scary but it's not necessarily of low quality; what can be scary is if you were given the Lego bricks and asked to put together this. This could happen because you have purchased the product (a set of bricks) or even across different teams in a single company if there is a separation of development (build it) and operations (run it).
## 3. Break bulk cargo
Let's switch metaphors slightly. Deploying software means putting it in a place where it can run and serve the needs of users. So you have not just to put together the pieces but also transport them to the right place. For eLife this is usually AWS's data center in Northern Virginia, Eastern United States. One by one you load the barrels onto the ship and one by one you unload them on the other side and put them in the right place.
## 4. Containers
In the last century, the shipping industry has undergone a transition that has revolutionized it and cut costs across the board: freight containers. Software is adopting the same metaphor, in the form of lightweight virtualization called in fact containerization.
A container (or container image, more precisely) is a self-sufficient software component that is easy to transport and easy to run. It exposes a standard interface to the outside world so that you don't need to know what's inside to make use of it, even if it is a mess of cable.
## 5. Containers on a ship
End result is that you can put lots of containers on a big specialized ship.
## 6. Containers on a train
Or, you can load them very quickly onto a train because of the standard interface. Containers don't care where they are used.
## 7. Kubernetes
Kubernetes is open source software from Google that helps piloting one of these huge containers ship. We use it inside eLife and from this week we will be using it to host vanilla versions of Libero products for demonstration.
An instance of Kubernetes is often called a "cluster" because it's a set of similar computers. They are abstracted away though, so ideally you should never see the individual nodes but just a huge ship capable of housing all of your containers.
Without further ado, let's deploy something to our brand new Kubernetes cluster.
## 8. Deploying nginx
nginx is a web server that can serve HTML pages and other assets to end users. Once you run it in a cluster exposed to the public Internet, your content is reachable from all over the world. We will deploy an empty instance of it with a single command, serving a static page saying "Hello world".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment