DevOps Blog

Stay in the know with in-depth articles about DevOps, micro-services and cloud native topics, delivered to you weekly.

Cloud native application definition & image building

Written by Marius Rimkus
on October 23, 2019

Cloud native is one of the most popular terms in technology today, and it’s only gaining steam. In fact, according to Google Trends, the term “cloud native” just hit its highest levels of interest in October 2019.

Part of the popularity can be attributed to marketing buzz, but what’s exciting about cloud native is the grassroots support. So many developers and organizations are buying-in to the promise of cloud native and helping develop the ecosystem. As a result, today there is a wide array of tools that make up the cloud native landscape. Within their interactive map, the Cloud Native Computing Foundation (CNCF) has broken these tools up into categories.

Here, we’ll take a closer look at one of those categories: cloud native application definition & image building. These tools provide “golden images” and authoritative application definitions to simplify the process of defining and scaling cloud native apps. To meet the demands of the cloud native space, these tools need to be lightweight, scalable, and agile. By the end of this piece, you’ll understand what cloud native application definition and image building are, their benefits, and details on some of the most popular tools in the category.

 

What is cloud native application definition & image building?

Cloud native application definition and image building are important parts of automating application delivery. Images and application definitions provide you with a source to deploy and scale cloud native microservices.

Images are binaries that provide an authoritative source for container and virtual appliance deployments. Application definitions define all the resources required by your application. As a result, developers benefit from programmatically repeatable deployments.

These descriptions of images and application definitions may be a little abstract, so let’s take a closer look at each.

Crash course on application definitions

Application definitions, as Puppet describes in their docs, have 2 parts: application components and service resources.

Application components are chunks of code that enable specific functionality in your cloud native application. If you’re creating a LAMP/LEMP stack, you may create discrete components for your database, web server, CMS (Content Management System), and load balancer.

Service resources, on the other hand, abstract away module dependencies and enable data transport between nodes within an app. For example, if you create a cloud native LAMP/LEMP application, service resources enable your database and application to communicate.

Application definition is a mean to programmatically define the data flows and dependencies between these two parts. As a result, they allow you to abstract away complexity and easily scale configurations.

Understanding machine images and container images

CNCF’s Cloud Native Landscape includes tools for building both machine images and container images.

If you’ve ever used a virtual appliance, you should be familiar with the concept of machine images. Like application definitions, machine images enable the deployment of preconfigured resources. However, how they do so is different. 

Machine images bundle an operating system, packages, and services together as a single image. OVAs, Amazon Machine Images and VMDKs are common examples of machine images you may be familiar with.

Container images are similar, but there is no need for an operating system. To use a loose analogy: container images are to containers what OVAs are to virtual appliances.  For example, when you use the docker run command, you’re creating a container from a Docker image that runs on top of the underlying OS kernel.

 

Benefits of cloud native application definition & image building

You should now have an idea of what cloud native application definition & image building is. Now, let’s explore why it’s an important part of the Cloud Native Landscape. In this section, we will explore the benefits of cloud native application definition & image building tools.

Scalable deployments

With cloud native applications, you need to rapidly spin up microservices. You must also be able to do this iteratively and repeatably. In general, microservices may help you achieve these objectives.

However, you need well-defined authoritative references to programmatically deploy microservices in a reliable way.  Cloud native application definition and image building tools help you solve that problem. With the right tool, you can define a multi-container app and deploy it at scale.

Improved CI/CD

The ability to quickly instantiate an image greatly improves testing and development workflows. Tools in the application definition and image building category help ensure the deployment of identical applications to testers and other developers. As a result, the overall CI/CD pipeline improves.

For example, you can significantly reduce the amount of time it takes to create an isolated development environment. Similarly, tools like Docker Compose can help you quickly spin up an image, test it, and terminate it, if need be.

Loose coupling

Loose coupling is a big part of what makes microservices resilient and scalable. Cloud native application definition helps make it possible to loosely couple discrete services.

