1、Kolla布置实验手册一、准备环境1、host:配备系统:centos7.3内存:8Gcpu:4核kola节点:kolla192.168.165.218openstack控制节点2台:controller01192.168.165.217controller02192.168.165.219openstack计算节点+存储节点2台:compute01192.168.165.231compute02192.168.165.232建议配备互信,kolla节点可以免密码登录其她节点2、VIP:必要具备一种同网段且没被使用ip192.168.165.233二、软件安装和配备1、kola节点安装安装依赖
2、包:yum install -y python-devel libffi-devel gcc openssl-devel git安装dockercurl -sSL | bash配备docker配备文献vi /usr/lib/systemd/system/docker.service ServiceMountFlags=sharedmkdir -p /etc/systemd/system/docker.service.dtee /etc/systemd/system/docker.service.d/kolla.conf -EOFServiceMountFlags=sharedEOF重启dock
3、ersystemctl daemon-reloadsystemctl start docker安装docker-bypip install -U docker-py安装ansible:newton版本需要使用ansible2.0以上,pip安装默认版本即可pip install ansible安装kolla工具git clone pip install kolla/cd kolla/pip install -r requirements.txt -r test-requirements.txt生成配备文献pip install -U toxtox -egenconfigcp -rv etc/k
4、olla /etc/安装openstack命令工具pip install -U python-openstackclient python-neutronclient2、控制节点和计算节点安装和配备安装dockercurl -sSL | bash配备docker配备文献vi /usr/lib/systemd/system/docker.service ServiceMountFlags=sharedmkdir -p /etc/systemd/system/docker.service.dtee /etc/systemd/system/docker.service.d/kolla.conf -E
5、OFServiceMountFlags=sharedEOF重启dockersystemctl daemon-reloadsystemctl start docker安装docker-bypip install -U docker-py三、下载kolla镜像多节点布置必要要有私有仓库。1、本地镜像直接执行如下命令即可build kolla镜像(需要较长时间)kolla-build -base centos -type source2、创立私有仓库运营registry容器docker run -d -p 4000:5000 -restart=always -name registry regist
6、ry:2直接执行如下命令build kolla镜像并push到指定仓库(需要较长时间)kolla-build -registry 192.168.165.218:4000 push -base centos -type source所有节点添加:vi /lib/systemd/system/docker.serviceServiceExecStart=/usr/bin/docker daemon -insecure-registry 192.168.165.218:4000四、安装openstack1、修改kolla节点配备文献vi /etc/kolla/globals.yml kolla_i
7、nstall_type:sourceopenstack_release:3.0.3 #与下载kolla镜像版本保持一致kolla_internal_vip_address:192.168.165.233 #配备vipnetwork_interface:ens33#配备业务网卡,与vip同一网段neutron_external_interface:ens32#配备外部网卡,不需要配备ipdocker_registry:192.168.165.218:4000 #配备私有仓库信息#docker_namespace:companynamedocker_registry_username:admind
8、ocker_registry_password:admin#这个文献底下尚有各个组件安装时配备参数2、配备kolla节点hosts文献vi /usr/share/kolla/ansible/inventory/multimodecontrolkolla-controller1kolla-controller2 networkkolla-controller1kolla-controller2computekolla-computekolla-objmonitoringkolla-computestoragekolla-computekolla-obj3、安装openstack生成密码,执行如下
9、命令后会生成/etc/kola/passwords.ymlkolla-genpwd执行节点检查,使用-i参数制定hosts文献,如不指定则表达all in onekolla-ansible prechecks I /usr/share/kolla/ansible/inventory/multimode执行安装命令,使用-i参数制定hosts文献,如不指定则表达all in onekolla-ansible deploy I /usr/share/kolla/ansible/inventory/multimode生成环境变量脚本/etc/kolla/admin-openrc.shkolla-an
10、sible post-deploy完毕后使用vip登录即可附录1、 kolla检查和安装使用到playbook文献以及openstack配备均在/usr/share/kolla/ansible/role 目录下,可以预先修改openstack配备后再进行安装。2、 安装好openstack配备文献在各个节点/etc/kolla目录下,可以进行修改重启相应容器或者进入容器重启服务后生效。3、 openstack日记和文献(如虚拟机文献、glance镜像文献等)都在/var/lib/docker/volumes/目录下4、 安装ceph指定storage组安装OSD,且storage节点/dev下安装ceph块需打上标签(只能指定/dev下块),如下parted /dev/sdb -s - mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1修改配备kolla节点配备文献/etc/kolla/globals.yml,修改一下配备后安装enable_ceph:yesenable_ceph_rgw:yes enable_cinder:yes5、官网: