博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
添加 Pool Member - 每天5分钟玩转 OpenStack(123)
阅读量:6896 次
发布时间:2019-06-27

本文共 1307 字,大约阅读时间需要 4 分钟。

 

我们已经有了 Load Balance Pool “web servers”和 VIP,接下来需要往 Pool 里添加 member 并学习如何使用 cloud image。 先准备两个 instance: “Web1” 和 “Web2”。

使用 Ubuntu Cloud Image

由于 cirros 镜像不能运行 HTTP 服务,我们将使用 Ubuntu Cloud Image。

下载地址为 

与以前的 instance 不同,Web1 和 Web2 使用了命名为“cloud”的 Key Pair。

这是因为 Ubuntu Cloud Image 默认用户 “ubuntu” 的密码是随机生成的,通过 Key Pair 访问是一个比较方便的方法。

下面是 Key Pair 的配置方法:

  1. 通过 ssh-keygen 生成 Key Pair。

    其中 cloud.key.pub 是公钥,需要添加到 instance 的 ~/.ssh/authorized_keys 文件中。 cloud.key 是私钥,用于访问 instance。

  2. 将 Pair Key 导入 OpenStack 进入 Project -> Compute -> Access & Security 菜单,点击 Key Pairs 标签页的 “Import Key Pair” 按钮。

    复制 cloud.key.pub 的内容。
    粘贴到 Public Key 输入框中,给 Key Pair 命名为 “cloud”,并点击 “Import Key Pair”。
    Key Pair “cloud” 成功导入。

  3. 使用 Key Pair “cloud”。 launch instance 的时候,在 Access & Security 标签页中选择 Key Pair “cloud”。 OpenStack 会自动将公钥添加进 instance 的  ~/.ssh/authorized_keys 文件。

  4. ssh instance。 用 -i cloud.key 指定私钥,并以 ubuntu 用户 ssh “Web1” 和 “Web2”。

    无需密码直接登录 instance。
    注:为了便于演示,这里我们是在 router 的 namespace 中执行 ssh,主要目的是网络可达。

“Web1” 和 “Web2” 准备就绪了,可以添加到 Pool 中了。 在 Project -> Network -> Load Balancers 的 Members 标签页中 点击 “Add Member” 按钮。

Pool 选择 “web servers”。 Member(s) 中多选 “Web1” 和 “Web2”。 Protocol Port 设置为 “80”。

点击 “Add”,member 添加成功。

Pool Member 有了,下一节我们将为 Pool 创建 Monitor,用于 Member 健康检查。

二维码+指纹.png

本文转自CloudMan6 51CTO博客,原文链接:http://blog.51cto.com/cloudman/1881000

转载地址:http://oacdl.baihongyu.com/

你可能感兴趣的文章
tomcat配置虚拟主机
查看>>
【百度地图API】百度API卫星图使用方法和卫星图对比工具
查看>>
XCode中使用SVN 教程
查看>>
Guice--Java依赖注入框架
查看>>
第二、UIScrollView的使用大全
查看>>
Ehcache(03)——Ehcache中储存缓存的方式
查看>>
基于海康监控的图像识别设计
查看>>
Senparc.Weixin.MP SDK 微信公众平台开发教程(十五):消息加密
查看>>
CCNA2.0笔记_HSRP
查看>>
wamp You don't have permission to access / on this server等问题的解决.
查看>>
【POJ】3071 Football
查看>>
ArcGis 统计方法
查看>>
Resource interpreted as Script but transferred with MIME type text/plain
查看>>
VirtualBox安装及使用说明和虚拟机安装XP系统图文教程
查看>>
【android】优秀的UI资源站点集合
查看>>
iOS 容易引“起循环引用”的三种场景
查看>>
轮播图点击 手势 代码
查看>>
新年札记:自学系统补完计划
查看>>
[Javascript] Gradient Fills on the HTML5 Canvas
查看>>
对CAB文件进行数字签名
查看>>