April 20, 2021 By Doug Davis 4 min read

Inching closer to a container-less world.

When discussing the hosting of cloud native applications, most of the focus, naturally, is on the deployment and management of the workloads themselves at runtime. One aspect that is often overlooked, however, is the input into the hosting process, meaning converting your source code into something that can be deployed and run. IBM Cloud Code Engine can do this for you.

What is IBM Cloud Code Engine?

IBM Cloud Code Engine (announced on March 31, 2021) is a fully managed, cloud-based runtime that allows you to deploy cloud native workloads in seconds, without having to manage any of the infrastructure necessary to host it. This means no more installing and managing Kubernetes. No more learning about pods, replicaSets, deployments, auto-scalers, load-balancers and even YAML.

In my previous blogs (on deploying apps and batch jobs to Code Engine), and in the accompanying videos, you were able to see how easy it is to deploy workloads to Code Engine — in many cases, with just your container image name and a few clicks of your mouse. However, starting with the container image still requires the developer to convert their source code into an image. For some people, this may not be very challenging, while for others, it might require a bit of a learning curve. Either way, perhaps it is something that should be done for the developer so they can spend more time coding.

Let us build the container image for you

For many developers, their source code will reside in a Git repository. With Code Engine, when you start the process of deploying an application or a batch job, you can choose to give it the location of that repository so that Code Engine can then build the container image for you. The obvious questions then follow: 

  • How does Code Engine know how to build the image? 
  • How does it know how to compile my code? Does it even need to be compiled, rather than just bundled with a runtime because it’s an interpreted language (e.g., Python)?

That’s where a “hint” is needed. If your code is fairly straight-forward, you might be able to leverage something called a “buildpack.” Think of a buildpack as a mechanism that will analyze your code, determine what language it is written in and then, based on that, will take whatever steps are necessary to make it “runnable” in Code Engine by creating a container image. For a compiled language, such as Java, it will compile the code and combine it with a JRE. For an interpreted language, the process might be as easy as copying the source code, along with the language runtime, into the resulting image.

If, however, you need a little more customization to build your image, you can do so by including a Dockerfile with your source code. A Dockerfile is basically a list of instructions for how to construct a container image that will run your code. It does this by allowing you specify what files should appear in the image — typically via some “compile” or “install” steps. Then, the process executes those steps and saves a snapshot of the container as an image.

You can control which process you’d like Code Engine to use via a simple flag. Since it’s not uncommon for people to share container images, you can also specify where the image should be stored — either for sharing or for later use during a deployment. It’s really that simple.

Where does all of this lead?

Let’s take a moment to think about the implications of what all of this means. Yes, it’s nice that people can go from “source code” to “running code” without having to build the container images themselves, but there’s something else here that might not be obvious. When you combine this with what we learned in the previous blogs (like deploying an app with just a few clicks), this means that a developer can deploy their source code to the cloud and never really need to think about container images, containers or even Kubernetes.

We are now getting really close to the point where the developer doesn’t even need provide anything more to the hosting runtime than their source code and desired runtime semantics. The requirement to even learn about “containers” at all might soon be a thing of the past. Maybe it’s wishful thinking, given the current state of things, but it does make the possibility seem a lot closer than it has in the past. And, this aligns with one of Code Engine’s design goals — meet the developer where they live, rather than make the developer adapt to the platform.

While Code Engine is still exploring if we can simplify this “image-building process” even more, you can see how it works today in a new video in which Erica Cameron demonstrates how you can quickly deploy your Code Engine workloads (either apps or batch jobs) directly from your source code:

 

After that, I encourage you to go try this out in Code Engine yourself. We offer a free tier so that you can play with it before you commit to purchasing. Check out the samples and tutorials that can help you jump-start your migration.

Ready to get started?

To start using IBM Cloud Code Engine, go to our landing page and watch more of our “Hello World” demo videos. Then, head on over to “Getting Started with Code Engine” in the documentation and deploy your first container, batch job or simply deploy your source code directly.

Was this article helpful?
YesNo

More from Cloud

How a US bank modernized its mainframe applications with IBM Consulting and Microsoft Azure

9 min read - As organizations strive to stay ahead of the curve in today's fast-paced digital landscape, mainframe application modernization has emerged as a critical component of any digital transformation strategy. In this blog, we'll discuss the example of a US bank which embarked on a journey to modernize its mainframe applications. This strategic project has helped it to transform into a more modern, flexible and agile business. In looking at the ways in which it approached the problem, you’ll gain insights into…

The power of the mainframe and cloud-native applications 

4 min read - Mainframe modernization refers to the process of transforming legacy mainframe systems, applications and infrastructure to align with modern technology and business standards. This process unlocks the power of mainframe systems, enabling organizations to use their existing investments in mainframe technology and capitalize on the benefits of modernization. By modernizing mainframe systems, organizations can improve agility, increase efficiency, reduce costs, and enhance customer experience.  Mainframe modernization empowers organizations to harness the latest technologies and tools, such as cloud computing, artificial intelligence,…

Modernize your mainframe applications with Azure

4 min read - Mainframes continue to play a vital role in many businesses' core operations. According to new research from IBM's Institute for Business Value, a significant 7 out of 10 IT executives believe that mainframe-based applications are crucial to their business and technology strategies. However, the rapid pace of digital transformation is forcing companies to modernize across their IT landscape, and as the pace of innovation continuously accelerates, organizations must react and adapt to these changes or risk being left behind. Mainframe…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters