You are on page 1of 23

Mobile Networks and Applications

https://doi.org/10.1007/s11036-020-01620-5

The Implementation of a Cloud-Edge Computing Architecture


Using OpenStack and Kubernetes for Air Quality Monitoring
Application
Endah Kristiani 1,2 & Chao-Tung Yang 3 & Chin-Yin Huang 1 & Yuan-Ting Wang 4 & Po-Cheng Ko 3

# Springer Science+Business Media, LLC, part of Springer Nature 2020

Abstract
The combination of edge and cloud computing is going to make the Internet of Things (IoT) rapid, light, and more
reliable. IoT and cloud-edge computing are distinct disciples that have evolved separately over time. However, they
are increasingly becoming interdependent, and are what the future holds. A crucial aspect is how to design a
compound of cloud and edge computing architectures, and implement IoT effectively. In this paper, we proposed
a combination of Cloud and Edge Computing architecture and built a set of an intelligent air-quality monitoring
system in Tunghai University as a case study. In this case, we implemented container-based virtualization which
constructs Kubernetes Minion (Nodes) in the Docker container service independently for each service on the Edge
side. Finally, to monitor the high-performance computing systems, clusters, and networks, we used Ganglia
Monitoring System. Ganglia collects relevant information such as Central Processing Unit (CPU), memory, network
and usage of Protocol Data Unit (PDU) to monitor the power consumption and makes a measurement and evaluation
for Kubernetes Pods.

Keywords Internet of things . Cloud computing . Edge computing . OpenStack . Microservices . Kubernetes . Container-based
virtualization

1 Introduction government, enterprise and personal are getting some


change with the born of cloud computing. In the IT
Cloud computing has a massive change in industry de- industry, cloud computing is undoubtedly caused a sig-
velopment after the Internet. Not only the Information nificant impact. From the most basic computer compo-
Technology (IT) industry which provides cloud comput- nents †“processors, servers, storage devices, network
ing technology but also the general using way of the equipment, information security equipment, software,

* Chao-Tung Yang 1
Department of Industrial Engineering and Enterprise Information,
ctyang@thu.edu.tw Tunghai University, Taichung 40704, Taiwan, R.O.C.

Endah Kristiani 2
Department of Informatics, Krida Wacana Christian University,
endahkristi@gmail.com Jakarta 11470, Indonesia
Chin-Yin Huang
3
huangcy@thu.edu.tw Department of Computer Science, Tunghai University,
Taichung 40704, Taiwan, R.O.C.
Yuan-Ting Wang
yttom@cht.com.tw 4
Cloud Computing Laboratory, Chunghwa Telecom Laboratories,
Po-Cheng Ko Taoyuan City 326, Taiwan, R.O.C.
pocheng0605@gmail.com
Mobile Netw Appl

data centers, information services, even though In this paper, we started from the network virtualization
smartphone, tablet computer, and other emerging mobile and added software-defined networking (SDN) Controller
devices are unable to break off relations from cloud [14] and OpenDaylight to Neutron network architecture
computing. Along with cloud computing development, of OpenStack. Differences in network performance im-
Internet of Things (IoT) industry has grown substantial- provement and comparison with the original Neutron ar-
ly. So that, it triggers an exponentially increasing chitecture will ultimately provide the best open source
amount of data which need to improve data analysis architecture for edge computing and IoT applications
process [1]. While cloud computing is essential to the [15].
success of IoT, and pure cloud computing itself not In particular, this work aims to propose an architecture of
quite adequate for faster data analysis. The long dis- cloud-edge computing combined with IoT for air quality mon-
tance of the network logic between the cloud and the itoring. Specific purposes are the following:
end device might easily cause Network delay, thereby
affecting the system can not respond promptly. In this & Deploy a complete set of cloud-edge computing architec-
case, the concept of edge computing [2, 3] meets the tures and IoT using container-based virtualization which
need for faster data analysis. Edge computing is a form constructs Kubernetes Minion (Nodes) in the Docker con-
of cloud computing, which pushes data processing out tainer service independently for each service on the Edge
to the edge device to handle. This mechanism transports side.
only the results of the data processing over networks. & Evaluate and monitor the high-performance computing
Therefore, it provides accurate results and consumes systems, clusters, and networks using Ganglia
more lightweight network bandwidth than independent Monitoring System.
cloud computing. Moreover, Docker and Kubernetes
when combined together provide best solutions by ef- The rest of the paper is organized as follows. Section 2
fectively organizing containerized applications. describes the background and related work. Section 3 presents
In this paper, we integrated open source software to the experimental environment and system architecture.
implement a complete set of edge computing architec- Section 4 shows the preliminary results and discussion. The
tures. Edge computing between IoT devices and the last one, Section 5 provides a conclusion and the future work
cloud establishes a relay station to store the data col- of this paper.
lected by the sensors and provide the most immediate
preprocessing and response [4]. The campus air-quality
monitoring system mainly distributes Arduino sensors 2 Background review and related works
on campus [5, 6]. Through LoRa, Low Power Wide
Area Network (LPWAN), LoRa uses star topology to In this section, we provide several components that are ap-
allow All nodes to send data to LoRa Gateway, and proaching in this paper: Cloud Computing, Edge Computing,
then upload to the cloud. In the cloud, OpenStack main- OpenStack, Kubernetes, and so on. The next sections discuss
ly built as Infrastructure as a Service (IaaS) platform. each component in more detail.
Through virtualization technology, OpenStack can estab-
lish a cluster to provide various virtualized services 2.1 Cloud computing and edge computing
such as storage Virtualization, network virtualization,
CPU virtualization and so on [7]. To maximize the uti- 2.1.1 Cloud computing
lization of hardware resources, we set up the control
node (Kubernetes Master) on OpenStack as a central Cloud computing is an information technology (IT) paradigm
service control, and use Ceph Storage as a complete that enables universal access to shared pools of configurable
system data backup mechanism [8, 9]. On the Edge system resources and higher-level services that can be rapidly
side, we set up the Raspberry Pi as the Edge Gateway provisioned with minimal management effort, often over the
and Kubernetes minion on the Raspberry Pi [10] to Internet. Cloud computing relies on sharing of resources to
provide the service application, which contains MySQL achieve coherence and economy of scale, similar to a utility
database [11] for data storage, and the MQTT Broker [16].
for exception notification [12]. Third-party clouds enable organizations to focus on their
The second phase of the platform is a benchmark test core businesses instead of expending resources on computer
to verify Kubernetes in creating containers, memory con- infrastructure and maintenance. Advocates note that cloud
sumption, CPU performance, and power consumption computing allows companies to avoid or minimize up-front
[13]. At this point, edge computing can be the best so- IT infrastructure costs. Proponents also claim that cloud com-
lution and the efficiency of the Monitoring Application. puting will enable enterprises to get their applications up and
Mobile Netw Appl

