欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

OpenStack實(shí)踐(五):LinuxBridge方式實(shí)現(xiàn)LoadBalance

環(huán)境:

為梁山等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計(jì)制作服務(wù),及梁山網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為成都做網(wǎng)站、網(wǎng)站設(shè)計(jì)、外貿(mào)營銷網(wǎng)站建設(shè)、梁山網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會得到認(rèn)可,從而選擇與我們長期合作。這樣,我們也可以走得更遠(yuǎn)!

openstack版本pike
控制節(jié)點(diǎn)主機(jī)openstack-controller(ubuntu 16.04.5) 172.27.34.37
計(jì)算節(jié)點(diǎn)主機(jī)openstack-computer(ubuntu 16.04.5) 172.27.34.38
vlan100
centos01(172.27.100.17)、centos02(172.27.100.11)


ubuntu安裝詳見:Ubuntu16.04.5以lvm方式安裝全記錄

openstack安裝詳見:OpenStack實(shí)踐(一):Ubuntu16.04下DevStack方式搭建p版OpenStack


拓?fù)鋱D:

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

目標(biāo):

外網(wǎng)pc訪問Load Balancers ip 172.27.34.11,會輪詢訪問后端web服務(wù)器

本文目錄:

一、新建vlan
二、新建實(shí)例centos01

三、配置安全組

四、配置float ip

五、新建實(shí)例centos02

六、配置lbaas

一、新建vlan

1.配置ml2_conf.ini

主備機(jī)同時(shí)配置ml2_conf.ini

stack@openstack-controller:~$ view /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
tenant_network_types = vlan
extension_drivers = port_security
mechanism_drivers = openvswitch,linuxbridge
type_drivers = local,flat,vlan,gre,vxlan,geneve

[ml2_type_vlan]
network_vlan_ranges = vlan:3001:4000


[linux_bridge]
physical_interface_mappings = vlan:ens192

2.重啟neutron

stack@openstack-controller:~$ sudo systemctl restart devstack@q*

3.創(chuàng)建vlan100

stack@openstack-controller:/tmp$ openstack network create --provider-physical-network vlan --provider-network-type vlan --project admin vlan100

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

4.創(chuàng)建子網(wǎng)

創(chuàng)建子網(wǎng)subnet172.27.100.0

stack@openstack-controller:/tmp$ openstack subnet create --network vlan100 --subnet-range 172.27.100.0/24 --gateway 172.27.100.1 subnet172.27.100.0

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

5.查看創(chuàng)建的網(wǎng)絡(luò)

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

二、創(chuàng)建實(shí)例centos01

1.上傳介質(zhì)

上傳介質(zhì)CentOS-7-x86_64-GenericCloud-1503.qcow2c至/tmp目錄,下載地址:http://cloud.centos.org/centos/7/images/

2.制作鏡像

root@openstack-controller:~# su - stack
stack@openstack-controller:~$ source devstack/openrc admin admin
stack@openstack-controller:/tmp$ openstack image create "centos7"   --file CentOS-7-x86_64-GenericCloud-1503.qcow2c  --disk-format qcow2 --container-format bare   --public

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

3.新建秘鑰centos

使用stack用戶分別新建秘鑰對centos

stack@openstack-controller:~/key$ ssh-keygen  -t rsa -f centos.key
stack@openstack-controller:~/key$ more centos.pub

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

4.導(dǎo)入秘鑰

將公鑰導(dǎo)入

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

創(chuàng)建實(shí)例后,使用私鑰來登錄實(shí)例

5.查看實(shí)例類型

stack@openstack-controller:~$ nova flavor-list

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

實(shí)例類型選擇m1.small

6.查看鏡像

stack@openstack-controller:~$ glance image-list

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

選擇centos7

7.查看主機(jī)名和zone

stack@openstack-controller:~$ nova service-list

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

本文選擇控制節(jié)點(diǎn)luanch實(shí)例

8.查看網(wǎng)絡(luò)

stack@openstack-controller:~$ openstack network list

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

選擇新建的vlan100

9.查看密鑰對

stack@openstack-controller:~/key$ nova keypair-list

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

新建的實(shí)例centos01使用秘鑰centos

10.新建實(shí)例centos01

stack@openstack-controller:~/key$ nova boot --flavor m1.small --image centos7  --availability-zone nova:openstack-controller --nic net-name=vlan100 --key-name centos centos01

11.查看新建實(shí)例

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

三、新建安全組

1.編輯默認(rèn)安全組

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

2.新增規(guī)則

新增規(guī)則允許ping、ssh和80端口訪問

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

四、配置float ip
外網(wǎng)訪問配置

1.配置ml2_conf.ini

控制節(jié)點(diǎn)配置ml2_conf.ini

stack@openstack-controller:~$ view /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2_type_flat]
flat_networks = externaltt


[ml2_type_vlan]
network_vlan_ranges = vlan:3001:4000

[linux_bridge]
physical_interface_mappings = vlan:ens192,externaltt:ens224

2.重啟網(wǎng)絡(luò)

stack@openstack-controller:~$  sudo systemctl restart devstack@q*

由于本文外網(wǎng)環(huán)境為flat網(wǎng)絡(luò)(物理機(jī)的網(wǎng)卡接在交換機(jī)的access口),此處外網(wǎng)配置選擇flat,對應(yīng)網(wǎng)卡ens224,虛擬機(jī)內(nèi)網(wǎng)為vlan,對應(yīng)網(wǎng)卡ens192。

3.創(chuàng)建ext_net_flat

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

4.創(chuàng)建子網(wǎng)

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

5.不勾選dhcp

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

6.查看創(chuàng)建的外網(wǎng)

172.27.34.0該網(wǎng)段需能訪問外網(wǎng)。

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