Let’s borrow an example from Puppet’s docs to explain why. Suppose you use MySQL as the database component of your application. Let’s also say your CMS and database communicate using the “Sql” service resource. Now, suppose your team decides to switch from MySQL to a Postgres database. Thanks to the abstraction provided by service resources, you can do so without worrying about modifications to the CMS component.

Reduced complexity

Cloud native application definition & image building tools create a “single source of truth” for your images and application definitions. As a result, you can eliminate much of the complexity associated with managing microservices at scale. Version control, updates, and rollbacks become significantly easier to manage. 

Deploy to multiple environments

Images built for cloud native can often instantiate on multiple public and private cloud platforms as well as bare metal. This platform-independent approach to image builds increases flexibility and reduces vendor lock-in. It also allows you to quickly create demos for customers and use your images in environments you didn’t initially consider.

 

Popular cloud native application definition & image building services

There isn’t a one-size-fits-all cloud native application definition and image building tool we can recommend. You need to understand the demands of your environment and select the right tool for the job.

The CNCF’s interactive cloud native application definition and image building services page is a good starting point for your research. However, it can be a lot to sort through. To help you in your search, we’ve taken a closer look at a few of the most popular projects on the list.

Helm

Helm has become a popular project in the world of cloud native. It is supported by a community of developers, including those from likes of Microsoft, Google, and Samsung SDS. Further, Helm is maintained by the CNCF themselves.

Helm helps you streamline the process of defining, installing, and upgrading Kubernetes. Charts, which are curated application definitions, are a big part of what makes Helm so powerful. Charts allow you to have a single point of authority for complex cloud native applications. They also provide repeatable app install at scale. If you’d like to take a deep dive on the topic of charts, check out this page from the Helm Docs.

Docker Compose

Docker Compose is one of the most popular tools in the cloud native application definition and image building category. With Compose, you can configure multi-container apps using a YAML file. Then, you simply execute the docker-compose up command to start and run your application.

Traditionally, Compose has been useful for test automation and in development environments.  However, its feature set is evolving to the point that single host deployments have become part of its common use cases list.

Chef Habitat

Chef Habitat is a platform-independent application lifecycle management tool built with cloud native in mind. With Habitat, your applications are codified in a way that allows you to easily deploy, update, and scale them.

Habitat bundles an app and its dependencies into lightweight and portable units. From there, you can deploy the units across a variety of platforms, from containers to bare metal servers. Habitat is a good choice if you’re looking for a cloud native application definition and image building tool that streamlines the migration of legacy apps to the cloud.

Packer

Packer is one of the more exciting tools in the cloud native image building space. Packer automates the process of creating identical machine images using a single base configuration. You can then deploy these machine images to multiple platforms. As a result, continuous delivery, maintaining consistent dev/QA/staging/prod environments, and creating virtual appliances are example use cases for Packer.

Of course, none of this sounds too groundbreaking. Virtual appliances have been around for a while. What makes Packer special? Speed & portability. Sure, you could use OVAs to create virtual appliances. However, with Packer, provisioning processes that used to take hours can be reduced to seconds. Similarly, legacy virtual appliances had limited portability. With Packer you can deploy on anything from VirtualBox to AWS to OpenStack.

Skaffold

Skaffold is an open source CLI tool from Google. The premise is simple: you work on code, and Skaffold automates the build, push, and deploy process. Skaffold monitors your source code and kicks off the workflow when changes occur. Of course, you define what is “syncable” and where it is deployed.

The project is still in beta, but it has a lot of promise. Skaffold can enable you to focus more on development and less on the build and deploy process.

 

Final thoughts

We hope you enjoyed our deep dive into the cloud native application definition & image building category of CNCF’s Cloud Native Landscape. The category covers a wide range of tools and functionality, though you won’t need every tool listed. The important part is understanding which tools and practices benefit your use case.

If you’re interested in learning more about cloud native, subscribe to our blog or contact us today!

Subscribe to our blog

A Cost-effective Way to Handle Tomorrow's Performance-hungry Applications