to run faster, with improved manageability and less mainte- Wi-Fi, Bluetooth, etc., so delivery of information becomes
nance, and that it allows IT teams to more rapidly adjust re- fast [17, 18]. Table 1 compare the different of Cloud and
sources to meet fluctuating and unpredictable business de- Edge Computing.
mand. Cloud providers typically use a pay-as-you-go model,
which can lead to unexpected operating expenses if adminis-
2.2 OpenStack
trators are not familiarized with cloud-pricing models.
Since the launch of Amazon EC2 in 2006, the availability
OpenStack [19] is a free and open-source software platform
of high-capacity networks, low-cost computers and storage
for cloud computing, mostly deployed as infrastructure-as-a-
devices as well as the widespread adoption of hardware
service (IaaS), whereby virtual servers and other resources are
virtualization, service-oriented architecture, and autonomic
made available to customers. The software platform consists
and utility computing has led to growth in cloud computing.
of interrelated components that control diverse, multi-vendor
hardware pools of processing, storage, and networking re-
2.1.2 Edge computing
sources throughout a data center. Users either manage it
through a web-based dashboard, through command-line tools
The rapid development of Machine Learning and Big Data has
or through RESTful web services [20]. OpenStack began in
led to a lot of Model or Pattern finding based on Data Science
2010 as the project of Rackspace Hosting and NASA. As of
saved in Cloud Computing or data centers. Although Cloud
2016, it is managed by the OpenStack Foundation, a non-
Computing can get the result of data analysis, Cloud
profit corporate entity established in September 2012 to pro-
Computing Major data centers or on a fixed geographical
mote OpenStack software and its community. More than 500
location, such as people in Taiwan, data analysis but to the
companies have joined the project [21].
United States, the inevitable delay of the network still exists.
Several of Cloud Computing’s leading vendors, including
Microsoft, Amazon, and Google, have come up with the con- 2.3 Docker
cept of edge computing. Edge Computing, also known as Fog
Computing, refers to moving data processing and computa- Docker is an open platform for developing, shipping, and
tion closer to data sources on a logical network to shorten the running applications. Docker enables us to separate our appli-
delay of network transmission and obtain faster data Analysis, cations from our infrastructure so we can deliver software
or faster access to feedback. quickly. With Docker, we can manage our infrastructure in
Edge computing is a method of optimizing cloud comput- the same ways we manage our applications. By taking advan-
ing systems by performing data processing at the edge of the tage of Docker’s methodologies for shipping, testing, and
network, near the source of the data. IoT applications are deploying code quickly, we can significantly reduce the delay
ideally suited for edge computing architectures, especially in between writing code and run it in production. Docker Engine
emerging IoT applications such as self-driving, drone, aug- is a client-server application with these major components:
mented reality (AR) / virtual reality (VR), and robotics.
Edge computing can be performed in a large computing & A server which is a type of long-running program called a
device or a local network of many small and medium-sized daemon process (the docker command).
computing devices or devices because it is operated in a net- & A REST API which specifies interfaces that programs can
work environment close to the data source where the network use to talk to the daemon and instruct it what to do.
is located. These computing devices can be a personal device & A command line interface (CLI) client (the docker
(such as a smartphone or wearable device), an end device command).
(such as a gateway, surveillance camera, bank ATM), or other & Templates can also specify the relationships between re-
IoT devices. As the computing device and device close to each sources (e.g., this volume is connected to this server). The
other, the network transmission more direct, such as through template enables Heat to call out to the OpenStack APIs to

Table 1 Comparison between


Cloud computing and Edge Cloud computing Edge computing
computing
Complex analytics Basic data visualization
Big Data mining Basic data analytics and short term data historian features
Sources of business logic Datacaching, buffering and streaming
Machine learning rules Data pre-processing, cleansing, filtering and optimization
Advanced visualizations Some data aggregation
Long term data storage/warehousing Device to Device communications/M2M
Mobile Netw Appl

Fig. 1 System architecture

create all of our infrastructures in the correct order to Language agnostic APIs. One of the concepts that
launch our application ultimately. microservice architecture applies to software architectural
& Heat manages the whole lifecycle of the application - style is Dew Computing, which refers to the computing power
when we need to change our infrastructure, modify the that comes together from much small dew (the functional
template and use it to update our existing stack. Heat elements that represent microservices).
knows how to make the necessary changes. It will delete
all of the resources when we are finished with the appli- 2.5 Kubernetes
cation, too.
& Heat primarily manages infrastructure, but the templates Kubernetes is a powerful system, developed by Google, for
integrate well with software configuration management managing containerized applications in a clustered environ-
tools such as Puppet and Chef. The Heat team is working ment [22]. It aims to provide better ways of managing related,
on providing even better integration between distributed components across the varied infrastructure.
Kubernetes is a system for managing containerized applica-
tions across a cluster of nodes.
2.4 Microservices When developing maintenance, the best hope is to monitor
it continuously after deployment. When any server is
Microservices is a software architecture style based on Small overloaded, it is expected to expand automatically. Servers
Building Blocks that focus on a single responsibility and func- will be automatically reduced when traffic is sluggish.
tion, using a modular approach to assemble complex, large- Besides, the most important thing is that when a server hangs
scale applications. Each of the functional areas Blocks com- point, we hope it can be automatically repaired, and at any
municate with each other using the Language-Independent / time must maintain the number of service instances. Many of

