Loading, please wait...

A to Z Full Forms and Acronyms

PaaS Platform based on Docker

In This Article, we'll discuss the Docker PaaS and Platform based on Docker

With the development of Internet technology and the popularity of cloud computing technology, organizations or companies try to build a private cloud platform. PaaS is a form of cloud computing service resource and provides an application development environment. As the existing PaaS platform hosting and virtual machine environment simplification of the problem of excessive consumption of resources, we have conducted in-depth research on the PaaS platform in this paper. We propose a mechanism to create a PaaS platform based on Docker. Docker provides running application solutions and is built on a lightweight virtualization LXC container. We also develop a dashboard to facilitate users' operations. Even though users do not know the professional knowledge of the cloud, they can easily deploy their applications.

Introduction
Cloud computing is a form of shared computing resources, and make the centralizing computing resources fully utilized by a specific form. Cloud computing platform based on the sharing of resources is divided into three levels of cloud computing: IaaS (Infrastructure as a Service), PaaS (Platform as a Service) and SaaS (Software as a Service). PaaS is an important service mode in cloud computing, PaaS is between SaaS and IaaS. PaaS provides a much easier operation and deployment environment for application software. However, there are some deficiencies in the existing PaaS platform. Firstly, the PaaS platform of the application-hosting environment is single and provides only the operating environment particular programming language or scripting language. Secondly, the components of the PaaS platform are closed. Lastly, virtual machines consume excessive resources. So the PaaS platform proposed internet applications will focus on and address the following issues. Firstly, the platform should provide a runtime environment for a variety of applications. It not only supports popular programming and scripting languages and also provides stronger compatibility and a more versatile operating environment. So the virtual machine is also provided as a runtime environment for the application. Secondly, the platform can not only provide the ability that providing an open assembly mechanism to users and allow a third party to provide capabilities based on this platform. Lastly, we should find a more lightweight virtualization solution to reduce resource consumption. This paper is to research and implement a lightweight PaaS platform to meet the individual needs of users and simplify users’ work.

System Design
This paper is designed and implemented PaaS platform based on Docker and divided into the following areas.
Environment Deployment.
The PaaS platform is deployed on the OpenStack and uses the OpenStack virtual machine to deploy. It is a master/slave architecture in this cluster. The API server is deployed in the master node as the entry system. It encapsulates the Docker container add, delete, change and other operations and
is provided to external customers and internal components to call.

Web Management Interface.
The web management interface is written by the Spring MVC framework. It is mainly through a separate model, view and controller role in the application business logic decoupled from the interface. Typically, the model is responsible for encapsulating application data displaying in the View layer. View just show these data, it does not contain any business logic. The controller is responsible for receiving requests from the user and calling back services to handle business logic. After processing, the background business layer might return some data and show it in the view layer. The controller collects the data and prepared the model and displays it in the View layer. The core idea of the MVC pattern is to separate business logic from the interface and allow them to change independently without affecting each other. In the Spring MVC application, the model usually consists of POJO objects. It is treated in the business layer and persistent in the persistence layer. The view usually is the JSP template written with JSP Standard Tag Library. The controller section is the responsibility of the
dispatcher servlet. GET, PUT, DELETE and other methods of RESTful API [6] are called on the web interface. We can view the status of pods and nodes in the cluster and also achieve the creation, delete and other operations of the pod on the web interface. The graphical interface is more convenient for users.
Docker Cluster Management.
Docker cluster communication uses flannel network configuration mode. Flannel allows Docker containers created on different nodes in the cluster to have a cluster-unique virtual IP address. So that we can be able to communicate with Docker in different containers directly through the IP network.

VNCserver can be used to achieve web access to Docker containers. VNCserver is to meet the distributed users to share server resources. NoVNC is a VNC client based on HTML5. We install VNCserver in Docker container and access the Docker container through IP: Port. We deploy the docker registry as our private registry. And we can make Docker images using Dockerfile according to users’ needs. It is convenient for users to deploy their applications or environments.
System Implementation
Docker cluster management uses the Kubernetes management system [5]. It is built on Docker technology, providing the container resource scheduling of the application, the deployment operation, service discovery, expansion of volume reduction and other functions. Its architecture is shown in Figure 1.

Figure 1

We choose three virtual machines to deploy the PaaS platform in the OpenStack platform. We install the Kubernetes with the source compiler on the ubuntu 19 operating system. It is a master/slave architecture in this cluster. There are two minion nodes and one master node. The master node is also the minion node.
We use the flannel network as the way of communication with pods in the different nodes. Flannel runs an agent, flanneld, on each host and is responsible for allocating a subnet lease out of a preconfigured address space. Flannel uses etcd to store the network configuration, allocated subnets, and auxiliary data (such as host's IP). The forwarding of packets is achieved using one of several strategies that are known as backend. The simplest backend is UDP and uses a TUN device to encapsulate every IP fragment in a UDP packet, forming an overlay network. Etcd is a highly-available key-value store which we use for persistent storage of all of its REST API objects. It serves as the backbone of distributed systems by providing a canonical hub for cluster coordination and state management – the source of the system of truth. We use Docker as the basic component and deploy them in every node. Now comparison traditional virtualization with Docker technology architecture is shown in Figure 2. Traditional virtualization technology is at the hardware level virtualization and needs to have additional virtual machine management application and virtual machine operating system layer [10]. Docker container is a virtualized, direct reuse local host operating system on the operating system level, and therefore is more lightweight.

Virtualization           Docker virtualization
Figure 2
 
We develop a dashboard using the Spring MVC framework. The processing flow is shown in Figure 3. In this project, the general style of the API is RESTful - clients create, update, delete, or retrieve a description of an object via the standard HTTP verbs (POST, PUT, DELETE, and GET) - and those APIs preferentially accept and return JSON. Then we parse the JSON strings and show them in the web dashboard.

Figure 2
Figure 3

VNCserver is to meet the distributed users to share server resources and is opened on the server. NoVNC is the VNC client based on HTML5. It is widely used in the major cloud computing and virtual machine control panels, such as OpenStack Dashboard and OpenNebula Sunstone. NoVNC is achieved by WebSockets, but current many VNC servers do not support WebSockets. NoVNC does not directly connect to the VNC server and needs the proxy to turn to convert between WebSockets and TCP sockets. Docker uses the Docker hub to store images. Users create containers by pulling images from the Docker hub. The problem is that the network delay is so long. So we deploy a private registry to store our images. And we can make images by Dockerfile to meet users’ demands. The registry is deployed in the container in the node. In this cluster, we deploy a DNS cluster addon. The running DNS pod holds three containers – skydns, etcd and kube2sky. The etcd is a private instance which skins use and the kube2sky process watches the master for changes in Services and then writes the information to etcd which skydns reads.

A to Z Full Forms and Acronyms