Build the Eagle Eye container platform with Azure

Source: Internet
Author: User

Preface

The winter of the internet era is coming, and perhaps very soon few people will mention the word "Internet", but the technology storm brought by the internet era will never be a blind eye to every it-tech fanatic. Many it practitioners, including the author, are thinking about how to think about the open source storm in the Internet era (although the term "open source" is not a fresh word), and as a Microsoft MVP, I try to explore how to approach open source from the practice of many older teachers.

I think no matter what the platform of Technology, the ultimate goal is to solve the actual production problems, and not for what technology to go online or learn what technology. So for open source, my attitude is "hug", not just my attitude as a Microsoft technology follower, but technically, I also think that open source and closed sources (or part of the source) technology can achieve complementary hug.

The share I brought today is to build an eagle eye container platform on the Azure platform, a vision I shared with Peng teachers in the last few months ():

650) this.width=650; "Width=" 1169 "height=" 391 "title=" clip_image002[9] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image002[9] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0a/wkiol1xypiaqq_5_aajleaqwzgm444.jpg "border=" 0 "/>

Now has a small embryonic, so it is to listen to my "technical fantasy" friend to pay a job!

/************************** Split Line **************************/

Bottom platform selection and platform interpretation

Many benefits of using Azure to build an open source platform I don't have to say much, here are a few of the most obvious benefits:

L true "public cloud"

L Low-level multi-database center disaster recovery

• High availability of PAAs or IaaS levels

L improved ease of use of open source underlying systems

L self-monitoring of fine grain size

Although these can be achieved through self-development, but the inherent hardware costs do not say, a single development cost and custom training costs is already a very big expense, and does not guarantee the real good, so in Azure to build an open source platform is a more eclectic solution.

Solve the problem of the bottom platform selection, next to explain what is the "Eagle Eye" container platform, the so-called container platform, is the use of Docker as the bottom of the container, Docker the word I do not have to explain, it provides container (container) The biggest advantage is to significantly shorten the business online /restore/Update time. But when a business system becomes a container, how can we observe its state?

The answer is a variety of, I have considered using scom to monitor the container, because the container's IP itself is Docker's internal IP, although plus the-hostname parameter can be the container hostname fixed and normal parsing, but there are multiple containers when there is no way to do so, after all, there is only one IP address, The heterogeneous monitoring of scom is the need to do two-way resolution of the monitored objects, even if the container alone binding inherent IP will also cause some other problems, of course, there are ways to avoid (will be exposed in future articles). Therefore, in order to avoid the above problems, I decided not to use Microsoft's scom, but the same is the Open source architecture (here just to express coincidence, not the same is open source architecture, compatibility can be better) Zabbix, so Zabbix is the experiment "Eagle eye."

/************************** Split Line **************************/

"Eagle Eye" container platform architecture issues

With the container, the choice is much, why do you say so? Because it involves a question, is it to put "Eagle eye" in container or parallel to Docker? So we have the following two architectures:

650) this.width=650; "width=" 633 "height=" 434 "title=" clip_image004[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image004[8] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0a/wkiol1xypiewauwaaab0ej5byho089.jpg "border=" 0 "/>

A Zabbix as one of the container

650) this.width=650; "width=" 552 "height=" 475 "title=" clip_image006[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image006[8] "src=" http://s3.51cto.com/ Wyfs02/m02/73/0a/wkiol1xypiiqpzruaab2wcxgdk4345.jpg "border=" 0 "/>

B Zabbix Parallel to Docker host

With the architecture diagram we can see clearly that if Zabbix is one of the Docker host's container, then the Zabbix under the Docker host will be down when it goes down (and, of course, in the Azure platform). The equivalent of our blindness, the situation on the platform can not be monitored, in fact, you may not even Docker host downtime is not clear, because Zabbix is one of the Docker container (of course, if Docker Host down so Azure has already issued a first level alert, but this alert may not be very obvious. Therefore, based on the above considerations, it is better to adopt B architecture.

If you do have a limited amount, it doesn't hurt to use a architecture, as the selection article says that Azure itself has monitoring capabilities. But the implementation of a architecture requires more considerations than the B architecture, for example, the B architecture.

/************************** Split Line **************************/

Implementation preparation

In order to achieve the above architecture, we need to do some planning for the demo environment, as follows (because the current domestic azure is not yet online coreos, so here Ubuntu as Docker Host):


HostName

NetWork

Port

Role

VMCDocker01

Vmcloud_vnet

10050

10051

10052

Docker Host

VMCZabbix01

Vmcloud_vnet

80

zabbix/db Server

CApp01

Docker intnet

10050

Mysql

CApp02

Docker intnet

10051

Nginx


There are many ways to monitor Docker, including Zabbix Docker monitoring on GitHub, but to enable pristine monitoring on azure, The most violent use of the template provided by Zabbix itself today is to monitor the container.

*:10050 is to monitor the OS of the Docker host itself, with 10051/10052 monitoring ports of two container respectively.

/************************** Split Line **************************/


implementation Steps

1. To create an azure VNet:

650) this.width=650; "Width=" 671 "height=" 447 "title=" clip_image008[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image008[8] "src=" http://s3.51cto.com/ Wyfs02/m02/73/0d/wkiom1xyo_qxm6l5aacxwzn66qy119.jpg "border=" 0 "/>

2. Create Docker01 and ZABBIX01 host (with Ubuntu Server 14.04 LTS):

650) this.width=650; "Width=" 673 "height=" 422 "title=" clip_image010[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image010[8] "src=" http://s3.51cto.com/ Wyfs02/m00/73/0d/wkiom1xyo_zswmw7aaejcmul9xe787.jpg "border=" 0 "/>

650) this.width=650; "Width=" 693 "height=" 199 "title=" clip_image011[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image011[8] "src=" http://s3.51cto.com/ Wyfs02/m02/73/0d/wkiom1xyo_2ibjr4aacjyjnox-k573.jpg "border=" 0 "/>

650) this.width=650; "Width=" 720 "height=" 418 "title=" clip_image013[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image013[8] "src=" http://s3.51cto.com/ Wyfs02/m02/73/0a/wkiol1xypi3ybuojaacbqbmitco430.jpg "border=" 0 "/>

3. Preparing the Zabbix Environment

650) this.width=650; "Width=" 759 "height=" 192 "title=" clip_image015[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image015[8] "src=" http://s3.51cto.com/ Wyfs02/m00/73/0b/wkiol1xypjcbbpjbaafykayk5wg764.jpg "border=" 0 "/>

650) this.width=650; "Width=" 687 "height=" 649 "title=" clip_image017[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image017[8] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0b/wkiol1xypjotu6b6aajwghnxzpw438.jpg "border=" 0 "/>

4. Configuration Zabbix:

A) Configure the corresponding template.

650) this.width=650; "width=" 1109 "height=" "title=" Clip_image019[8 "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image019[8] "src=" http://s3.51cto.com/ Wyfs02/m02/73/0b/wkiol1xypjsahqcraab-cx1am2i667.jpg "border=" 0 "/>

b) Create a Zabbix group, divided into Docker hosts and Docker container groups:

650) this.width=650, "width=" 919 "height=" "title=", and "Clip_image020[8" "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image020[8] "src=" http://s3.51cto.com/ Wyfs02/m00/73/0b/wkiol1xypjxyc8knaab6i4rgxss526.jpg "border=" 0 "/>

5. Preparing the Docker environment

650) this.width=650; "Width=" 725 "height=" 356 "title=" clip_image022[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image022[8] "src=" http://s3.51cto.com/ Wyfs02/m00/73/0b/wkiol1xypjmxl7ulaahfazcu5wu092.jpg "border=" 0 "/>

6. Configure Docker

A) Create a container (Azure A1 Linux Ubuntu 14.04 prompt does not support limiting swap, which means that the-m parameter is directly invalid, this will explain how to resolve it later):

650) this.width=650; "Width=" 553 "height=" [title= "clip_image024[8]" style= "border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image024[8] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0b/wkiol1xypjqdguogaabjidrdfxo000.jpg "border=" 0 "/>

b) Install Zabbix Agent for both container and hosts:

650) this.width=650; "Width=" 821 "height=" 293 "title=" clip_image026[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image026[8] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0b/wkiol1xypj6iuq6saajl-abg_6a583.jpg "border=" 0 "/>

650) this.width=650; "Width=", "height=", "title=", "clip_image027[8" style=; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image027[8] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0d/wkiom1xypa-i_a_caabfrzmkh_y073.jpg "border=" 0 "/>

650) this.width=650, "width=" 392 "height=" "title=", and "Clip_image028[8" style= "border-right-width:0px"; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image028[8] "src=" http://s3.51cto.com/ Wyfs02/m02/73/0d/wkiom1xypbcihp-daabim6q_3ks388.jpg "border=" 0 "/>

