What are containers and why do you need them?
This blog post discusses containers, why you should care about them, and how they interact with microservices and the cloud.
“Awww, come on guys, it’s so simple. Maybe you need a refresher course. … It’s all ball bearings nowadays.” (Source: Irwin “Fletch” Fletcher in the 1985 movie “Fletch”).
Sadly, it is not all about ball bearings nowadays. It’s all about containers. If you’ve heard about containers, but not sure what they are, you’ve come to the right place. This blog post addresses the following questions:
- Why should I care about containers?
- What are containers?
- Are containers the same as microservices?
- What is an example of a microservices application?
- What is Docker?
- What are container orchestration and Kubernetes?
- What is the difference between containers and VM images?
- How do you get started with containers?
- How can IBM Cloud Paks help?
- Where can I run my containers?
- What is Red Hat OpenShift on IBM Cloud?
Why should I care about containers?
Across organizations, there is a spectrum of container adoption. Many people are just learning about containers. Some companies are further along in their journey. If you’re at all considering containerization, it’s time to join the fun where you can see real business results:
- Faster time to market: New applications and services are what keep your competitive edge. Organizations are able to triple their speed (300 percent) to deliver new services with development and operational agility.
- Deployment velocity: Move 60 percent quicker from development to deployment. Containerization breaks down barriers for DevOps teams to accelerate deployment times and frequency.
- IT infrastructure reduction: Reduce your costs 40 percent by increasing your application workload density, getting better utilization of your server compute density and reducing software licensing costs.
- IT operational efficiency: Gain 40 percent operational efficiency by streamlining and automating the management of diverse applications and infrastructure into a single operating model.
- Gain freedom of choice: Package, ship, and run applications on any public or private cloud.
(Source: Why Docker? | Docker.com)
What are containers?
The best analogy for understanding containers is a shipping container. That’s why the majority of all container articles and blogs, you see a photo of a shipping container – including this one. I’m sure you’ve seen the transport of those big steel shipping containers. (I’ve also seen some “off-the-grid-type” people using them to build houses and swimming pool.) The shipping industry standardized on a consistent size container. Now, the same container can move from a ship to a train to a truck without unloading the cargo. The container contents do not matter.
Just like a shipping container, a software container is a standardized package of software. Everything needed for the software to run is inside the container. The software code, runtime, system tools, system libraries, settings are all inside a single container.
Are containers the same thing as microservices?
Once you start diving into containers, it’s impossible to avoid reading about microservices. (No, microservices are not those tiny cars you step on in the dark. Those are Micro Machines. Maybe I’m dating myself?) Microservices is an architectural style. A microservices architecture structures an application by using as a collection of loosely coupled services, which deliver specific business capabilities. Containers help make it happen.
What’s an example of an app that uses microservices?
About ten years ago, Netflix was one of the first to begin using containers extensively. They rewrote the applications that ran their entire video service by using a microservices architecture. Netflix estimates that it employs around 700 microservices to control each of the many functions that make up Netlifx. Let’s look at a few (not all 700):
- Video selection: A microservice, in a container, provides your phone, tablet, computer or TV with the video file to play, and at a video quality based on your internet speed.
- Viewing history: One microservice remembers what shows you watch.
- Program recommendations: A microservice takes a look at your viewing history and uses analytics to recommend movies.
- Main menu: One microservice provides the names and images of these movies shown on your main menu.
- Billing: Another microservice deducts the monthly fee from your credit card.
Netflix has about 250 million hours of video per day, with around 118 million subscribers in 190 countries. At this scale, providing entertainment in a matter of a few seconds puts their application to the test. So, yes, containers work for small and the largest of companies. (Source: How Netflix works: the (hugely simplified) complicated stuff that happens every time you hit Play | Mayukh Nair)
What is Docker?
Now that we understand what a container is, it’s time to introduce you to Docker. (I am not referring to the comfortable Casual Friday pants, Dockers.) Docker is the name of the open-source containerization technology that enables the creation and use of containers. It shouldn’t come as a surprise, but IBM is very active in the Docker open source community.
Docker isn’t new, in fact it’s been around since 2008. There are other container options, but most believe Docker has “won” the container war. (Some of you may remember the BlueRay vs. HD-DVD standard battle years ago. BlueRay was triumphant. Docker is like BlueRay using this analogy.) Docker allows you to package, ship, and run applications on any public or private cloud. Being able to run applications anywhere helps you avoid vendor lock-in and move to a new environment anytime.
What are container orchestration and Kubernetes?
There is another critical concept that needs an introduction: orchestration. If you have one container, it is easy to manage. However, as you create more containers, it is crucial to manage them. If you don’t, you likely descend into chaos. (Chaos is not good.) Kubernetes saves you from the aforementioned chaos. (Fun fact: Kubernetes is a Greek word meaning helmsmen or pilot.) Kubernetes is an open source system that pilots or orchestrates your fancy containerized applications. Think of Kubernetes as the crane that moves and controls your containers. As with Docker, IBM is very active in the Kubernetes open source community.
As previously mentioned, Kubernetes orchestrates your containers. What does really mean, though? Kubernetes scales your application up or down. Kubernetes rolls out changes and upgrades to your application. If something goes wrong, Kubernetes rolls back the change and restarts containers that fail, replaces containers when nodes die, and kills off containers that don’t respond to your health check. This management results in saving resources without sacrificing availability and provides auto load-balancing.
What is the difference between containers and VM images?
As the name suggests, a virtual machine is software that emulates a computer system. A VM enables teams to run what appear to be multiple machines on a single computer. If you need to run software on a different type of hardware or operating system, a VM provides that option without using additional hardware.
The primary difference between a container and a VM is that with a VM, the team creates virtual environments – containing operations systems – where different types of software can run. A container, however, isolates the software from the environment and the operating system, enabling it to run almost anywhere. (Source: Containers vs. VMs: What’s the difference?)
How to get started with containers
I could quote a saying like “a journey of a thousand miles begins with a single step.” But, I won’t. The best way to start, is to start – with one container. There are plenty of benefits with containerizing your applications, but the question is where to start? Or, how to start?
Here are three ways to get started:
- Migrate and expand: “Lifting and shifting” is the process of containerizing an on-premises application to lift it (usually from a data center) and then shifting it somewhere else, which is usually a public or private cloud. To point out, “Lifting and Shifting” is not refactoring or breaking apart your application. It is putting all or most of the application into a single container.
- Application modernization: A more aggressive approach is to take your monolithic application and refactor it into microservices containers. This approach is moving from one development approach to another.
- New development: Finally, some organizations choose to start all new development by using containers.
How can IBM Cloud Paks help?
Beyond containers and Kubernetes, enterprises need to orchestrate their production topology, and to provide management, security, and governance for their applications. Enter IBM Cloud Paks.
IBM Cloud Paks are enterprise-ready, containerized software solutions that give an open, faster, and more secure way to move core business applications to any cloud. Each IBM Cloud Pak runs on Red Hat® OpenShift® on IBM Cloud™ and Red Hat Enterprise Linux and includes containerized IBM middleware and common software services for development and management, on top of a common integration layer. This video explains the architecture.
To learn more about the available Cloud Paks for Applications, Data, Integration, Automation, and Multicloud Management, see IBM Cloud Paks.
Where can I run my containers?
Remember, Docker – and IBM Cloud Paks – allow you to package, ship, and run applications on any public or private cloud. Most organizations today do not lock in with one cloud vendor. This approach a good practice. Seventy-one percent of companies use three or more clouds, and eight out of ten are committing to a multi-cloud strategy.
There are three different types of cloud environments to consider:
- Public Cloud: A public cloud is a multi-tenant environment but is fully managed and provides usage-based pricing. IBM Cloud, AWS, and Azure are public clouds. You can run your IBM Cloud Paks in any of these clouds.
- Dedicated Cloud: A dedicated cloud provides the benefits of a public cloud with dedicated infrastructure. A dedicated cloud meets many industry regulatory requirements. Also, you are not sharing compute capabilities with others.
- Private Cloud: A private cloud provides you the benefits of cloud computing, but behind your firewall. IBM offers Red Hat OpenShift on IBM Cloud, a comprehensive service that offers fully managed OpenShift clusters on the highly scalable and reliable IBM Cloud platform. You get the keys, but it runs in a secure IBM data center.
What is Red Hat OpenShift on IBM Cloud?
Containers, Docker, Cloud Paks, and Kubernetes. Yes to all? Red Hat OpenShift on IBM Cloud brings it all together for you. It leverages IBM Cloud, so you can focus on developing and managing your applications. IBM handles the infrastructure, providing you with a highly available, fully managed OpenShift cluster with the click of a button. Check out the video A guided tour of Red Hat OpenShift on IBM Cloud for more details.
Red Hat OpenShift on IBM Cloud is directly integrated into the same Kubernetes service that maintains 250 billion on-demand forecasts daily at The Weather Company. That is a lot.
Get the details of capabilities such as dashboards with a native OpenShift experience, continuous availability with multi-zone clusters, and moving workloads and data more securely, at Red Hat OpenShift on IBM Cloud.
Containers are building blocks for the future. More than the new “bright shinny object,” they are here to stay. From delivering applications more quickly, to supercharging development to deployment, to reducing infrastructure and software costs, containers provide both small and large organizations with real business results. The following links provide more resources, including videos, hands-on test drives, tutorials, and other helpful information to help you get started today.
- What is a Docker container?
- What is Kubernetes?
- What is Red Hat OpenShift?
- What is the difference between Kubernetes and OpenShift?
- What are IBM Cloud Paks?