【Docker】Docker管理平台 Rancher ---- 你应该学学Rancher是怎么做容器的管理的
Elasticsearch is a Lucene-based search engine developed by the open-source vendor, elastic. With principal features like scalability, resiliency, and top-notch performance, it has overtaken Apache Solr, one of its closest competitors. Nowadays, Elasticsearch is almost everywhere where a search engine is involved: it’s the E of the well-known ELK stack, which makes it straightforward for your project to process analytics (the L stands for Logstash which is used to process data like logs, streams, metrics; K stands for Kibana, a data visualization platform – projects also managed by elastic).
Installing Elasticsearch from the Rancher Catalog
Before we get started, let me tell you a bit about the Rancher catalog. The Rancher catalog uses rancher-compose and docker-compose to ease the installation of whatever tool you need. Using the Rancher catalog, you can deploy everything from a simple app like ghost (blogging platform) to a full CI/CD stack like GoCD.
I’ll assume here that you have a fully working Rancher platform (a server and several nodes). If not, then head over to the Rancher documentation here, before going any further in this article and set up your environment. My environment looks like this (Figure 1, built using docker-machine on my laptop):

Figure 1: Elasticsearch Environment
Accessing the Rancher catalog is simple:
- On the top menu bar of your Rancher UI, click onCatalog, then All.
- Using the search box on the upper right, search forElasticsearch.
- You’ll see two versions of Elasticsearch are available (Figure 2). Both work fine, but for this article, we’ll stick to version on the left.
- Click on View Details. You will need to fill in some simple information (Figure 3).
- To fire up the installation, click Launch.

Figure 2: Elasticsearch Options in the Rancher Catalog

Figure 3: Elasticsearch Data Form
You should now see something similar to the image below (Figure 4). You can find more details about what Rancher is doing by clicking on the name of your stack (in my case, I’ve installed Elasticsearch, and named my stack LocalEs).

Figure 4: LocalEs app Naming Convention
Expanding our view of the stack (Figure 5), we can see that deploying an Elasticsearch cluster using the Rancher catalog template has included:
- a Master node
- a Data node
- a Client node
- kopf, an Elasticsearch management web app

Figure 5: Elasticsearch Cluster Stack View
Each of these nodes (except for kopf) comes with sidekick containers, which in this case are configuration and data volume containers.
Your Elasticsearch cluster will be fully functional when all the entries are “active”. If you want to see how they are all connected to each other, take a look at the graph view(available from the drop-down menu on the right hand corner in Figure 6).

Figure 6: Elasticsearch Cluster Graph View
Now, we can visualize how all these containers as they are mapped within the Rancher platform (Figure 7).

Figure 7: Elasticsearch Visual Map
That’s it, our Elasticsearch cluster is now up and running. Let’s see how our cluster behaves!
Cluster Management
Depending on your Rancher setup, kopf is deployed on one of your Rancher nodes. You can access the application using http://[your kopf rancher host]. Here’s an example (Figure 8):

Figure 8: kopf node identification
As you can see, everything seems to be fine, as kopf shows a green top bar. Indeed, our cluster is running without any data stored, so there’s no need for resiliency at this point.
Let’s see how it goes if we manually create an index called ‘ranchercatalog’, with three shards and two replicas. Using curl, your query would be something like this:
curl -XPUT 'http://[your kopf rancher host]/es/ranchercatalog/' -d '{
"settings" : {
"index" : {
"number_of_shards" : 3,
"number_of_replicas" : 2
}
}
}'
Elasticsearch should reply {“acknowledged”:true}%
Shards are related to data storage, and replicas to resiliency. This means our index will have its data stored using three shards but needs two more replicas of these shards.
Now that our index has been successfully created, let’s talk a look at kopf.