新建路由

1.新建路由router100

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

外部網(wǎng)絡(luò)選擇ext_net_flat,將外網(wǎng)連接至虛擬路由器

此時(shí)會新增接口,ip為172.27.34.6

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

2.新增接口

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

創(chuàng)建floating ip

1.分配浮動ip

floating ip提供靜態(tài)NAT功能,配置在router提供網(wǎng)關(guān)的外網(wǎng)interface上。

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

2.關(guān)聯(lián)實(shí)例

創(chuàng)建浮動ip172.27.34.4,并分別與實(shí)例centos01關(guān)聯(lián)

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

五、新建實(shí)例centos02

實(shí)例centos02以centos01快照方式啟動

配置實(shí)例centos01

1.登陸centos01

登陸實(shí)例并修改密碼

stack@openstack-controller:~/key$ sudo ssh -i  centos.key centos@172.27.34.4

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

2.修改配置文件sshd_config

[root@centos01 ~]# view /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes

3.重啟sshd

[root@centos01 ~]# service sshd restart
Redirecting to /bin/systemctl restart  sshd.service

此時(shí)可以遠(yuǎn)程訪問實(shí)例了

4.關(guān)閉selinux

[root@centos01 ~]# setenforce 0
[root@centos01 ~]# sed -i 's/^ *SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

重啟后永久生效

5.配置源

[root@centos01 ~]# yum -y install wget
[root@centos01 ~]# cd /etc/yum.repos.d/
[root@centos01 yum.repos.d]# mkdir repo_bak && mv *.repo repo_bak/
[root@centos01 yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-7.repo

6.安裝apache服務(wù)并配置

[root@centos01 ~]# yum -y install httpd
[root@centos01 ~]# systemctl start httpd
[root@centos01 ~]# systemctl enable httpd
[root@centos01 ~]# echo web01-172.27.100.17 >/var/www/html/index.html

7.訪問centos01

訪問http://172.27.34.4/

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

創(chuàng)建實(shí)例centos02

1.創(chuàng)建快照

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

根據(jù)實(shí)例centos01創(chuàng)建快照centos

2.由鏡像啟動實(shí)例

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

由鏡像centos啟動實(shí)例centos02

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

網(wǎng)絡(luò)、實(shí)例類型等和centos01保持一致

3.配置centos02

參照centos01配置,關(guān)聯(lián)vip,連接centos02進(jìn)行相關(guān)配置

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

4.訪問centos02

訪問http://172.27.34.5/

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

六、配置lbaas

查看Octavia服務(wù)

本文以O(shè)ctavia方式實(shí)現(xiàn)lbaas,從Pike版本開始,Octavia就可以作為獨(dú)立的Keystone服務(wù)而不再是Neutron的一個(gè)service plugin。

stack@openstack-controller:~$ openstack service list

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

Load Balancers配置

1.創(chuàng)建Load Balancers

新建Load Balancer 4,子網(wǎng)選擇內(nèi)網(wǎng)subnet172.27.100.0

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

2.配置Listener

Listener的協(xié)議選擇HTTP,端口默認(rèn)為80

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

3.配置Pool

Pool的方法為round_robin

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

4.加入pool members

將centos01和centos02加入pool

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

5.新建monitor

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

6.分配浮動ip

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

將浮動ip172.27.34.11分配給load balance做vip

7.查看新建的Load Balancers

查看vip

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

查看實(shí)例

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

8.訪問測試

在計(jì)算節(jié)點(diǎn)訪問vip

root@openstack-computer:~# for i in {1..10};do sleep 5; curl http://172.27.34.11; done

OpenStack實(shí)踐(五):Linux Bridge方式實(shí)現(xiàn)Load Balance

訪問vip,發(fā)現(xiàn)以輪詢方式分別訪問后端的web服務(wù)器,結(jié)果符合預(yù)期。

文章標(biāo)題:OpenStack實(shí)踐(五):LinuxBridge方式實(shí)現(xiàn)LoadBalance
當(dāng)前鏈接:http://chinadenli.net/article36/jgihpg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、App開發(fā)網(wǎng)站收錄、品牌網(wǎng)站制作、搜索引擎優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)公司
欧美国产亚洲一区二区三区| 在线日本不卡一区二区| 国产中文另类天堂二区| 免费在线观看激情小视频| 国产视频一区二区三区四区| 欧美亚洲另类久久久精品| 日韩精品福利在线观看| 欧美在线观看视频三区| 国产又粗又猛又黄又爽视频免费 | 欧美多人疯狂性战派对| 亚洲国产欧美久久精品| 五月婷婷缴情七月丁香| 91亚洲国产成人久久| 熟女乱一区二区三区四区| 国产亚洲不卡一区二区| 在线免费视频你懂的观看| 国产偷拍盗摄一区二区| 果冻传媒精选麻豆白晶晶| 日韩一区二区三区18| 黄色国产一区二区三区| 国产成人av在线免播放观看av | 清纯少妇被捅到高潮免费观看| 日本午夜福利视频免费观看| 在线观看日韩欧美综合黄片| 欧美人妻少妇精品久久性色| 欧洲亚洲精品自拍偷拍| 国产一区二区三区香蕉av| 91麻豆精品欧美视频| 欧美大胆美女a级视频| 成人欧美一区二区三区视频| 亚洲熟女诱惑一区二区| 初尝人妻少妇中文字幕在线| 丝袜人妻夜夜爽一区二区三区| 91精品视频免费播放| 国产视频一区二区三区四区| 风韵人妻丰满熟妇老熟女av| 亚洲一区二区三区国产| 欧美精品一区二区水蜜桃| 欧美性猛交内射老熟妇| 日韩人妻免费视频一专区| 在线观看那种视频你懂的|