openstack-kolla部署-后端ceph配置-openstack-linux镜像下载

镜像下载

下载centos7 镜像
wget http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2

上传到 galnce
#glance image-create --name "CentOS-7-x86_64" --disk-format qcow2 --container-format bare --file
CentOS-7-x86_64-GenericCloud.qcow2 --visibility public --progress

http://cloud.centos.org/centos/7/images/

 

 


1.1主节点环境配置

yum install epel-release -y ; yum install python-pip -y ; pip install -U pip
yum install python-devel libffi-devel gcc openssl-devel libselinux-python -y
yum install ansible -y
pip install -U ansible


1.2非必须
vi /etc/ansible/ansible.cfg
[defaults]
host_key_checking=False
pipelining=True
forks=100
1.3

pip install kolla-ansible
pip install --ignore-installed PyYAML
pip install kolla-ansible

1.4ceph硬盘配置
3个节点上均有一块硬盘,环境中为/dev/sdb

parted /dev/sdb -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1 #都要执行
parted /dev/sdc -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_002 1 -1#两块盘就也需要执行这个

目前安装kolla-ansible默认使用bluestore得ceph。演示使用filestore。需修改文件

vi /usr/share/kolla-ansible/ansible/group_vars/all.yml#发布节点操作
ceph_osd_store_type: "filestore"

 

2.1复制模板

cp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/ 
cp /usr/share/kolla-ansible/ansible/inventory/* .

2.2免密配置

ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub root@master63
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node62
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node61

2.3修改配置文件

vi multinode#编辑多节点部署参数

kolla-genpwd #生成密码文件

vi /etc/kolla/passwords.yml#生成后可以更改部分参数

vi /etc/kolla/globals.yml#主要参数配置

2.4发布准备和发布

kolla-ansible -i ./multinode bootstrap-servers #引导器
kolla-ansible -i ./multinode prechecks #检测环境部署
kolla-ansible -i ./multinode pull#拉取镜像
kolla-ansible -i ./multinode deploy#自动化部署

2.5验证部署存储池

docker exec ceph_mon ceph -s #查看部署的存储池

 

后续操作

安装客户端管理工具
pip install python-openstackclient python-glanceclient python-neutronclient

报错Cannot uninstall 'ipaddress'
pip install --ignore-installed ipaddress
pip install python-openstackclient python-glanceclient python-neutronclient

kolla-ansible post-deploy #生成认证文件
. /etc/kolla/admin-openrc.sh

高可用部署方案

https://blog.csdn.net/liuyanwuyu/article/details/80821677

https://www.cnblogs.com/sammyliu/p/4741967.html

posted @ 2019-04-23 22:27  夜辰雪扬  阅读(685)  评论(0)    收藏  举报