How to build enterprise OS Images with Packer? Part-1

Davinder Pal
2 min readSep 29, 2022

Why should you even care about Packer when everything is a container in today’s overhyped software world? I understand it may sound a bit dramatic but Not everything can be put in a container unless you are living on the edge of the world where fantasy is greeting you with open arms.

A special thanks to my ex-teammates Anton, Yevhen, and Alek. Pomeshkin.

Architecture Decisions based on

http://thomasbartsch.net/sharepoint-2010-architecture-best-practices-puruneps-blog

1. Immutability
2. Scope
3. Tools
🧰
4. End of Life
💀

Let me try to ask a bit better questions so you can understand better what I mean by the decision mentioned above points and why they matter.

Immutability Questions

  1. Does your given software support static configurations?
    Example: Apache Kafka requires a Unique ID per instance of Apache Kafka so we can’t use static configurations because each Apache Kafka will have the same ID and Apache Kafka may not work.
  2. Would you like to configure your system on the fly aka provisioning?
    Example: Since Apache Kafka requires a Unique ID, we can generate this on the fly to not generate an infinite number of OS Images ranging from 1..N using Cloud-Init aka User-Data.

Scope Questions

  1. Who will be your end customer of OS Images? is it a Team/Organization/Company/etc?
  2. What are SLAs for your end customer?

Tools Questions

  1. What cloud provider would you like to use? AWS/Azure/GCP/etc.
  2. How many programming languages do you know and willing to learn? Bash/YAML*/HCL**/Groovy/Go/Python/etc.
  3. What will be your CI and CD System?
  4. How many security testing tools do you know? Nexpose/AWS Inspector/etc.
  5. What Release Mechanism / Cycle will you follow?

End of Life aka EOL Questions

  1. When would you like to deprecate/End the given OS Image?
  2. What will be your EOL contract with your customer?

Notes:
* YAML can be of several syntaxes like Ansible/GitLab/etc.
** HCL can also be of several syntaxes like Packer/Terraform/etc.

In the next article, I will cover how we can translate these questions into an architecture graph and piece together the puzzle.

--

--