Fig. 2 Device architecture


Mobile Netw Appl

Fig. 3 Edge Architecture

the above functions Docker can help we do, and use the con- Kubernetes is a distributed system; the main compo-
tainer to provide services. This type of service is called CaaS nents are: Master as the master, can be used as the
(Container as a Service), and it looks like everything is fine. master node. Node is a worker, which runs many con-
But Docker containers are not a panacea. How to manage the tainers. May want to make a virtual machine. K8S can
life cycle of clusters and services in the ever-increasing num- handle up to 1000 nodes or more, Kubernetes uses mas-
ber of containers/services will be the orchestration capability ters and nodes to deploy cluster. Master contains three
of each container. One of Google’s Kubernetes is a very so- basic components, Etcd, API Server, Controller Manager
phisticated container layout management tools [22]. Server. A node consists of four basic components
Kubernetes is particularly well-suited for microservices Kubelet, Proxy, Pod, Container.
such architectures. Combining several containers into a
single service, Kubernetes also provides a good service 2.6 MQTT
discovery mechanism for each service to communicate
with one another. Most importantly K8S powerful pro- MQTT is a protocol developed in 1999 by Dr. Andy
gramming can automatically expand services, and even Stanford-Clark, IBM, and Dr. Arlen Nipper, Arcom
for large-scale containers for rolling updates (Rolling (Eurotech). MQTT stands for Message Queuing
update) and rollback (Rolling back / Undo), but also Telemetry Transport [24], a set of dedicated push-to-
can integrate CI / CD and other DevOps tools, talk systems for Machine-to-Machine (M2M) systems
Absolutely allow users to manage the largest system that can be imagined as the Internet for IoT machine
with the least effort [23]. communication Socket or Line. Because the content of

Fig. 4 Data Flow (Device and


Edge)
Mobile Netw Appl

Fig. 5 Data Flow (Cloud)

the MQTT protocol is streamlined, it is ideal for IoT provides data, compute, storage, and application services to
devices with limited processor resources and network end-users. The distinguishing Fog characteristics are its prox-
bandwidth. imity to end-users, its dense geographical distribution, and its
The underlying MQTT and HTTP are TCP / IP, that support for mobility. Services are hosted at the network edge
is, IoT devices can use existing network infrastructure or even end devices such as set-top-boxes or access points. By
and equipment, but the message format that flows over doing so, Fog reduces service latency, and improves QoS,
the Internet and the application processing mechanisms resulting in superior user-experience. Fog Computing sup-
are different. HTTP request instructions have too much ports the emerging Internet of Everything (IoE) applications
header information, which is redundant for IoT applica- that demand real-time/predictable latency (industrial automa-
tions and consumes network bandwidth. MQTT is the tion, transportation, networks of sensors and actuators).
same as HTTP header description, MQTT header digital Thanks to its wide geographical distribution the Fog paradigm
encoding, the entire length of only two bytes, equivalent is well positioned for real-time big data and real-time analyt-
to two characters, followed by the message of the topic ics. Fog supports densely distributed data collection points,
and content(payload). hence adding a fourth axis to the often mentioned Big Data
dimensions (volume, variety, and velocity) [25].
2.7 Related works Tsai et al. propose a fog computing platform for distributed
analytics [26]. This platform integrates resources from the
The Cisco introduced Fog Computing Systems as a new mod- data center to end devices. Their study leverage the devices
el to ease wireless data transfer to distributed devices in the to run IoT and multimedia applications and take different sen-
Internet of Things (IoT) network paradigm. Cisco defines Fog sor data, including a camera, microphone, and so on. In this
Computing as a paradigm that extends Cloud computing and paper, they focus on implementing a platform, which supports
services to the edge of the network. Similar to Cloud, Fog complicated analytics, such as Deep Learning to avoid

Fig. 6 Lora Node Fig. 7 Lora Gateway


Mobile Netw Appl

Fig. 8 Lora Network Setting

sending a large amount of raw data to powerful data centers VMs of different sizes. Results showed that OpenDaylight is
for analyzing. They adopt three known open-source projects, consistently the fastest of all other plugins under test under all
including TensorFlow, Docker, and Kubernetes to implement tested network conditions [27].
a fog computing platform. They conduct extensive measure-
ment and quantify performance.
Aqsa Malik et al. evaluated the ability of four OpenStack 3 System design and implementation
Neutron plugins, OpenDaylight, OFAgent, ML2, and Ryu, to
continue to provide useful services in the face of network In this section, we present our system and implementation in
perturbance on the management network. This analysis was two stages. First, we design the cloud-edge computing archi-
performed using OpenStack’s tenth release, named Juno. tecture and the monitoring system performance. Second, we
They devised two different experiments. The first experiment deploy cloud-edge computing on the campus as our case
evaluated performance regarding spawning time of batches of study.

Fig. 9 Data visualization on ThingSpeak


Mobile Netw Appl

Fig. 10 Raspbian Jessie

3.1 System design 3.1.1 System architecture

In this section, we present system architecture, device archi- In this work, we establish an edge computing architec-
tecture, edge architecture, cloud architecture, and system mon- ture for IoT applications [28]. The main system is di-
itoring and evaluation tool. vided into three parts: device side, cloud side and edge

Fig. 11 MySQL
Mobile Netw Appl

3.1.2 Device architecture

Devices such as sensors, Raspberry Pi, Arduino, Linkit


