Let’s fry up something nice.

John Stupka
3 min readAug 31, 2020

So, you’ve got your first server from awesome cloud provider, you’re looking at installing software on the server though and you’re interested in how best to do that.

Well that’s where “frying” and “baking” will come in handy. Which is an example of two different methods for installing software on the server you have just gotten access to.

Photo by freestocks on Unsplash

Frying

We’ll start with the first method, “Frying” which is an example based on how you would cook a meal for yourself. You start to heat the pan and as you have the heat turned on you start throwing things in the pan and let it cook up while you watch it. The method involves using something like a configuration management tool, which will install software directly on a running server.

Common steps in this process are:

1. Write a configuration management spec file

2. Run the Config Management Tool

3. Config Tool logs into server

4. Config Tool runs commands against server

5. Config Tool determines if the servers install succeed or fail

6. Config Tool logs out of the server and reports status

7. You check to ensure that the software you wanted installed

This is a great way to get completely up to date software, and to quickly install and run it on a server from any cloud provider. Which means its easy to approach and great for small teams.

Photo by Nadya Spetnitskaya on Unsplash

Baking

Our next method is, “Baking” which involves something that will allow you to build a whole machine Image. This is similar to how you would bake something in an oven, you combine the ingredients ahead of time and mix it up before putting it in the oven. This method involves using a machine image builder, a common tool for this is called Packer.

Common Steps for this are:

1. Write a Machine Image config file

2. Connect to a running machine

3. Install software that we want

4. “Freeze” the machine at its current state and download a copy of it

5. Send that copy to a storage location

6. Use that copy with a cloud provider to start a machine just like the one you “froze”

This is a wonderful method for teams with lots of servers that need to be run and they need to be sure every server has the same exact configuration. Which means having a copy, would give you the best option. In the event any of the servers change during deployment and install like with “frying”.

Baking Vs. Frying

Which of these is better though?

Well, this again depends on the team you are with. If you have a large team that can handle creating the maintaining different machine images, recommend that. Especially since you would need to store those images and distribute them to whatever locations you need to use them. While if you are a smaller team or working in a development environment during the process of building machine images, using a configuration management tool would be a very good way to do things.

There are other options where you can run a Docker image, on a server that has been setup using configuration management. This does require mixing both the idea of frying and baking, but making it easier for smaller teams to deal with their servers, while also ensuring that they have a similar setup for each application.

In general, I would recommend using a frying method, until you have a need to start baking images. If you find yourself looking into image building, you should look at Docker first and see if that suites your needs. Finally, you should start building your own images with the foundation you’ve build with docker.

--

--

John Stupka

Coffee Drinker, Chief Engineer of Dancing at Desk, Foodie, HyperText Transfer Operator, Overly energetic and active! 💻 ☕