Kolla OpenStack

Posted w787815

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Kolla OpenStack相关的知识,希望对你有一定的参考价值。

多节点部署

目录

  • 业务场景
  • 多节点的规划(2)
  • 网络规划与拓扑
  • 管理节点的配置
  • 部署
  • 物理机部署

业务场景

  • 适合节点规模在3-5个左右。
  • 没有管理节点的高可用,没有ssd(没有万M网络),不用ceph。
  • 主要跑些测试或hadoop应用等。

多节点的配置

  • Kolla部署+一个管理(3c/6g)、一个计算(3c/8g)
  • 创建vm,安装系统(可以从base克隆,然后调整配置)
  • 修改虚拟机配置信息

网络拓扑

  • 主机名
  • IP地址
  • 解析(/etc/hosts)
  • 10.99.0.2  control01
  • 10.99.0.3 compute01

技术分享图片

管理节点

技术分享图片
[[email protected] ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.99.0.2 control01
10.99.0.3 compute01
[[email protected] ~]# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
        inet6 fe80::42:48ff:fe1d:80e8  prefixlen 64  scopeid 0x20<link>
        ether 02:42:48:1d:80:e8  txqueuelen 0  (Ethernet)
        RX packets 52580  bytes 2097827855 (1.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32581  bytes 2283934 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.99.0.2  netmask 255.255.255.0  broadcast 10.99.0.255
        inet6 fe80::20c:29ff:fe79:1cf  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:79:01:cf  txqueuelen 1000  (Ethernet)
        RX packets 42940  bytes 5331168 (5.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 704615  bytes 1788637637 (1.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.2  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::20c:29ff:fe79:1d9  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:79:01:d9  txqueuelen 1000  (Ethernet)
        RX packets 116  bytes 13373 (13.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17  bytes 1226 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens35: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.10.43  netmask 255.255.255.0  broadcast 10.10.10.255
        inet6 fe80::20c:29ff:fe79:1e3  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:79:01:e3  txqueuelen 1000  (Ethernet)
        RX packets 278276  bytes 147437798 (140.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 28  bytes 2678 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 370662  bytes 106512200 (101.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 370662  bytes 106512200 (101.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth390b78b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f806:51ff:fe66:52bb  prefixlen 64  scopeid 0x20<link>
        ether fa:06:51:66:52:bb  txqueuelen 0  (Ethernet)
        RX packets 52580  bytes 2098563975 (1.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32589  bytes 2284582 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
View Code

计算节点

技术分享图片
[[email protected] ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.99.0.2 control01
10.99.0.3 compute01

[[email protected] ~]# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
        inet6 fe80::42:a1ff:fe80:78db  prefixlen 64  scopeid 0x20<link>
        ether 02:42:a1:80:78:db  txqueuelen 0  (Ethernet)
        RX packets 8  bytes 536 (536.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 648 (648.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.99.0.3  netmask 255.255.255.0  broadcast 10.99.0.255
        inet6 fe80::20c:29ff:fe76:d661  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:76:d6:61  txqueuelen 1000  (Ethernet)
        RX packets 690743  bytes 1019329066 (972.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 33773  bytes 5659545 (5.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.3  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::20c:29ff:fe76:d66b  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:76:d6:6b  txqueuelen 1000  (Ethernet)
        RX packets 110  bytes 13013 (12.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17  bytes 1226 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens35: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.10.44  netmask 255.255.255.0  broadcast 10.10.10.255
        inet6 fe80::20c:29ff:fe76:d675  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:76:d6:75  txqueuelen 1000  (Ethernet)
        RX packets 285526  bytes 150723954 (143.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 25  bytes 2462 (2.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 68563  bytes 6756227 (6.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 68563  bytes 6756227 (6.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethf946c43: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::74f3:38ff:fe16:69ac  prefixlen 64  scopeid 0x20<link>
        ether 76:f3:38:16:69:ac  txqueuelen 0  (Ethernet)
        RX packets 8  bytes 648 (648.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 1296 (1.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
View Code

免秘钥登录

  • ssh-keygen
  • ssh-copy-id control01
  • ssh-copy-id compute01
技术分享图片
[[email protected] ~]# ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
e1:68:bf:d8:10:a3:1e:a2:02:93:3b:1f:2f:ed:7c:f7 [email protected]
The keys randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|        .        |
|       o .       |
| .    = S        |
|+    o +         |
|.oo.o . .        |
|+..*...+..       |
|oo.o=...o.E      |
+-----------------+
[[email protected] ~]# ssh-copy-id control01
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Warning: Permanently added control01,10.99.0.2 (ECDSA) to the list of known hosts.
[email protected]s password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh ‘control01‘"
and check to make sure that only the key(s) you wanted were added.

[[email protected] ~]# ssh-copy-id compute01
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Warning: Permanently added compute01,10.99.0.3 (ECDSA) to the list of known hosts.
[email protected]s password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh ‘compute01‘"
and check to make sure that only the key(s) you wanted were added.
View Code

管理节点multinode配置

编辑ansible的inventory主机清单文件
vim /root/kolla-ansible-4.0.3.dev36/ansible/inventory/multinode

[control] 
control01 
[network] 
control01
[compute] 
control01
[monitoring]
control01
[storage] 
compute01

 

以上是关于Kolla OpenStack的主要内容,如果未能解决你的问题,请参考以下文章

Kolla OpenStack

OpenStack——使用Kolla部署OpenStack-allinone云平台

Kolla OpenStack

325.【openstack】kolla 搭建 openstack 单机版云环境

openstack 之 Kolla部署指南(容器化方式)

Kolla部署Pike版本的OpenStack-allinone云平台