One and so on. The platform also applies to different
transmission protocols such as ZigBee, MQTT, WiFi,
NB-IoT, Bluetooth and so on. The overall architecture
is shown in Fig. 2, mainly using Arduino LoRa Shield
module and Pms5003t sensor as the overall sensing
module and LoRa sensing data collected by LoRa
Nodes will be transmitted to LoRa Gateway through
LoRa. In this process, LoRa offers the Low Power
Wide Area Network (LPWAN) and the star-topology,
and the LoRa Gateway is also connected to the minia-
ture ramps made by the Raspberry Pi 3 for final unified
delivery to the data center(cloud).
Fig. 12 Docker version
3.1.3 Edge architecture

In the Edge section, the main design is the Instant


ramp (as shown in Fig. 1), the device side is the sensor Provision of Services. The overall environment is set up
and alarm side, can accommodate many different IoT on the Raspberry Pi, which is a Linux-based PC that dif-
devices and transport agreements. Part of the cloud for ferentiates itself from other IoT-based control chips. On
the virtual machine and Kubernetes master side, but also the Linux operating system, we can create the required
deal with data backup, complex operations, and data software as needed. This article first set up Kubernetes
visualization and other applications do not need to re- Minion to provide services and applications, so the ser-
spond quickly. Finally, the part of the ramp is mainly vices are all deployed in Docker containers [10]. The con-
responsible for running services and applications, such tainerized deployment brings Lightweight, fast and easy to
as data reception and exception notification. Data recep- migrate. Kubernetes treats multiple containers as one pod.
tion is pre-processed via the edge ramp, which greatly Whereas a single pod contains multiple containers.
reduces the amount of cloud transmission and storage Running the services, they perform simultaneously, pro-
load. All services run on the Docker container for real- viding a copy mechanism to allow the container to run a
izing the microservices architecture. Besides, informa- specified number of new containers if it is corrupted; If
tion is also stored on the edge gateway, such as the there are multi-run container will be automatically deleted,
cloud storage of unexpected conditions, but also through saving the complexity of Victoria transport, significantly
the edge of the ramp data to stabilize service operation. improve service stability, known as HA (High Available).

Fig. 13 Kubernetes cluster


Mobile Netw Appl

Fig. 14 MQTT Push Notification

The existence of a copy mechanism also brings another key OpenStack environment, only need to face a single storage
advantage, called the rolling update mechanism (Rolling up- system. Moreover, the Cloud side mainly deals with complex
date). Under the condition of running multiple containers, if operations [31]. We built Apache Spark to provide In-memory
we need to replace the version of the application, we can issue decentralized computing [32–34], and finally visualize the
a rolling update instruction. Kubernetes replaces the container r e s u l t s o f t h e op e r a t i o n th r o u g h t h e E L K S t a c k
versions one by one, allowing the service to continue running (Elasticsearch, Logstash, and Kibana) [35]. The figure below
without downtime. Kubernetes brings the effect of clustering. is the operation process after entering the cloud [11]. We can
We can build multiple Raspberry Pi as Kubernetes minions. follow Fig. 5 to understand the data processing method in the
The clustered architecture can provide load balancing. cloud.
Kubernetes automatically uses the node with less resource
utilization as the target host for pod startup. Find the best 3.1.5 Monitoring and evaluation tool
trade-off between high usage and high load. At the edge, the
first services are receiving data from LoRa, transferring data to We developed a set of cloud-edge and IoT architecture using
the cloud, MySQL RDB as data storage and MQTT Broker as container-based virtualization on the edge side. From this ar-
an alert push system. The overall architecture is shown in chitecture, we can measure and analyze:
Fig. 3.
The Fig. 4 below shows the system information flow of 1. Booting Time of Kubernetes Pods
equipment end and edge end. With this Unified Data 2. Cluster Load (loads/procs)
Modeling (UML) system, we can show the application flow
and data flow of each stage.

3.1.4 Cloud architecture

On the Cloud side, it mainly builds OpenStack cluster infra-


structure services and provides the servers needed by the
Internet of Things through virtualization technologies.
OpenStack also provides network virtualization through the
neutron suite. This dissertation integrates with OpenDaylight
as the SDN Controller used by OpenStack, OpenDaylight
communicates with the Neutron Server via the northbound
interface Neutron Bound. ODL leverages OpenFlow and
OVSDB to manage Open vSwitches for OpenStack compute
nodes, providing L2, L3, LoadBalanceService, and
FirewallService. With Ceph Storage on storage, Ceph pro-
vides decentralized storage and supports both Block Storage
and File Storage, which replaces OpenStack’s Cinder and
Swift [29], as well as storing images Files and some comput-
ing resources. We deploy Ceph [30], and users in the entire Fig. 15 OpenStack login
Mobile Netw Appl

Fig. 16 OpenStack Overview

Fig. 17 OpenStack VM
Mobile Netw Appl

Fig. 18 OpenStack network topology(1)

3. The CPU and Memory status of Cluster & Buildings: There are many buildings on the campus, and
4. The Network I/O of Cluster the shielding of buildings will cause the interference of
5. The power consumption of 64 Booting Pods data transmission signals
6. The CPU Utilization of 64 Booting Pods & Distance: The campus covers an area of 1,333,096 square
7. The Memory Utilization of 64 Booting Pods meters, in such a large application environment, resulting
8. The Network Utilization of 64 Booting Pods in transmission distance restrictions
& Power Consumption: The general transmission mecha-
nism plus the sensor needs to consume a certain amount
3.2 System implementation of power. However, it is not necessary to have a power
supply system at the place where the display is installed. If
The air-quality monitoring system made on the campus. There the battery is powered, the new battery needs to be re-
are many aspects to consider in terms of the sensors. placed frequently.

Fig. 19 OpenStack network topology(2)


Mobile Netw Appl

Fig. 20 OpenStack VNC Console

