kolla-ansible多节点部署openstack queens

环境准备

  • 节点服务部署规划
  • 网络部署方案

    安装/配置Docker

    安装docker-ce

    1
    2
    
    # yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    # yum install docker-ce
    

配置Docker使用overlayfs2

  • 升级kernel
1
2
3
4
5
6
7
8
9
10
11
12
# rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
# yum -y --enablerepo=elrepo-kernel install  kernel-ml-devel kernel-ml

# awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
CentOS Linux (4.18.5-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-d8f3b1ed35b245d6805ae3dd4acc0586) 7 (Core)
# grub2-set-default "CentOS Linux (4.18.5-1.el7.elrepo.x86_64) 7 (Core)"
# reboot

# uname -r
4.18.5-1.el7.elrepo.x86_64
  • 配置Docker使用overlayfs2
1
2
3
4
5
6
7
8
9
10
11
12
# modprobe overlay
# vi /etc/modules-load.d/overlay.conf
overlay
# lsmod  | grep overlay
overlay                49152  0
# vi /lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd  --storage-driver=overlay
# systemctl daemon-reload
# systemctl restart docker
# docker info
Storage Driver: overlay
 Backing Filesystem: xfs

安装相关依赖

1
2
3
4
# yum install epel-release
# yum install python-pip
# pip install -U pip
# yum install python-devel libffi-devel gcc openssl-devel libselinux-python

安装ansible

1
# yum install ansible

安装kolla-ansible

1
# pip install kolla-ansible

初始化配置

password.yml

1
# kolla-genpwd

global.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
kolla_base_distro: "centos"
kolla_install_type: "binary"
openstack_release: "queens"
kolla_internal_vip_address: "10.200.111.250"
docker_registry: "registry.yealinkops.com:5555"
docker_namespace: "kolla"
network_interface: "enp4s0f0"
neutron_external_interface: "enp4s0f1"
neutron_plugin_agent: "linuxbridge"
nova_console: "spice"
enable_ceilometer: "no"
enable_central_logging: "yes"
enable_chrony: "yes"
enable_cinder: "yes"
enable_cinder_backend_lvm: "yes"
enable_haproxy: "yes"
enable_heat: "no"
enable_horizon: "yes"
enable_neutron_lbaas: "no"
enable_neutron_fwaas: "no"
enable_neutron_qos: "no"
enable_neutron_agent_ha: "yes"
enable_openvswitch: "no"
nova_compute_virt_type: "kvm"

multinode

主要修改以下配置,其他的默认即可

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[control]
control01
control02
control03
[external-compute]
control01
control02
control03
compute01
compute02
[network]
control01
control02
control03
[compute:children]
external-compute

检查环境

1
# kolla-ansible -i /etc/kolla/multinode prechecks

配置docker mountflags

在[Service]中添加MountFlags=shared

1
2
3
4
5
# vim /usr/lib/systemd/system/docker.service
[Service]
MountFlags=shared
# systemctl daemon-reload
# systemctl restart

 

pull相关的docker镜像

1
# kolla-ansible -i /etc/kolla/multinode pull

配置本地docker registry

1
2
# mkdir /opt/docker/registry
# docker run -d -v /opt/docker/registry:/var/lib/registry -p 5555:5000 --restart=always --name registry registry:2.6.2

上传docker镜像到本地registry

1
2
# for i in `docker images|grep kolla`;do docker tag $i:queens registry.yealinkops.com:5555/$i:queens;done
# for i in `docker images|grep registry.yealinkops.com`;do docker push $i:queens;done

通过kolla-ansible部署OpenStack

1
# kolla-ansible -i /etc/kolla/multinode deploy

