一、环境准备
1、host
deploy | 安装kolla |
controller | node0 |
compute | node3 |
storage | node5 |
network | node7 |
2、软件版本
kolla | stable/newton |
docker-engine | 1.12.2 |
python-docker-py | 1.7.2-1 |
3、为cinder volume准备lvm
在node5上执行下面命令
pvcreate /dev/sdc vgcreate cinder-volumes /dev/sdc
二、安装kolla,并构建images
参看: kolla newton 配置
三、配置kolla
1、编辑/etc/kolla/globals.yml
kolla_base_distro: "centos" kolla_install_type: "source" openstack_release: "3.0.1" kolla_internal_vip_address: "192.168.1.10" kolla_external_vip_address: "{{ kolla_internal_vip_address }}" docker_registry: "registry_ip_address:registry_ip_port" docker_namespace: "kolla" docker_registry_username: "admin" docker_registry_password: "registry_password" network_interface: "eth0" neutron_external_interface: "eth1" neutron_plugin_agent: "linuxbridge" nova_console: "novnc" enable_haproxy: "no" enable_keystone: "yes" enable_glance: "yes" enable_neutron: "yes" enable_heat: "no" enable_nova: "yes" enable_horizon: "yes" enable_cinder: "yes" enable_cinder_backend_lvm: "yes" # 若设置为no,虽可创建cinder volume,然,volume不能挂载到instance enable_central_logging: "no" enable_ceph: "no" enable_ceilometer: "no" enable_mongodb: "no" enable_sahara: "no"
2、为/etc/kolla/passwords.yml生成密码
kolla-genpwd
3、编辑/usr/share/kolla/ansible/inventory/multinode
# 注意:注释掉各节中,原有主机名 [control] node0 ... [network] node7 ... [compute] node3 ... [monitoring] #monitoring01 ... [storage] node5
四、部署openstack
1、为network上的docker启用MountFlags shared,在node7上执行
mkdir -p /etc/systemd/system/docker.service.d # Create the drop-in unit file tee /etc/systemd/system/docker.service.d/kolla.conf <<-‘EOF‘ [Service] MountFlags=shared EOF systemctl daemon-reload systemctl restart docker
2、使用qemu,在kolla主机上执行
mkdir -p /etc/kolla/config/nova/ cat <<EOF>> /etc/kolla/config/nova/nova-compute.conf [libvirt] virt_type=qemu EOF
3、执行安装前检查
kolla-ansible -i /usr/share/kolla/ansible/inventory/multinode prechecks
4、拉取images
kolla-ansible -i /usr/share/kolla/ansible/inventory/multinode pull
5、部署openstack
kolla-ansible -i /usr/share/kolla/ansible/inventory/multinode deploy
6、执行安装后配置
kolla-ansible -i /usr/share/kolla/ansible/inventory/multinode post-deploy
7、执行初始化,在kolla主机上执行
/usr/share/kolla/init-runonce
至此,部署完毕
本文出自 “武陵荒草” 博客,请务必保留此出处http://penguintux.blog.51cto.com/3021117/1865832
原文地址:http://penguintux.blog.51cto.com/3021117/1865832