Under such conditions, we have chosen LoRa as connect four in one sensor. We tested the transmission
shown in Fig. 6. LoRa has a long-distance and low- distance and stability, and calibration of the sensor fi-
power wireless network technology. Through this tech- nally, hardware module will facilitate the rapid deploy-
nology, we can build Low Power Wide Area (LPWA), ment of the future. To prevent moisture, we used the
low power consumption features make IoT applications 3D printer to make a waterproof shell.
have excellent endurance, and long-distance advantages LoRa Gateway in Fig. 7 has a total of three antennas, de-
of a single gateway or base station can cover a whole signed as two LoRa Shield and a WiFi receiver module. Two
city or hundreds of square kilometers of area. In the sets of LoRa Shield provide dual-band reception, can bring
future will be able to better scalability of the system more stable signal reception. The WiFi module assembled on
[36]. The hardware assembly, LoRa Shield and Arduino, which can provide WiFi data transmission to Edge
Arduino Uno development board integration, and and Cloud side.

Fig. 21 OpenDaylight UI
Mobile Netw Appl

Fig. 22 OpenDaylight Monitor

We set the transmission rate, ramp selection, and network system. Figure 10 shows the setting environment of
offload selection in LoRa Gateway as the network channel of Raspbian Jessie.
all the nodes. The following figure shows the setting interface We built a MySQL relational database to serve as sensor
after setting up the LoRa Gateway, with the transmission fre- data storage for the Edge Gateway. The picture in Fig. 11
quency, transmission protocol, transmission rate, and so on, shows the data collected by four LoRa nodes, including tem-
Then provide the system Log information, by observing the perature, humidity, PM2.5, and PM10.
data in the Log can confirm the current state of the machine, On the Edge Gateway, we set up a Kubernetes minion to
but also to know whether Node has a stable connection and provide services. The service runs on Docker as shown in
transmission. The Lora Network setting can be described in Fig. 12, controlled by Kubernetes, and Kubernetes is deployed
Fig. 8. as a clustered version in Fig. 13, including one master and two
All LoRa Nodes transmit data to the cloud via minions.
Gateway. Through the integration with Arduino, LoRa Moreover, we create an MQTT Broker container, through
will integrate the temperature and humidity and PM2.5 the Kubernetes HA mechanism, to provide stable anomaly
sensor module into the LoRa Node and send it regularly notification mechanism, Fig. 14 shows MQTT message push
to the Thingspeak IoT cloud database for further data test.
acquisition and visual analysis. Figure 9 describes ou On the Cloud side, OpenStack clustering was set up to
data visualization on ThingSpeak. provide infrastructure services through virtualization technol-
On Edge gateway, we first need to create a Raspberry Pi 3, ogies. Nova computing services, Neutron network
a Raspberry Pi 3 operating system, and Raspbian Jessie to virtualization, Keystone authentication management, Glance
build the required kits and applications on this operating image management, Cinder block storage services, Heat cloud

Table 2 LoRa Node and LoRa


Gateway LoRa Node LoRa Gateway

LoRa Module: GlobalSat LM-130 LoRa Module: GlobalSat LM-230


Arduino Uno WiFi: Dual Band 2.4GHz/5GHz 802.11 a/b/g/n
PMS5003T G5T PMS5003T G5T,Ethernet: Gigabit Ethernet(RJ45)
Internal Storage: 4GB
CPU: ARM CORTEX A9 Dual Core (Std. 850 MHz)
Mobile Netw Appl

Table 3 Raspberry Pi 3
Item Description

OS Raspbian Jessie
CPU 4 Cores, Broadcom BCM2837 64bits ARMv8 Processor, 1.2GHz
Power 5 V@2.4A(with,MicroUSB)
Storage microSD
Network Ethernet (RJ45)
WiFi BCM43143 WiFi
Bluetooth BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board

deployment and Magnum Container Services, Horizon Our research also integrates OpenDaylight as the SDN
Dashboard. Figure 15 shows the Horizon login interface for Controller used by OpenStack, OpenDaylight communicates
establishing a secure authentication mechanism for the with Neutron Server through the northbound interface
OpenStack private cloud that we deployed. Neutron Bound, and ODL manages the Open vSwitch of
Horizon provides cluster monitoring such as vCPU, RAM, OpenStack compute nodes by using OpenFlow and OVSDB
floating IP, number of virtual machines, cloud storage, secu- to provide L2, L3, LoadBalanceService and FirewallService.
rity groups, cloud drives, and so on. Figure 16 presents Figure 21 shows OpenDaylight UI.
OpenStack overview. We can also check the current OpenStack machine com-
OpenStack can use the Horizon dashboard to facilitate the munication through the OpenDaylight UI as shown in Fig. 22.
OpenStack API’s operation of virtual machines with simple For example, there are packets exchange and network com-
settings. Figure 17 shows the state of the virtual machines and munication between the machines. This interface shows the
virtual machines we set up, and we can also take further steps host location and IP.
such as Snapshot, Live Migration, and so on.
Network virtualization also provides network topology as
shown in Figs. 18 and 19 for users to efficiently operate virtual 4 Experimental results and analysis
networks, virtual subnets, and virtual routers.
We can use OpenStack boots instance (virtual machine) In this section, first, we present the running of cloud-edge
through the web page directly into the machine’s Console computing architecture along with the implementation of air
operation as shown in Fig. 20. quality monitoring using sensors. Second, we describe the
result of monitoring and analysis performance testing using
Ganglia Monitoring System.

4.1 Experimental environment

4.1.1 Hardware environment

At the device side, there are currently five


machines,LoRaGateway · 1 and LoRaNode · 4, which are cur-
rently deployed on our campus. LoRa node and LoRa
Gateway contains the main components as listed in Table 2:

Table 4 OpenStack Cluster

Host name CPU Memory Disk OS

Openstack Controller 12 cores 64GB 2 TB Ubuntu 16.04.02