部署完成后控制节点将会创建如下容器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# docker ps
CONTAINER ID        IMAGE                                                                               COMMAND             CREATED             STATUS              PORTS               NAMES
47424821dbab        registry.yealinkops.com:5555/kolla/centos-binary-horizon:queens                     "kolla_start"       3 hours ago         Up About an hour                        horizon
d0766ece5524        registry.yealinkops.com:5555/kolla/centos-binary-neutron-metadata-agent:queens      "kolla_start"       3 hours ago         Up About an hour                        neutron_metadata_agent
96daaffffd44        registry.yealinkops.com:5555/kolla/centos-binary-neutron-l3-agent:queens            "kolla_start"       3 hours ago         Up About an hour                        neutron_l3_agent
660e4a063a59        registry.yealinkops.com:5555/kolla/centos-binary-neutron-dhcp-agent:queens          "kolla_start"       3 hours ago         Up About an hour                        neutron_dhcp_agent
3bfcc92b5ad3        registry.yealinkops.com:5555/kolla/centos-binary-neutron-linuxbridge-agent:queens   "kolla_start"       3 hours ago         Up About an hour                        neutron_linuxbridge_agent
0aa3342cb7ef        registry.yealinkops.com:5555/kolla/centos-binary-neutron-server:queens              "kolla_start"       3 hours ago         Up About an hour                        neutron_server
a2b1d49bfb7b        registry.yealinkops.com:5555/kolla/centos-binary-nova-compute:queens                "kolla_start"       3 hours ago         Up About an hour                        nova_compute
d253ffdadcf4        registry.yealinkops.com:5555/kolla/centos-binary-nova-spicehtml5proxy:queens        "kolla_start"       3 hours ago         Up About an hour                        nova_spicehtml5proxy
22d91b85cf84        registry.yealinkops.com:5555/kolla/centos-binary-nova-consoleauth:queens            "kolla_start"       3 hours ago         Up About an hour                        nova_consoleauth
bf4621578bff        registry.yealinkops.com:5555/kolla/centos-binary-nova-conductor:queens              "kolla_start"       3 hours ago         Up About an hour                        nova_conductor
b068e99747b1        registry.yealinkops.com:5555/kolla/centos-binary-nova-scheduler:queens              "kolla_start"       3 hours ago         Up About an hour                        nova_scheduler
ad5dd5237b6e        registry.yealinkops.com:5555/kolla/centos-binary-nova-api:queens                    "kolla_start"       3 hours ago         Up About an hour                        nova_api
b025f52283d2        registry.yealinkops.com:5555/kolla/centos-binary-nova-placement-api:queens          "kolla_start"       3 hours ago         Up About an hour                        placement_api
2ab6181e8ae7        registry.yealinkops.com:5555/kolla/centos-binary-nova-libvirt:queens                "kolla_start"       3 hours ago         Up About an hour                        nova_libvirt
8e02de10c4cf        registry.yealinkops.com:5555/kolla/centos-binary-nova-ssh:queens                    "kolla_start"       3 hours ago         Up About an hour                        nova_ssh
35088c1691b6        registry.yealinkops.com:5555/kolla/centos-binary-cinder-backup:queens               "kolla_start"       3 hours ago         Up About an hour                        cinder_backup
f3703fcdd7b5        registry.yealinkops.com:5555/kolla/centos-binary-cinder-volume:queens               "kolla_start"       3 hours ago         Up About an hour                        cinder_volume
4316f3a01d89        registry.yealinkops.com:5555/kolla/centos-binary-cinder-scheduler:queens            "kolla_start"       3 hours ago         Up About an hour                        cinder_scheduler
7ecf5b483036        registry.yealinkops.com:5555/kolla/centos-binary-cinder-api:queens                  "kolla_start"       3 hours ago         Up About an hour                        cinder_api
e19144703f9c        registry.yealinkops.com:5555/kolla/centos-binary-glance-registry:queens             "kolla_start"       3 hours ago         Up About an hour                        glance_registry
92eacee7e88a        registry.yealinkops.com:5555/kolla/centos-binary-glance-api:queens                  "kolla_start"       3 hours ago         Up About an hour                        glance_api
a81f44653a68        registry.yealinkops.com:5555/kolla/centos-binary-keystone:queens                    "kolla_start"       3 hours ago         Up About an hour                        keystone
9a8b092959f0        registry.yealinkops.com:5555/kolla/centos-binary-rabbitmq:queens                    "kolla_start"       3 hours ago         Up 3 hours                              rabbitmq
3c5870f03c05        registry.yealinkops.com:5555/kolla/centos-binary-tgtd:queens                        "kolla_start"       3 hours ago         Up 3 hours                              tgtd
94dc409d53c6        registry.yealinkops.com:5555/kolla/centos-binary-iscsid:queens                      "kolla_start"       3 hours ago         Up 3 hours                              iscsid
aec4db625cb8        registry.yealinkops.com:5555/kolla/centos-binary-mariadb:queens                     "kolla_start"       3 hours ago         Up 3 hours                              mariadb
1b9618b5c4d5        registry.yealinkops.com:5555/kolla/centos-binary-memcached:queens                   "kolla_start"       3 hours ago         Up 3 hours                              memcached
3211ab7263ca        registry.yealinkops.com:5555/kolla/centos-binary-kibana:queens                      "kolla_start"       3 hours ago         Up 3 hours                              kibana
3a35d31bd0d5        registry.yealinkops.com:5555/kolla/centos-binary-keepalived:queens                  "kolla_start"       3 hours ago         Up 2 hours                              keepalived
2fa491f1a1ff        registry.yealinkops.com:5555/kolla/centos-binary-haproxy:queens                     "kolla_start"       3 hours ago         Up 3 hours                              haproxy
8a4df8a14c79        registry.yealinkops.com:5555/kolla/centos-binary-elasticsearch:queens               "kolla_start"       3 hours ago         Up 3 hours                              elasticsearch
f1158ff12cea        registry.yealinkops.com:5555/kolla/centos-binary-chrony:queens                      "kolla_start"       3 hours ago         Up 3 hours                              chrony
a0cfdf3721ea        registry.yealinkops.com:5555/kolla/centos-binary-cron:queens                        "kolla_start"       3 hours ago         Up 3 hours                              cron
1400e0971544        registry.yealinkops.com:5555/kolla/centos-binary-kolla-toolbox:queens               "kolla_start"       3 hours ago         Up 3 hours                              kolla_toolbox
935d97a2b91e        registry.yealinkops.com:5555/kolla/centos-binary-fluentd:queens                     "kolla_start"       3 hours ago         Up 3 hours                              fluentd

 

生成admin用户凭证

1
# kolla-ansible post-deploy

安装相关的OpenStack CLI客户端

1
# pip install python-openstackclient python-glanceclient python-neutronclient

 

转自:https://vnimos.cn/2018/09/19/openstack-kolla-deploy/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值