• cinder控制节点部署


    块存储,类似于磁盘
    第一步:创建cinder的数据库和用户
    [root@zxw6 ~]# mysql -uroot -p123
    create database cinder;

    grant all on cinder.* to cinder@'localhost' identified by 'zxw6';
    Query OK, 0 rows affected (0.02 sec)

    grant all on cinder.* to cinder@'%' identifiied by 'zxw6';
    Query OK, 0 rows affected (0.00 sec)

    登录到openstack
    [root@zxw6 ~]# source openrc


    第二步:创建openstack的cinder用户
    [root@zxw6 ~]# openstack user create --domain default --password=zxw6 cinder

    +---------------------+----------------------------------+
    | Field | Value |
    +---------------------+----------------------------------+
    | domain_id | default |
    | enabled | True |
    | id | c6d19459b0354931a4e281bfc52b9a88 |
    | name | cinder |
    | options | {} |
    | password_expires_at | None |
    +---------------------+----------------------------------+

    第四步:在service项目把cinder用户加入到admin角色
    [root@zxw6 ~]# openstack role add --project service --user cinder admin


    第五步:创建service项目cinderv2,cinderv3

    [root@zxw6 ~]# openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
    +-------------+----------------------------------+
    | Field | Value |
    +-------------+----------------------------------+
    | description | OpenStack Block Storage |
    | enabled | True |
    | id | d51dc5280e584c7b8a50f018a0041724 |
    | name | cinderv2 |
    | type | volumev2 |
    +-------------+----------------------------------+

    [root@zxw6 ~]# openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
    +-------------+----------------------------------+
    | Field | Value |
    +-------------+----------------------------------+
    | description | OpenStack Block Storage |
    | enabled | True |
    | id | c67f72e6c80942ef9baacc123feae8da |
    | name | cinderv3 |
    | type | volumev3 |
    +-------------+----------------------------------+

    第六步:创建服务v2,v3端点8776

    openstack endpoint create --region RegionOne volumev2 public http://zxw6:8776/v2/%(project_id)s

    openstack endpoint create --region RegionOne volumev2 internal http://zxw6:8776/v2/%(project_id)s

    openstack endpoint create --region RegionOne volumev2 admin http://zxw6:8776/v2/%(project_id)s

    openstack endpoint create --region RegionOne volumev3 public http://zxw6:8776/v3/%(project_id)s

    openstack endpoint create --region RegionOne volumev3 internal http://zxw6:8776/v3/%(project_id)s

    openstack endpoint create --region RegionOne volumev3 admin http://zxw6:8776/v3/%(project_id)s


    第七步:下载cinder服务
    [root@zxw6 ~]# yum install openstack-cinder -y

    第八步:编辑配置文件cinder
    vim /etc/cinder/cinder.conf
    root@zxw6 cinder]# egrep -v '(#|^$)' cinder.conf
    [DEFAULT]
    my_ip = 192.168.126.6
    transport_url = rabbit://openstack:zxw6@zxw6
    auth_strategy = keystone
    [backend]
    [barbican]
    [brcd_fabric_example]
    [cisco_fabric_example]
    [coordination]
    [cors]
    [cors.subdomain]
    [database]
    connection = mysql+pymysql://cinder:zxw6@zxw6/cinder
    [fc-zone-manager]
    [healthcheck]
    [key_manager]
    [keystone_authtoken]
    auth_uri = http://zxw6:5000
    auth_url = http://zxw6:35357
    memcached_servers = zxw6:11211
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    project_name = service
    username = cinder
    password = zxw6
    [matchmaker_redis]
    [oslo_concurrency]
    lock_path = /var/lib/cinder/tmp
    [oslo_messaging_amqp]
    [oslo_messaging_kafka]
    [oslo_messaging_notifications]
    [oslo_messaging_rabbit]
    [oslo_messaging_zmq]
    [oslo_middleware]
    [oslo_policy]
    [oslo_reports]
    [oslo_versionedobjects]
    [profiler]
    [ssl]


    第九步:导入cinder数据库
    [root@zxw6 ~]# su -s /bin/sh -c "cinder-manage db sync" cinder

     

    第十步:编辑nova服务
    [root@zxw6 ~]# vim /etc/nova/nova.conf

    [cinder]
    os_region_name = RegionOne


    第十一步:重启nova-api服务
    [root@zxw6 ~]# systemctl restart openstack-nova-api.service


    第十二步 :启动cinder服务并开机自启
    [root@zxw6 ~]# systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service
    [root@zxw6 ~]# systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service

     

  • 相关阅读:
    android 源码编译 问题 列表
    springboot总结
    设计模式学习笔记
    JWT入门1
    oauth2入门github
    mybatis面试题
    shiro入门
    knife4j swagger API文档
    pahole安装(编译)
    goMySql的逆向工程
  • 原文地址:https://www.cnblogs.com/itzhao/p/11363580.html
Copyright © 2020-2023  润新知