Openstack Network 25 cores 64GB 2 TB Ubuntu 16.04.02
Openstack Compute01 64 cores 96GB 2 TB Ubuntu 16.04.02
Openstack Compute02 64 cores 96GB 2 TB Ubuntu 16.04.02
Openstack Block Storage 64 cores 48GB 8 TB Ubuntu 16.04.02
Fig. 23 Hardware environment
Mobile Netw Appl

Table 5 LoRa Deployment LoRa theoretical transmission distance of 15 to


ID Location Type 20 km, and we deploy the farthest two nodes distance
of about 2 km. The LoRa transmission distance limit is
A ITService in the First campus LoRa Node not exceeded. Figure 24 describes the distance of the
B The main gate of the first campus LoRa Node sensors implemented.
C The Luce Chapel LoRa Gateway However, factors such as slope type and building masking,
D ITService in the second campus LoRa Node LoRa Gateway in Fig. 25 is placed at the center of the four
E Department of Life Science LoRa Node sensors to provide the most stable data transmission. The data
is collected and visualized on the website.
Real-time data from individual LoRa nodes is sent to
MySQL on the Edge and displayed on the web, while a large
Raspberry Pi 3 is set up on the Edge side as shown in amount of historical data is backed up in the cloud, and we
Table 3. also incorporate it into the page to provide visualization as
On the Cloud, OpenStack clustering was set up to provide shown in Fig. 26.
infrastructure services through virtualization technologies At the edge, Kubernetes provides a great advantage. This
[37]. In this study, five nodes were set up as Controller, paper establishes a three-node Kubernetes, Master · 1 and
Compute01, Compute02, Block01 and Network respectively. Node · 2 respectively, all of which are operating systems of
Services were established for Nova, Neutron, Keystone, Ubuntu 16.04.1. Figure 27 shows our Kubernetes cluster
Glance, Cinder, Magnum and Horizon. Figure 23 and setting.
Table 4 shows our hardware environment setting. Through this command kubectl scale deploy nginx –rep-
licas = 64, the service will be automatically extended to run
the number of copies set, where the number of copies set to 65,
4.2 Experimental results the results are as shown in Fig. 28.
In this result as shown in Fig. 29, we also found that
This study builds the system on campus with four LoRa nodes the number of pods on the master is 21, the number of
and a LoRa Gateway in the following Table 5. pods on node1 is 22, the number of pods on is 22. We

Fig. 24 The distance of sensors


Mobile Netw Appl

Fig. 25 LoRa Deployment in Campus

Fig. 26 Data visualization


Mobile Netw Appl

Fig. 27 Kubernetes Cluster

can confirm Kubernetes to Load Balance mechanism, we went a step further to test the Pod’s startup time. As
automatically pods evenly dispersed to each node, the the number of containers started increases with time, it
choice of lower utilization of nodes Open the pod. Also, is also found that as the number of starts increases, the

Fig. 28 auto-scaling.
Mobile Netw Appl

visualization. Ganglia uses very lightweight data struc-


tures and algorithms to achieve very low resource over-
head, making it ideal for Kuberentes cluster architecture.
In this experiment, we deployed two nodes Kubernetes
clusters in Table 6. We limit the number of Kubernetes nodes
to one. In this way, we can measure resource utilization of
Kubernetes node more directly.
We test the performance when Kubernetes boots the differ-
ent number of pods. The main testing items include CPU
usage, memory consumption, network usage. In addition, we
use Power Distribution Unit (PDU) to monitor the energy
Fig. 29 Booting Time of Kubernetes Pods
consumption of servers during Pods are booted. At First, we
boot 1, 2, 4, 8, 16, 32 and 64 Pods to observe the utilization of
slope of the polyline gradually becomes higher, indicat- resources, each booting Pods experiments will delete all Pods
ing that too many containers are started, resulting in before next experiment. We can observe the cluster status in
delays in the communication and scheduling of the clus- Ganglia, as shown in Fig. 31.
ter network. In Fig. 32, we can see that as Pods are booted. The
Besides, this paper sets up Ganglia in the Kubernetes load is a rise, but almost status is low. Moreover, the
cluster as shown in Fig. 30, a scalable distributed mon- usage utilization which is generally high is 13 s. It is
itoring system suitable for high-performance computing time to boot 16 pods. Therefore, we can know that boot
systems such as cluster architecture. It uses the XDR 16 pods need to use more resources to load process in
transport protocol for data storage and RRDtool for the two nodes architecture.

Fig. 30 Ganglia Monitor

Table 6 Kubernetes Cluster


Hostname CPU Ram Disk

Kubernetes_master Intel(R) Core(TM) i7-6950X CPU @ 3.00GHz 128G 2T


Kubernetes_node01 Intel(R) Core(TM) i7-6950X CPU @ 3.00GHz 128G 2T
Mobile Netw Appl

Fig. 31 Ganglia Status

There are no significant changes in CPU and Memory. We collect the data during booting 64 Pods. In the energy
CPU resources are consumed when booting Pod, and more consumption side, with 64 Pods of booting. Power consump-
notably CPU utilization starts to increase significantly when tion is Up to about 71 watts. Figure 35 presents the graph of
17 Pods are booted, as shown in Fig. 33. power consumption of 64 Booting Pods.
It can be seen in Fig. 34, as the number of booted Pods When the node is booting 64 pods, CPU utilization is still
increases, the network utilization (Bytes/s) also gradually in- very low, the highest utilization rate of the power consump-
creases. The reason for this may be presumed that when the tion is only 2% and an average of 97.7% idle time. We can see
cluster architecture starts to perform distribution actions, the the feature of a lightweight container. It can be said that Nice
master and node also need to communicate with each other time is 0%. It means when Docker and Kubernetes are running
through the API. With the reduction of the request, the utili- in Linux, and the CPU does not use the nice command to
zation will down again. Therefore, the result will bee like a adjust the execution priority. Figure 36 shows the graph of
wave. CPU utilization of 64 Booting Pods.
Besides monitoring the total resource consumption of the In terms of memory, there is an upward trend when booting
cluster. In this paper, we observe the resource utilization of Pods. It can be found that Kubernetes has the highest usage of
Kubernetes node and add the energy consumption to observe. Cache, while Swap is not used. Cache brings fast processing
Kubernetes faster and high performance. Figures 37 and 38
shows the memory and network utilization of 64 booting
pods.
On the network side, when booting 64 pods, there is
an upward trend at a relatively high rate of 7629.24 kb
/ s. This trend is because Kubernetes needs machine-to-
machine communication when booting a pod to achieve
command requests and avoid conflicts. Kubernetes ar-
chitecture will deploy Etcd in the master. Etcd is a kind
of key-value distribution storage system. It is used for
storing Kubernetes cluster state and configuration. Etcd
is important to cluster state synchronization. Because all
nodes are from etcd to get other machine states in
Fig. 32 Cluster Load (loads/procs) Kubernetes nodes. Kubelet can monitor etcd to get
Mobile Netw Appl