Figure 9: kopf Status View
As you can see in Figure 9, the top bar is now yellow, which indicates there may be something wrong with our Elasticsearch cluster.
We can also see in the middle left of the page a warning sign (red triangle in Fig. 9) saying “six unassigned shards.” Remember when we created the ranchercatalog index, we specified:
- Three shards
- Two replicas
By default, the Elasticsearch Rancher catalog item deploys only 1 data node, so we need two more data nodes. Adding nodes can be easily done using the Rancher scale option. The results are shown in Figure 10.

Figure 10: Adding Nodes using Rancher Scale Option
To scale your data nodes, let’s go again to Applications, then to Stack. Click on your stack, and then on elasticsearch-datanodes. You should have something like what is shown in Figure 10. Click 2 times on the + of the scale option and let Rancher do the work. You should see data nodes popping up one after another until you finally have something like what you see in Figure 11.

Figure 11: Node View to Verify Additions
Let’s check if this is enough to bring back the beautiful green bar to kopf. Figure 12 provides the proof.

Figure 12: Corrected Nodes Verification
参考资料:
官网:http://rancher.com/
使用入门:http://www.th7.cn/Program/go/201604/839153.shtml
ELK部署示例:http://rancher.com/announcing-rancher-1-0-ga/http:/docs.rancher.com/rancher/quick-start-guide/
http://rancher.com/deploying-an-elasticsearch-cluster-using-rancher-catalog/
Rancher模型参考(Application、Catalog、Infrastructure、Admin、API、Help)
做容器管理平台的,模型非常值得借鉴:
http://cdn.rancher.com/wp-content/uploads/2016/06/08170452/rachid-1-1.png
http://cdn.rancher.com/wp-content/uploads/2016/06/08170521/Rachid-1-2.png
http://cdn.rancher.com/wp-content/uploads/2016/06/08170610/rachid-1-4.png
http://cdn.rancher.com/wp-content/uploads/2016/06/08170626/rachid-1-5.png
http://cdn.rancher.com/wp-content/uploads/2016/06/08170641/rachid-1-6.png
http://cdn.rancher.com/wp-content/uploads/2016/06/08170705/rachid-1-7.png
http://cdn.rancher.com/wp-content/uploads/2016/06/08170721/rachid-1-8.png
【Docker】Docker管理平台 Rancher ---- 你应该学学Rancher是怎么做容器的管理的的更多相关文章
- 微服务下的容器部署和管理平台Rancher
Rancher是什么 Rancher是一个开源的企业级容器管理平台.通过Rancher,企业再也不必自己使用一系列的开源软件去从头搭建容器服务平台.Rancher提供了在生产环境中使用的管理Docke ...
- (视频) 《快速创建网站》1. 网站管理平台WordPress & 微软Azure 云计算简介
网站并不神秘,过节了,在家闲的没事的,自己建个网站玩玩吧.每段视频不超过15分钟,地铁/公交/睡前/醒来看一段,几天之后变身建站专家,找老板加薪去! 在普通人眼里,创建网站是专业开发人员和IT工程师才 ...
- kvm虚拟化管理平台WebVirtMgr部署-完整记录(3)
继下面三篇文章完成了kvm虚拟化管理平台webvirtmgr环境的部署安装:kvm虚拟化管理平台WebVirtMgr部署-虚拟化环境安装-完整记录(0)kvm虚拟化管理平台WebVirtMgr部署-完 ...
- kvm虚拟化管理平台WebVirtMgr部署-完整记录(1)
公司机房有一台2U的服务器(64G内存,32核),由于近期新增业务比较多,测试机也要新增,服务器资源十分有限.所以打算在这台2U服务器上部署kvm虚拟化,虚出多台VM出来,以应对新的测试需求.当KVM ...
- 基础架构之日志管理平台搭建及java&net使用
在现代化的软件开发流程中,日志显得非常的重要,不可能再零散的游离在各个项目中,等查看日志的时候再登录服务器去到特定的目录去查看,这显然很繁琐且效率低下,所有整合一套日志管理平台,也显得非常重要,这篇文 ...
- centos7.2 kvm虚拟化管理平台WebVirtMgr部署
在服务器上部署kvm虚拟化,虚出多台VM出来,以应对新的测试需求.当KVM宿主机越来越多,需要对宿主机的状态进行调控,决定采用WebVirtMgr作为kvm虚拟化的web管理工具,图形化的WEB,让人 ...
- 分享接口管理平台 eoLinker AMS 线上专业版V3.0,只为更好的体验,了解一下?
不知不觉中,eoLinker AMS从2016年上线至今已经三个年头,按照一年一个大版本的迭代计划,我们终于迎来了eoLinker AMS 专业版3.0. AMS产品也从最初专注于API文档管理,成长 ...
- 008-kvm虚拟化管理平台WebVirtMgr部署-完整记录(1)
公司机房有一台2U的服务器(64G内存,32核),由于近期新增业务比较多,测试机也要新增,服务器资源十分有限.所以打算在这台2U服务器上部署kvm虚拟化,虚出多台VM出来,以应对新的测试需求. 当KV ...
- KVM虚拟化管理平台WebVirtMgr部署及使用
KVM虚拟化管理平台WebVirtMgr部署及使用 需求: 公司机房有一台2U的服务器(64G内存,32核),由于近期新增业务比较多,测试机也要新增,服务器资源十分有限.所以打算在这台2U服务器上 ...
随机推荐
- 2017 多校6 String
多校6 String(ac自动机) 题意: 给一本有\(n\)个单词的字典 \(q\)个查询 \(pref_i,suff_i\) 查询字典里有多少单词前缀匹配\(pref_i\),后缀同时匹配\(su ...
- cf 834 E. Ever-Hungry Krakozyabra
cf 834 E. Ever-Hungry Krakozyabra(爆搜+数位dp) 题意: 定义一种inedible tail为一个数把每一位数字按不降的顺序排列后,去掉前导0组成的序列 比如570 ...
- Eclipse EE导入maven工程
Eclipse EE下载地址:https://eclipse.org/downloads/ 启动Eclipse后,点击File->Import,选择Existing Maven Projects ...
- angular.extend(dst,src)的简单示例
自我认为这个方法跟angular.copy(src,dst)有点相似.在angular.extend({},src)时,就可以画等号.这个src只代表一个对象.代码如下:(注意这个src可以有多个对象 ...
- 浅谈Visitor Pattern
第一步: 在介绍Visitor Pattern (访问者模式)之前,先简要介绍一下:双重分派. 在Visitor Pattern中双重分派是指:数据结构的每一个节点都可以接受一个访问者的调用(这句 ...
- C++ primer 学习笔记之容器insert
今天在做练习9.22时,始终出现segments fault.最后才发现原来是自己对“容器insert之后迭代器会失效”的理解不够透彻. 题目如下: 假定iv是一个int的vector,下面的程序存在 ...
- 转:Android 的进程与线程总结
当一个Android应用程序组件启动时候,如果此时这个程序的其他组件没有正在运行,那么系统会为这个程序 以单一线程的形式启动一个新的Linux 进程. 默认情况下,同一应用程序下的所有组件都运行再相同 ...
- Topcoder SRM 602 div1题解
打卡- Easy(250pts): 题目大意:rating2200及以上和2200以下的颜色是不一样的(我就是属于那个颜色比较菜的),有个人初始rating为X,然后每一场比赛他的rating如果增加 ...
- F28379D烧写双核程序(在线&离线)
烧写双核程序前需知在分别对F28379D的CPU1和CPU2两个核进行烧写程序时,需要在CCS中建立两个工程,独立编写两个核的程序.如controlSUITE中提供的双核程序例程: 1. 在线1.1 ...
- Extract - <<凤凰牌老熊-现代支付系统设计>>
本文摘录自: http://blog.lixf.cn/essay/2017/04/01/concept-01-overview/ 一.支付概述-- 1. 支付与交易 交易过程: 交易的存在是支付发生的 ...