标签:社区 enable -- ceph 2023.2 cinder Openstack yes kolla
Openstack : 2023.2
Ceph version : Pacific
Linux system : Rocky 9.3
网络:ens160(管理网)ens192(业务网)
二、Rocky 9.3 系统安装
1、修改ssh配置,允许root用户登录
2、修改主机名、禁用防火墙和Selinux
hostnamectl set-hostname control01 && bash
systemctl stop firewalld && systemctl disable firewalld
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
3、安装常用软件包
yum install -y vim wget curl net-tools unzip
4、网络配置
业务网禁用dhcp服务
四、Ceph 存储部署
1、安装环境依赖包
dnf search release-ceph
dnf install --assumeyes centos-release-ceph-pacific
dnf install --assumeyes cephadm
2、遇到 ssh 不能连接问题,重装
yum remove -y openssh*
yum install -y openssh*
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
systemctl restart sshd && systemctl enable sshd
3、deploy ceph
Bash cephadm bootstrap --mon-ip 192.168.10.20 --initial-dashboard-user admin --initial-dashboard-password admin --cluster-network 192.168.10.0/24 --allow-fqdn-hostname cephadm install ceph-common
ceph orch apply mon 1 ceph orch apply mgr 1 ceph orch apply osd --all-available-devices --unmanaged=true |
#ceph 添加数据盘,根据实际环境添加
Bash ceph orch daemon add osd control01:data_devices=/dev/nvme0n2,/dev/nvme0n3,/dev/nvme0n4 ceph osd pool autoscale-status ceph config set global osd_pool_default_pg_autoscale_mode off ceph config set global log_to_file true ceph config set global mon_cluster_log_to_file true |
Bash ceph osd pool create volumes 64 64 ceph osd pool create backups 32 32 ceph osd pool create vms 32 32 ceph osd pool create images 32 32
ceph auth get-or-create client.cinder mon 'profile rbd' osd 'profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images' ceph auth get-or-create client.cinder-backup mon 'profile rbd' osd 'profile rbd pool=backups' ceph auth get-or-create client.glance mon 'profile rbd' osd 'profile rbd pool=images' ceph auth get-or-create client.nova mon 'profile rbd' osd 'profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images' |
4.3 配置调整(副本数)
Bash ceph config set global mon_allow_pool_size_one true ceph config set osd osd_pool_default_size 1 ceph config set osd osd_pool_default_min_size 1 ceph osd pool set volumes size 1 --yes-i-really-mean-it ceph osd pool set backups size 1 --yes-i-really-mean-it ceph osd pool set vms size 1 --yes-i-really-mean-it ceph osd pool set images size 1 --yes-i-really-mean-it ceph osd pool set device_health_metrics size 1 --yes-i-really-mean-it |
#调整ceph.conf 缩进
部署完成ceph状态如下:
五 openstack deploy
1、配置yum 源、安装环境依赖包
dnf install -y epel-release
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y git python3-devel libffi-devel gcc openssl-devel python3-libselinux docker-ce
2、配置docker加速
Bash cat >> /etc/docker/daemon.json << END { "registry-mirrors": [ "https://mirror.ccs.tencentyun.com" ] } END |
systemctl restart docker && systemctl enable docker
3、pip更换为国内源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip install pip -U
pip install ansible
cp /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla/
cp /usr/local/share/kolla-ansible/ansible/inventory/multinode ./
#配置multinode文件
kolla-ansible install-deps
kolla-genpwd
#配置 globals文件 /etc/kolla/globals.yml
Bash kolla_base_distro: "rocky" openstack_release: "2023.2" kolla_internal_vip_address: "192.168.10.100" network_interface: "ens160" neutron_external_interface: "ens192" neutron_plugin_agent: "openvswitch" openstack_logging_debug: "True" enable_openstack_core: "yes" enable_glance: "{{ enable_openstack_core | bool }}" enable_haproxy: "yes" enable_keystone: "{{ enable_openstack_core | bool }}" enable_mariadb: "yes" enable_memcached: "yes" enable_neutron: "{{ enable_openstack_core | bool }}" enable_nova: "{{ enable_openstack_core | bool }}" enable_rabbitmq: "{{ 'yes' if om_rpc_transport == 'rabbit' or om_notify_transport == 'rabbit' else 'no' }}" enable_chrony: "yes" enable_heat: "no" enable_keepalived: "yes" enable_central_logging: "no" enable_cinder: "yes" enable_cinder_backup: "no" enable_fluentd: "no" enable_iscsid: "yes" enable_neutron_vpnaas: "yes" enable_neutron_sriov: "no" enable_neutron_qos: "yes" enable_nova_ssh: "yes" enable_openvswitch: "yes" enable_prometheus: "no" enable_redis: "yes" enable_skyline: "yes" glance_backend_ceph: "yes" glance_backend_file: "no" cinder_backend_ceph: "yes" |
#创建config目录
mkdir -p /etc/kolla/config/{ironic,glance,nova,neutron-server}
mkdir -p /etc/kolla/config/cinder/{cinder-volume,cinder-backup}
#glance、nova、cinder配置
Bash scp /etc/ceph/ceph.conf /etc/kolla/config/glance/ceph.conf ceph auth get-or-create client.glance | tee /etc/kolla/config/glance/ceph.client.glance.keyring scp /etc/ceph/ceph.conf /etc/kolla/config/nova/ceph.conf ceph auth get-or-create client.cinder | tee /etc/kolla/config/nova/ceph.client.cinder.keyring ceph auth get-or-create client.nova | tee /etc/kolla/config/nova/ceph.client.nova.keyring scp /etc/ceph/ceph.conf /etc/kolla/config/cinder/ceph.conf ceph auth get-or-create client.cinder | tee /etc/kolla/config/cinder/cinder-volume/ceph.client.cinder.keyring ceph auth get-or-create client.cinder | tee /etc/kolla/config/cinder/cinder-backup/ceph.client.cinder.keyring ceph auth get-or-create client.cinder-backup | tee /etc/kolla/config/cinder/cinder-backup/ceph.client.cinder-backup.keyring |
#deploy平台
Bash kolla-ansible -i ./multinode bootstrap-servers kolla-ansible -i ./multinode prechecks kolla-ansible -i multinode deploy |
#完成如下:
5.3 平台服务查询
#下载openstack client
pip install python-openstackclient -c https://releases.openstack.org/constraints/upper/2023.2
kolla-ansible post-deploy
source /etc/kolla/admin-openrc.sh
openstack compute service list
openstack network agent list
openstack volume service list
nova bug issue ,nova-compute 服务起不来,解决方法如下:
https://review.opendev.org/c/openstack/kolla-ansible/+/924548
下载如上四个文件,复制到相应目录下
docker rm nova_libvirt nova_compute
kolla-ansible -i multinode deploy -t nova
1、镜像上传
2、flavor 创建
3、网络创建
Bash yum install -y python3-neutronclient neutron net-create --provider:network_type=flat --provider:physical_network=physnet1 --shared net_192.168.10.0/24 neutron subnet-create --name sub_192.168.10.0/24 --gateway 192.168.10.2 net_192.168.10.0/24 192.168.10.0/24 openstack network set --disable-port-security net_192.168.10.0/24 |
4、虚拟机创建
Bash openstack server create --image Rocky-8.6 --network net_192.168.10.0/24 --flavor Flavor_2C2G --boot-from-volume 20 vm01 |
#复制skyline密码,页面访问如下:
虚拟机地址是dhcp,可页面显示不一致,可修改为静态ip,配置完成可ssh登录使用
标签:社区,
enable,
--,
ceph,
2023.2,
cinder,
Openstack,
yes,
kolla
From: https://blog.csdn.net/wrxe21/article/details/144016212