7. Establish a link between Zabbix and container

650) this.width=650; "Width=" 1134 "height=" 579 "title=" clip_image030[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image030[8] "src=" http://s3.51cto.com/ Wyfs02/m00/73/0b/wkiol1xypktdquw4aajcr6rh0e8952.jpg "border=" 0 "/>

* here can be distinguished by the port, and Zabbix is the configfile specified in the hostname as the corresponding rather than the real hostname, it can achieve the corresponding

650) this.width=650; "Width=" "height=" "title=" "Clip_image032[8" style= "border-right-width:0px"; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image032[8] "src=" http://s3.51cto.com/ Wyfs02/m00/73/0d/wkiom1xypbnhm5e-aaicd0kxrdu145.jpg "border=" 0 "/>

8. Check monitoring status

650) this.width=650; "Width=" 881 "height=" 886 "title=" clip_image033[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image033[8] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0d/wkiom1xypckzqi8raaylgcgorny641.jpg "border=" 0 "/>

Data monitoring is normal (such as previously said does not support the restriction of swap and memory, so the container shown here uses memory or full amount of memory)

650) this.width=650; "Width=" 991 "height=" "title=" Clip_image035[8 "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image035[8] "src=" http://s3.51cto.com/ Wyfs02/m01/73/0b/wkiol1xyplxzdq7zaahkcvtouw4577.jpg "border=" 0 "/>

since Ubuntu on Azure does not help you create a swap partition (which is why you can't limit swap), most off-the-shelf docker images will not set your swap, so the following alerts will appear when monitoring is complete

650) this.width=650; "Width=" 876 "height=" 194 "title=" clip_image037[8] "style=" border-right-width:0px; Background-image:none;border-bottom-width:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto; Padding-right:0px;border-top-width:0px;margin-right:auto; "alt=" clip_image037[8] "src=" http://s3.51cto.com/ Wyfs02/m02/73/0b/wkiol1xyplerxwk4aaenqwbwxek946.jpg "border=" 0 "/>

/************************** Split Line **************************/

written in the last

With the release of Hyper-V container and Windows container, it is believed that more and more container scenarios will be implemented on Azure, and the author is making further efforts to implement the previously shared architecture (Hyper-V vnext may support nesting, or nested in container). As for this article involved in installation and configuration interested students can go to search engines on their own to learn, or expect me to bring you more detailed "embrace" open source course explained.

The architectural experience that is completed in this article:

Zabbix Address: http://vmczabbix01.chinacloudapp.cn/zabbix/

User name: Vmcguest

Password: 123456

Expiry time: As I am getting the Azure China trial account, this address will expire in October, please also experience as soon as possible:)

/************************** Split Line **************************/

Extended Reading

MVP Zhang Shanyu "running Mono with Docker on Azure":

Http://www.cnblogs.com/shanyou/p/4168391.html

MVP Cherius "When Azure meets Docker":

http://maomaostyle.blog.51cto.com/2220531/1654994

MVP Peng Windows Docker and Windows Nano Server come on! 》

http://mp.weixin.qq.com/s?__biz=MzAwMzQwOTkxNQ==&mid=205222578&idx=1&sn= 1e8d545908621353a1d42d0f146e79e5&scene=4#wechat_redirect

MVP Zhang Cheng "MVP watch Internet + series":

http://mp.weixin.qq.com/s?__biz=MzAwNzE2MTAzMQ==&mid=207850153&idx=1&sn= 03e9459951f8a1f8b7063bf2e86f06b8&scene=4#wechat_redirect

Vmcloud latest information (heat to late typesetting, continuous update)


    • The road to the pinnacle of the workplace:

http://mp.weixin.qq.com/s?__biz=MzAxNzIxNDA2OQ==&mid=208028889&idx=1&sn= A6cff33094b29329fd6c364272df66cc&scene=18#rd

    • VMCLOUD-OPC:

http://vmcloud.com.cn

the public number is fully open, high-end and advanced articles:

650) this.width=650; "style=" Float:none;margin-left:auto;margin-right:auto; "src=" http://vmcloud.info/wp-content/ Uploads/2015/08/080715_0643_vmcloudscv32.png "/>

Click "+" in the upper right corner, "add Friends" will appear, go to "find the public number", enter Vmcloud (this is the keyword, non-id), you can find


This article from the "Vmcloud Network Research Practice section" blog, reproduced please contact the author!

Build the Eagle Eye container platform with Azure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.