Integrating OpenStack and Kubernetes with Murano

Nick Chase, Mirantis Blog- February 24, 2015 -

There’s a perceived competition between OpenStack and containers such as Docker, but in reality, the two technologies are a powerful combination. They both solve similar problems, but on different layers of the stack, so combining the two can give users more scalability and automation than ever before.

That containers app you wrote needs to run somewhere. This is particularly true for orchestrated container applications, such as those managed by Kubernetes. What’s more, if your application is complicated enough that it needs to scale up and down, you need to be running it in an environment that can, itself, scale up and down. This is where OpenStack comes in.

The idea of making OpenStack and Kubernetes work together might seem a little daunting, but as of today, it just got easier. A lot easier.

While that in itself is a pretty heady thought, let’s stop for a moment and think about what that means. Remember, Kubernetes lets you move workloads between different clouds, as long as they’re both running Kubernetes. That means that you will be able to move workloads between OpenStack and other clouds, such as Google Cloud Platform. Suddenly hybrid cloud — an OpenStack private cloud integrated with public cloud for scale — doesn’t sound so crazy anymore.

For example, you might construct an application environment in which your internal database lives in your private OpenStack cloud, but the web application component that presents it to the world lives in public cloud. Perhaps you have an external-facing application in the public cloud that sends analytics back to a big data application in the private cloud. Or you might simply have an application that runs on the private cloud but uses the public cloud as a bank of additional resources when needed.

But how does it actually work?

How it works

Craig Peters and Georgy Okrokvertskhov will be doing a live demo at the Kubernetes Gathering on Wednesday, February 25, but the idea here is to build on the fact that users can easily self-provision applications using Murano. Murano will provide a Kubernetes package, which provides an abstraction layer for Kubernetes and Pods. Developers can then package their applications for use as they normally would, easily adding them to the Kubernetes cluster.

Kubernetes does the same things you expect it to, such as providing Pods that implement the Docker service, monitoring availability and load of the Pods, and scaling Pods up and down based on the Kubernetes configuration. It also coordinates connectivity between the Pods and the underlying infrastructure.

Meanwhile, Murano manages and orchestrates that underlying infrastructure, which consists of OpenStack resources. It configures the virtual network for Kubernetes and the Pods, and uses OpenStack Orchestration (Heat) to provision the resources Kubernetes needs, such as virtual machines and interface connections, network and subnet configs, security groups, router configurations, and storage.

If you’re already using Kubernetes, you’re probably already familiar with how scaling works. Containers are grouped into Pods, and Kubernetes scales the Pods within a Kubernetes cluster, spawning containers on Kubernetes hosts. If you have multiple hosts, Kubernetes distributes the containers among them.

When your application grows to the point where the Kubernetes cluster itself needs to scale, however, the system needs some outside help; an external system needs to add resources. In this case, that “external system” is Murano, which uses OpenStack Telemetry (Ceilometer) to detect when additional resources are needed. Murano adds a new host to the Kubernetes cluster using the Kubernetes “add node” function, and Kubernetes redistributes the load. (Murano can also initiate scaling applications within a cluster, if necessary.)

Kubernetes and OpenStack in Action

Well, that all sounds great in theory, but how do you actually do it? Fortunately, the process is pretty straightforward.

NOTE: The following steps are in development, and will be available will be available for technical preview use on Mirantis OpenStack Express in April 2015.

Deploy an OpenStack cluster, and install Murano. (In Mirantis OpenStack, this is simply a matter of checking the “Murano” box in the “Create Environment” wizard.

Open the OpenStack Dashboard (Horizon).

Click Murano and create a new environment.

Add the Kubernetes application to the environment.

Add the Kubernetes Pod to the environment.

Add an application to the Pod. In this case, we’ll add a web server just so we can see it work.

Remember, you can also see a live demo at the Kubernetes Gathering on Wednesday, February 25. Starting in April, you’ll be able to do this yourself on Mirantis OpenStack Express. Sign up now to be notified when the functionality is available.

Remember, you can also see a live demo at the Kubernetes Gathering on Wednesday, February 25. Starting in April, you’ll be able to do this yourself on Mirantis OpenStack Express. Sign up now to be notified when the functionality is available.

Open the OpenStack Dashboard (Horizon).

Click Murano and create a new environment.

Add the Kubernetes application to the environment.

Add the Kubernetes Pod to the environment.

Add an application to the Pod. In this case, we’ll add a web server just so we can see it work.

Remember, you can also see a live demo at the Kubernetes Gathering on Wednesday, February 25. Starting in April, you’ll be able to do this yourself on Mirantis OpenStack Express. Sign up now to be notified when the functionality is available.

2 responses to “Integrating OpenStack and Kubernetes with Murano”

Hi,
I just started working with mirantis openstack. I wanted to run Kubernetes with my murano account. I tried the same example depicted in the video multiple times, but I get deployment error: “Unable to Deploy. Try again later”. There are no more explanatory error logs.

Due to change in the murano packages in the repository, I could not find Kubernetes and Google cAdvisor packages. Instead I used the KubernetesCluster package which had an option to expose cAdvisor UI at the time of configuration.

Please help me understand why the deployment is not going through for me?
Regards,
Amritesh Randhi

hi, I’m trying to deploy the k8s-docker-suite-app-murano application on OpenStack with Murano. During the configuration, when I need to provide it the ubuntu image for kubernetes, I don’t know how create this image. In the kubernetesCluster directory there is a “readme” file that contains this text:

Where ${murano_agent_root} is a path to murano-agent files
and ${murano_apps_root} is a path to murano-apps files.

Please be careful that diskimage-builder uses tmpfs if 8 Gb memory or bigger is detected.
In case of 8 Gb tmpfs size is not enough to build kubernetes.
Use DIB_NO_TMPFS=1 in this case or hack diskimage-builder.

how can I proceed? can you help me? the same “readme” file is contained in the DockerStandaloneHost directory﻿