Fig. 33 The CPU and Memory status of Cluster

Fig. 34 The Network I/O of


Cluster

information about the pod. If Kubelet finds a new Pod node to the master node. Finally, it will monitor the
that is bound to this node. It will create that pod as resources of nodes and containers through cAdvisor.
required. Kubelet receives and executes instructions
from a master, managing pods and containers in pods.
Kubelet will register the node’s information on the API 5 Conclusions and future work
Server, and periodically report the resource usage of the
In this section, we stated the concluding remarks and the fu-
ture works of this study.

5.1 Concluding remarks

In this work, we integrate the technologies of


OpenStack, Kubernetes, Docker, and Ceph to implement
a complete set of edge computing architectures and im-
plements the air pollution monitoring system based on
the Internet of Things LoRa and MQTT technologies.
From this proposed architecture, we investigate how sig-
nificantly the architecture of Cloud-Edge computing and
IoT affect the performance of the services using Ganglia
Fig. 35 The power consumption of 64 Booting Pods Monitoring System. In this case, we implemented
Mobile Netw Appl

Fig. 36 The CPU Utilization of


64 Booting Pods

container-based virtualization which constructs memory, there is an upward trend when booting Pods
Kubernetes Minion (Nodes) in the Docker container ser- process. It can be found that Kubernetes has the highest
vice independently for each service on the Edge side. usage of Cache, while Swap is not used. Cache brings
In the booting process of 1, 2, 4, 8, 16, 32 and 64 fast processing Kubernetes faster and high performance.
Pods, the loading process is increasing, but in our ex- On the network side, when booting 64 pods, there is an
periment almost of the status are low. The maximum upward trend at a relatively high rate of 7629.24 kb/s.
usage of utilization is 13 s. When boot 16 pods, we
can know that boot 16 pods need to use more resources 5.2 Future work
to load process in the two nodes architecture. There are
no significant changes in CPU and Memory. CPU re- In the future, open source software is bound to be the
sources are consumed when booting Pod, and more no- focus of development, hoping to be based on the con-
tably CPU utilization starts to increase significantly cept of edge computing in this paper, closer integration
when 17 Pods are booted as the number of booted of Hadoop Ecosystem, Spark MLlib and Tensorflow,
Pods increases, the network utilization (Bytes/s) also clustering and decentralized computing architecture for
gradually increases. With the reduction of the request, ineffective IoT devices, Bring better performance to
the utilization will down again. Therefore, The result show. Moreover, hopefully integrating machine learning
will be like a wave. and deep learning technologies can bring higher value
In the energy consumption term, with 64 Pods of to IoT applications. Finally, we also hope that the effi-
booting. Power consumption is about 71 watts. When ciency testing will make the power consumption model
Node is booting 64 pods, CPU utilization is still very suitable for Kubernetes, and find the best trade-off for
low, the highest utilization rate is only 2% and an av- Kubernetes in different CPU, memory, Disk, network
erage of 97.7% when idle time. In this point, we can and other resources for future Edge Computing architec-
see the feature of a lightweight container. Regarding ture applications.

Fig. 37 The Memory Utilization of 64 Booting Pods Fig. 38 The Network Utilization of 64 Booting Pods
Mobile Netw Appl

Acknowledgments This work was supported in part by the Ministry of 18. Yuan Ai, Mugen Peng, and Kecheng Zhang (2017). Edge comput-
Science and Technology, Taiwan (R.O.C.), under grants number 107- ing technologies for internet of things: a primer. Digital
2221-E-029-008 and 107-2218-E-029-003. Communications and Networks
19. Openstack. https://www.openstack.org/, 2017
20. Yoji Yamato (2016). Proposal of optimum application deployment
technology for heterogeneous iaas cloud. arXiv preprint arXiv:
References 1611.09570
21. Yamato Y (2017) Optimum application deployment technology for
1. Yang C-T, Liu J-C, Chen S-T, Hsin-Wen L (2017) Implementation heterogeneous iaas cloud. Journal of Information Processing 25:
of a big data accessing and processing platform for medical records 56–58
in cloud. Journal of medical systems 41(10):149 22. Netto HV, Lung LC, Correia M, Luiz AF, de Souza LMS (2017)
2. Varghese B, Buyya R (2018) Next generation cloud computing: State machine replication in containers managed by kubernetes.
new trends and research directions. Futur Gener Comput Syst 79: Journal of Systems Architecture 73:53–59
849–861 23. Kubernetes. https://kubernetes.io/, 2017
3. Deng D-J, Lien S-Y, Lin C-C, Hung S-C, Chen W-B (2017) 24. Mqtt. http://mqtt.org/, 2017
Latency control in software-defined mobile-edge vehicular net- 25. Ejaz Ahmed and Mubashir Husain Rehmani (2017). Mobile edge
working. IEEE Commun Mag 55(8):87–93 computing: opportunities, solutions, and challenges
4. Lien S-Y, Deng D-J, Tsai H-L, Lin Y-P, Chen K-C (2017) 26. Pei-Hsuan Tsai, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin
Vehicular radio access to unlicensed spectrum. IEEE Wirel Hsu (2017). Distributed analytics in fog computing platforms using
Commun 24(6):46–54 tensorflow and kubernetes. In Network Operations and
5. Yuan X, Zhang M, Wang Q, Wang Y, Zuo J (2017) Evolution Management Symposium (APNOMS), 2017 19th Asia-Pacific,
analysis of environmental standards: effectiveness on air pollutant pages 145–150. IEEE
emissions reduction. J Clean Prod 149:511–520 27. Malik A, Ahmed J, Qadir J, Ilyas MU (2017) A measurement study
6. Chao-Tung Yang, Shuo-Tsung Chen, Chih-Hung Chang, Walter of open source sdn layers in openstack under network perturbation.
Den, and Chia-Cheng Wu (2018). Implementation of an environ- Computer Communications 102:139–149
mental quality and harmful gases monitoring system in cloud. 28. Satria D, Park D, Jo M (2017) Recovery for overloaded mobile
Journal of Medical and Biological Engineering, pages 1–14 edge computing. Futur Gener Comput Syst 70:138–147
7. Kozhirbayev Z, Sinnott RO (2017) A performance comparison of
29. Ke Zhan and Ai Hua Piao (2016). Optimization of ceph reads/
container-based technologies for the cloud. Future Generation
writes based on multi-threaded algorithms. In 2016 IEEE 18th
Computer Systems 68:175–182
International Conference on High Performance Computing and
8. Yang C-T, Chen C-J, Chen T-Y (2017) Implementation of ceph
Communications; IEEE 14th International Conference on Smart
storage with big data for performance comparison. Lecture Notes in
City; IEEE 2nd International Conference on Data Science and
Electrical Engineering 424:625–633
Systems (HPCC/SmartCity/DSS), pages 719–725. IEEE
9. A Mikula, D Adamová, M Adam, J Chudoba, and J Švec (2016).
30. Poat MD, Lauret J (2016) Performance and advanced data place-
Grid site monitoring and log processing using elk. CEUR
ment techniques with ceph’s distributed storage system. Journal of
Workshop Proceedings
Physics: Conference Series 762(1)
10. Endah Kristiani, Chao-Tung Yang, Yuan Ting Wang, and Chin-
31. Dipti Shankar, Xiaoyi Lu, and Dhabaleswar K DK Panda (2016).
Yin Huang (2018). Implementation of an edge computing architec-
Boldio: A hybrid and resilient burst-buffer over lustre for acceler-
ture using openstack and kubernetes. In International Conference
ating big data i/o. In 2016 IEEE International Conference on Big
on Information Science and Applications, pages 675–685. Springer
Data (Big Data), pages 404–409. IEEE
11. Peng Shu, Rong Gu, Qianhao Dong, Chunfeng Yuan, and Yihua
32. Y Huang, Y Yesha, M Halem, Y Yesha, and S Zhou (2016).
Huang (2016). Accelerating big data applications on tiered storage
Yinmem: A distributed parallel indexed in-memory computation
system with various eviction policies. In 2016 IEEE Trustcom/
system for large scale data analytics. In 2016 IEEE International
BigDataSE/ISPA, pages 1350–1357. IEEE
Conference on Big Data (Big Data), pages 214–222
12. Salman Taherizadeh, Andrew C Jones, Ian Taylor, Zhiming Zhao,
33. Mavridis I, Karatza H (2017) Performance evaluation of cloud-
and Vlado Stankovski (2017). Monitoring self-adaptive applica-
based log file analysis with apache hadoop and apache spark. J
tions within edge computing frameworks: A state-of-the-art review.
Syst Softw 125:133–151
Journal of Systems and Software
13. Sharma V, Song F, You I, Atiquzzaman M (2017) Energy efficient 34. Alexey Svyatkovskiy, Kosuke Imai, Mary Kroeger, and Yuki
device discovery for reliable communication in 5g-based iot and bsns Shiraito (2016). Large-scale text processing pipeline with apache
using unmanned aerial vehicles. J Netw Comput Appl 97:79–95 spark. In 2016 IEEE International Conference on Big Data (Big
14. Jan Medved, Robert Varga, Anton Tkacik, and Ken Gray (2014). Data), pages 3928–3935. IEEE
Opendaylight: towards a model-driven sdn controller architecture. In 35. Pingkan PI Langi, Warsun Najib, Teguh Bharata Aji, et al. (2015)
World of Wireless, Mobile and Multimedia Networks (WoWMoM), An evaluation of twitter river and logstash performances as
2014 IEEE 15th International Symposium on a, pages 1–6. IEEE elasticsearch inputs for social media analysis of twitter. In 2015
15. Rabindra K Barik, Rakesh K Lenka, K Rahul Rao, and Devam International Conference on Information & Communication
Ghose (2016). Performance analysis of virtual machines and con- Technology and Systems (ICTS), pages 181–186. IEEE
tainers in cloud computing. In Computing, Communication and 36. Kumari S, Khan MK, Atiquzzaman M (2015) User authentication
Automation (ICCCA), 2016 International Conference on, pages schemes for wireless sensor networks: A review. Ad Hoc Networks
1204–1210. IEEE 27:159–194
16. Deng D-J, Lin Y-P, Yang X, Zhu J, Li Y-B, Luo J, Chen K-C (2017) 37. Pacevic R, Kaceniauskas A (2017) The development of vislt visu-
Ieee 802.11 ax: highly efficient wlans for intelligent information in- alization service in openstack cloud infrastructure. Adv Eng Softw
frastructure. IEEE Communications Magazine 55(12):52–59 103:46–56
17. Kochovski P, Stankovski V (2018) Supporting smart construction
with dependable edge computing infrastructures and applications. Publisher’s note Springer Nature remains neutral with regard to jurisdic-
Automation in Construction 85:182–192 tional claims in published maps and institutional affiliations.

You might also like