See all posts

Wed Oct 16 2024

How to create a deployment diagram in IcePanel

A step-by-step guide on creating deployment diagrams in IcePanel with the C4 model

Tim

⚡️ TL;DR

In this guide, we explain how to create a deployment diagram in IcePanel using Groups and Tags. We’ll walk through the MonitorMe system from the Architectural Kata 2024, which deploys its system on Google Kubernetes Engine.

📖 Overview

Previously, we discussed deployment diagrams in the C4 model and walked through a few examples in IcePanel. In this guide, we’ll explore a Kubernetes deployment example. We’ll continue our journey with the MonitorMe system from the Architectural Kata 2024. Let’s begin!

↩️ Recap

In the How to diagram an event-driven architecture in IcePanel guide, we focused on the MonitorMe system, an application that monitors patient vitals, analyzes them for issues, and notifies medical professionals of emergencies.

The winning team decided on an on-premise deployment on Kubernetes of the system. This aligned with the objectives of maintaining high uptime and performance, which Kubernetes enables with its auto-scaling capabilities.

BluzBrothers deployment diagram of the MonitorMe system on Kubernetes

BluzBrothers deployment diagram of the MonitorMe system on Kubernetes

Note: The team included databases and streaming services in the K8 deployment but suggested that they could install them directly on a VM in the future. We’ve included them outside of the K8 deployment in our example.

🎨 Creating the deployment diagram

We recommend creating deployment diagrams in Level 2 using a combination of Groups and Tags in IcePanel. Nesting Groups and adding tags for other deployment properties, such as pod deployments, allows us to create something similar to the example above.

Level 2 - Deployment diagram on K8s in IcePanel

Level 2 - Deployment diagram on K8s in IcePanel

Here are the steps to create this diagram in IcePanel:

  1. First, add the different apps (services, topics) and stores (databases, caches) you want to include in the deployment diagram. You can double-click in the diagram and search for the objects to find them in your model quickly.

Add the objects you want to show in the deployment diagram

Add the objects you want to show in the deployment diagram

Now, we’ll focus on creating the different Groups for the K8 hierarchy.

  1. Create a Group for the K8 cluster and assign a tech choice.
  2. Create a Group for the App namespace and assign a tech choice.
  3. Create a Group for each K8 service and assign a tech choice.
  4. Create a Group for the Google Cloud VPC deployment. Your diagram will look pretty messy at this point but don’t worry. It’ll be easy to fix!

Create Groups and assign relevant tech choices

Create Groups and assign relevant tech choices

  1. Assign services to the corresponding K8 service, App namespace, and K8 cluster Group. To get the correct nesting structure, you’ll need to do it in this exact order.
  2. Assign topics and stores to the Google Cloud VPC group. Re-arrange the Groups to get a clean layout and voilà.

Assign objects to Groups which will auto-resize and nest

Assign objects to Groups which will auto-resize and nest

To wrap things up, we’ll add the Ingress Controller and external apps that interact with the services in the K8 deployment.

  1. Create an app for the Ingress Controller and relevant connections
  2. Create a Group for Internet, assign a tech choice
  3. Add the Mobile App and MySensorData system to the Internet Group
  4. Create tags for ‘On-prem’, ‘Public cloud’, and pod multiples (’1x’, ‘2x’, ‘3x’)
  5. Assign tags to the relevant Group and turn on the tag bar

Final version of the deployment diagram

Final version of the deployment diagram

An important consideration when creating deployment diagrams is what to show as a Group vs Tag. We recommend using Groups to represent important deployment criteria, in this case, the K8 cluster, namespace, service, and Google VPC. As a rule of thumb, 3 levels of nesting is the maximum until the diagram looks messy. Use tags to show secondary deployment information such as cluster multiples or access (public cloud vs private cloud).

🏁 Final thoughts

In this guide, we walked through creating a deployment diagram in IcePanel, specifically focusing on deploying a system on Google Kubernetes Engine. Using a combination of nested Groups and Tags in Level 2 allows you to create deployment diagrams in IcePanel.