Open-source container cloud OpenShift: Building a Kubernetes-based enterprise application cloud platform -1.4 Docker, Kubernetes, and OpenShift-Alibaba Cloud Developer Community

The abstract of this section is from Chapter 1, Chapter 1 of open source container cloud OpenShift: building an enterprise application cloud platform based on Kubernetes by Huazhang Publishing House. Section 4, author Chen Geng. For more chapters, visit the "Huazhang computer" public account of Yunqi community.

1.4 Docker, Kubernetes and OpenShift

many friends who have just come into contact with OpenShift will have such a question: "What is the relationship between Open-Shift and Docker and Kubernetes?" OpenShift is a cloud platform built based on container technology. The container technology mentioned here includes Docker and Kubernetes. As shown in Figure 1-3, the underlying layer of the OpenShift uses Docker as the container engine driver and Kubernetes as the container orchestration engine component. OpenShift provides elements such as development language, middleware, automation process tools and interfaces, and a complete container-based application cloud platform.

1.4.1 Container Engine

Docker can build an isolated, stable, secure, and high-performance Container Runtime environment. Currently, OpenShift use native Docker as the container engine of the platform to provide a reliable and secure runtime environment for upper-layer components and user applications. Docker has a very large user base. Docker-based engines reduce user learning costs. Users who are familiar with Docker can easily get started. Docker Hub has a large number of image resources. For most of the software we use in daily life, you can find official or community-contributed images on Docker-Hub. All these images can run seamlessly on the OpenShift platform. Red Hat itself is a major contributor to Docker. They have a strong influence on the community and a strong leadership in the development of this technology. This is very critical for enterprise users, because no one wants to invest in a technology that has no prospect or is outdated. It is noteworthy that the Docker used by OpenShift is a native Docker without any modification of the closed source. For historical reasons, some application cloud platforms, such as CloudFoundry, are compatible with Docker. Copy part of the Docker source code and add it to their Container engines to read the content of the Docker image, and then start a non-Docker container instance. Personally, I think this compatible approach is worth discussing. This reminds me of the practice that BlackBerry (BlackBerry) launched compatible running Android applications in its own system after the rise of Android in those years in order to save the declining trend. As a user of BlackBerry Z10, I like that exquisite mobile phone very much, but I have to say that running Android applications on BlackBerry system is simply a nightmare.

1.4.2 Container Orchestration

the popularity of Docker makes it easier for people to think of Docker or even only Docker when they mention containers. However, the reality is that Docker is just a point in container technology. Docker is an excellent and popular Container Engine. However, when an enterprise or an organization wants to apply container technology to production on a large scale, in addition to an excellent container engine that provides a stable, reliable, and efficient runtime environment, you need to consider cluster management, high availability, security, and continuous integration. A container engine alone cannot meet the requirements of container technology in production environments, especially in large-scale production environments. In a large-scale container deployment environment, hundreds of physical machines or virtual machines running on IaaS are often involved. Facing a large number of machine clusters, users are facing great management challenges. For example, we need to start 100 container instances on 100 machines, it is crazy to run the docker run command on 100 machines manually. For another example, we want 20 containers to be deployed in the US data center, 20 containers to be deployed in the Shanghai data center, and 20 containers to be deployed on servers with SSDs in the Shenzhen data center, 20 containers are deployed on machines with 10 gigabit NICs in Shenzhen data centers. It is very inefficient to implement complex deployment requirements through manual or traditional automation tools. The reality is that in order to meet the scheduling, network, storage, performance and security requirements of container clusters, we must have professional tools and platforms. These issues related to container cluster management are actually issues related to container orchestration, that is, Kubernetes issues to be solved. Kubernetes is a summary of Google's experience in using containers for more than a decade. Although the containers used by Google are containers before the Docker era, business applications have the following capabilities: security, performance, isolation, network, the storage and scheduling requirements have not changed in essence. Google has chosen to open source Red Hat together with Kubernetes, and its attention on GitHub is far higher than that on other similar platforms, in the future, container orchestration is likely to become a fact standard similar to Docker ". Kubernetes Project GitHub repository: https://github.com/kubernetes 。 OpenShift integrates Native Kubernetes as a container orchestration component. OpenShift manages machine nodes and containers in a container cluster through Kubernetes, and provides container scheduling for business applications: quickly deploy containers to specified targets according to business requirements. Auto Scaling: you can quickly scale up or down the number of running instances of containers as needed. Abnormal self-healing: When an exception occurs to a container instance, the cluster automatically detects, processes, and restores the service status. Persistent volumes: provides intelligent docking of persistent volumes for containers scattered on different machines in the cluster. Service Discovery: provides service discovery and load balancing functions for service microservices. Configuration Management: provides flexible configuration management and distribution rules for business applications.

1.4.3 container application cloud

as mentioned above, Container Engine and container orchestration are the important cornerstone of container technology. By mastering these two cornerstones, users can operate and maintain large-scale container clusters. In reality, one of the ultimate goals for users to consider using the container application platform is to improve production efficiency. Container Engine and container orchestration components are two key technologies, but technologies alone cannot meet the production efficiency requirements. On the basis of these technologies and frameworks, there must be richer content and more friendly user access methods to transform these technologies into real productivity. OpenShift provides various functions based on Docker and Kubernetes to meet the production efficiency requirements of business applications, R & D users, and O & M users. Application Development Framework and middleware. OpenShift provides a wide range of out-of-the-box programming development frameworks and middleware, such as Java, PHP, Ruby, Python, JBoss EAP, Tomcat, MySQL, MongoDB, and JBoss Middleware. The Directory of applications and services. OpenShift provides services and application directories in the software market, allowing users to deploy various applications and services with one click, such as Hadoop clusters and Spark clusters. Automated processes and tools. OpenShift has built-in automated process tool S2I(Source to Image) to help you compile, build, and publish images automatically. The custom network of the software. Through OpenVSwitch,OpenShift provides users with flexible and robust software-defined networks. Implement cross-host shared network and multi-tenant isolated network mode. Performance Monitoring and log management. OpenShift provides out-of-the-box performance monitoring and log management components. Through the platform, the business can quickly obtain the running status indicators, collect and analyze business logs. The multi-user interface. OpenShift provides a friendly Web user interface, command line tools, and RESTful API. Automated cluster deployment and management. OpenShift implements automatic cluster deployment through Ansible and provides interfaces for automatic cluster expansion. From the previous introduction, we can learn that OpenShift has made innovations in various aspects based on Docker and Kubernetes, with the ultimate goal of providing an efficient and highly productive platform for users and business applications.

Selected, One-Stop Store for Enterprise Applications
Support various scenarios to meet companies' needs at different stages of development

Start Building Today with a Free Trial to 50+ Products

Learn and experience the power of Alibaba Cloud.

Sign Up Now