dashboard必备的是nova neutron glance keystone其他的服务可以先安装,但是不能提前注册,

否则dashboard打不开,比如cinder提前注册了,dashboard启动后看到cinder注册的东西了,

就会连接cinder,但是cinder你还没配置好,所以dashboard就无法启动了。

herizon只需要连接到keystone就行了,herizion登录也是用的keystone认证的用户

安装:

yum install openstack-dashboard -y

配置:

vim /etc/openstack-dashboard/local_settings

29 ALLOWED_HOSTS = ['*',]                       #允许哪些主机连接

103 SECRET_KEY='30110465420bb59687ce'           #默认的没有修改

108 CACHES = {                                 #memcache缓存的配置

109     'default': {

110         'BACKEND': 'django.core.cache. backends.memcached. MemcachedCache',

111         'LOCATION': '192.168.56.11:11211',

112     }

113 }

138 OPENSTACK_HOST = "192.168.56.11"           #keystone主机所在位置

140 OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"  #使用keystone默认哪个角色

320 TIME_ZONE = "Asia/Shanghai"                 #时区设置

重启httpd服务

systemctl restart httpd

使用demo用户demo密码登录

遇到的故障:dashboard无法启动,现象:重启httpd后,把keystone服务挤掉,注释掉/etc/httpd/conf.d/openstack-dashboard.conf 之后

再次启动httpd服务,keystone恢复正常

最后解决:把keystone安装在另外一台机器上就可以了,(注意修改连接memcache和keystone的主机IP)

1块存储:硬盘 LVS DAS(直连式存储)SAN存储(FC-SAN IP-SAN)

2文件存储: NFS nas

3对象存储:分布式存储(ceph PB级)

分布式存储:ceph

cinder:提供云硬盘,云硬盘的瓶颈为网络

组件介绍:

cinder-api:接受API请求并将请求路由到 cinder-volume 来执行。 (作用类似nova-api的)

cinder-volume:响应请求,读取或写向块存储数据库为维护状态,通过信息队列机制与其他进程交互,

或直接与上层块存储提供的硬件或软件进行交互。通过驱动结构,他可以与众多的存储提供者进行交互。

可以有多个。(作用类似nova-compute)

cinder-scheduler:守护进程,为存储卷的实例选取最优的块存储供应节点。(类似于nova-scheduler)

基于三个组件的作用划分,通常我们将

cinder-api和cinder-shceduler 安装在控制节点上,

把  cinder-volume安装在存储节点上。(本次实验安装在计算节点的一块单独的硬盘上)

控制节点上:

yum install openstack-cinder python-cinderclient -y

[root@linux-node1 ~]# yum install openstack-cinder python-cinderclient -y

[root@linux-node1 ~]# vim /etc/cinder/cinder.conf

2516 connection = mysql://cinder:cinder@192.168.56.11/cinder

同步数据库:

[root@linux-node1 ~]# su -s /bin/sh -c "cinder-manage db sync" cinder

确认是否同步成功

[root@linux-node1 ~]# mysql -ucinder -pcinder -h 192.168.56.11 -e "use cinder;show tables;"

+----------------------------+

| Tables_in_cinder           |

+----------------------------+

| backups                    |

| cgsnapshots                |

| consistencygroups          |

| driver_initiator_data      |

| encryption                 |

| p_w_picpath_volume_cache_entries |

| iscsi_targets              |

| migrate_version            |

| quality_of_service_specs   |

| quota_classes              |

| quota_usages               |

| quotas                     |

| reservations               |

| services                   |

| snapshot_metadata          |

| snapshots                  |

| transfers                  |

| volume_admin_metadata      |

| volume_p_w_upload          |

| volume_glance_metadata     |

| volume_metadata            |

| volume_type_extra_specs    |

| volume_type_projects       |

| volume_types               |

| volumes                    |

+----------------------------+

[root@linux-node1 ~]# openstack user create --domain default --password-prompt cinder

User Password:cinder

Repeat User Password:cinder

+-----------+----------------------------------+

| Field     | Value                            |

+-----------+----------------------------------+

| domain_id | default                          |

| enabled   | True                             |

| id        | b47cb3f352b0462fb2939fc5b536a1a2 |

| name      | cinder                           |

+-----------+----------------------------------+

[root@linux-node1 ~]# openstack role add --project service --user cinder admin

[root@linux-node1 ~]# vim /etc/cinder/cinder.conf

2294 rpc_backend = rabbit

2640 [keystone_authtoken]

2643 auth_plugin = password

2644 project_domain_id = default

2645 user_domain_id = default

2646 project_name = service

2647 username = cinder

2648 password = cinder

[root@linux-node1 ~]# systemctl restart openstack-nova-api.service

[root@linux-node1 ~]# systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service

Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-cinder-api.service to /usr/lib/systemd/system/openstack-cinder-api.service.

Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-cinder-scheduler.service to /usr/lib/systemd/system/openstack-cinder-scheduler.service.

[root@linux-node1 ~]# systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service

创建服务:

[root@linux-node1 ~]# openstack service create --name cinder \

>   --description "OpenStack Block Storage" volume

+-------------+----------------------------------+

| Field       | Value                            |

+-------------+----------------------------------+

| description | OpenStack Block Storage          |

| enabled     | True                             |

| id          | b069f3ddf10849729a7e24ba9598b16e |

| name        | cinder                           |

| type        | volume                           |

+-------------+----------------------------------+

[root@linux-node1 ~]# openstack service create --name cinderv2 \

>   --description "OpenStack Block Storage" volumev2

+-------------+----------------------------------+

| Field       | Value                            |

+-------------+----------------------------------+

| description | OpenStack Block Storage          |

| enabled     | True                             |

| id          | f54356c5dfad4d6db666a1e0361e19cd |

| name        | cinderv2                         |

| type        | volumev2                         |

+-------------+----------------------------------+

[root@linux-node1 ~]# openstack endpoint create --region RegionOne \

>   volume public http://192.168.56.11:8776/v1/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | 16c0b5acb8f4471ea2b81a3a34c8c337           |

| interface    | public                                     |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | b069f3ddf10849729a7e24ba9598b16e           |

| service_name | cinder                                     |

| service_type | volume                                     |

+--------------+--------------------------------------------+

[root@linux-node1 ~]# openstack endpoint create --region RegionOne \

>   volume internal http://192.168.56.11:8776/v1/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | 9e07046c6464478391c3c741529194e8           |

| interface    | internal                                   |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | b069f3ddf10849729a7e24ba9598b16e           |

| service_name | cinder                                     |

| service_type | volume                                     |

+--------------+--------------------------------------------+

[root@linux-node1 ~]#  openstack endpoint create --region RegionOne \

>   volume admin http://192.168.56.11:8776/v1/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | d7c455a939fc4b0d975ab2ba7745f397           |

| interface    | admin                                      |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | b069f3ddf10849729a7e24ba9598b16e           |

| service_name | cinder                                     |

| service_type | volume                                     |

+--------------+--------------------------------------------+

[root@linux-node1 ~]# openstack endpoint create --region RegionOne \

>   volumev2 public http://192.168.56.11:8776/v2/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | 534741eb6c2040679f1638d14f7907cb           |

| interface    | public                                     |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | f54356c5dfad4d6db666a1e0361e19cd           |

| service_name | cinderv2                                   |

| service_type | volumev2                                   |

+--------------+--------------------------------------------+

[root@linux-node1 ~]# openstack endpoint create --region RegionOne \

>   volumev2 internal http://192.168.56.11:8776/v2/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | bf6f8b54a999495e8e912f8722b03081           |

| interface    | internal                                   |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | f54356c5dfad4d6db666a1e0361e19cd           |

| service_name | cinderv2                                   |

| service_type | volumev2                                   |

+--------------+--------------------------------------------+

[root@linux-node1 ~]# openstack endpoint create --region RegionOne \

>   volumev2 admin http://192.168.56.11:8776/v2/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | d5d8c3b07f77441980a39d961bef6ad7           |

| interface    | admin                                      |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | f54356c5dfad4d6db666a1e0361e19cd           |

| service_name | cinderv2                                   |

| service_type | volumev2                                   |

+--------------+--------------------------------------------+

[root@linux-node1 ~]# grep -vnE "^#|^$" /etc/cinder/cinder.conf

1:[DEFAULT]

421:glance_host = 192.168.56.11

536:auth_strategy = keystone

2294:rpc_backend = rabbit

2371:[BRCD_FABRIC_EXAMPLE]

2404:[CISCO_FABRIC_EXAMPLE]

2437:[cors]

2465:[cors.subdomain]

2493:[database]

2516:connection = mysql://cinder:cinder@192.168.56.11/cinder

2593:[fc-zone-manager]

2621:[keymgr]

2640:[keystone_authtoken]

2643:auth_plugin = password

2644:project_domain_id = default

2645:user_domain_id = default

2646:project_name = service

2647:username = cinder

2648:password = cinder

2811:[matchmaker_redis]

2840:[matchmaker_ring]

2859:[oslo_concurrency]

2874:lock_path = /var/lib/cinder/tmp

2877:[oslo_messaging_amqp]

2976:[oslo_messaging_qpid]

3119:[oslo_messaging_rabbit]

3173:rabbit_host = 192.168.56.11

3177:rabbit_port = 5672

3189:rabbit_userid = openstack

3193:rabbit_password = openstack

3348:[oslo_middleware]

3369:[oslo_policy]

3394:[oslo_reports]

3404:[profiler]

存储节点:

添加一块50G的硬盘

Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x000bbf7d

Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     2099199     1048576   83  Linux

/dev/sda2         2099200    35653631    16777216   82  Linux swap / Solaris

/dev/sda3        35653632    62914559    13630464   83  Linux

[root@linux-node2 ~]# vim /etc/lvm/lvm.confdevices {

...

filter = [ "a/sdb/", "r/.*/"]

[root@linux-node2 ~]# pvcreate /dev/sdb

Physical volume "/dev/sdb" successfully created

[root@linux-node2 ~]# vgcreate cinder-volumes /dev/sdb

Volume group "cinder-volumes" successfully created

[root@linux-node2 ~]# yum install openstack-cinder targetcli python-oslo-policy

[root@linux-node1 ~]# scp /etc/cinder/cinder.conf root@192.168.56.12:/etc/cinder/cinder.conf

[root@linux-node2 ~]# grep -vnE "^#|^$" /etc/cinder/cinder.conf

1:[DEFAULT]

421:glance_host = 192.168.56.11

536:auth_strategy = keystone

540:enabled_backends = lvm

2294:rpc_backend = rabbit

2371:[BRCD_FABRIC_EXAMPLE]

2404:[CISCO_FABRIC_EXAMPLE]

2437:[cors]

2465:[cors.subdomain]

2493:[database]

2516:connection = mysql://cinder:cinder@192.168.56.11/cinder

2593:[fc-zone-manager]

2621:[keymgr]

2640:[keystone_authtoken]

2643:auth_plugin = password

2644:project_domain_id = default

2645:user_domain_id = default

2646:project_name = service

2647:username = cinder

2648:password = cinder

2811:[matchmaker_redis]

2840:[matchmaker_ring]

2859:[oslo_concurrency]

2874:lock_path = /var/lib/cinder/tmp

2877:[oslo_messaging_amqp]

2976:[oslo_messaging_qpid]

3119:[oslo_messaging_rabbit]

3173:rabbit_host = 192.168.56.11

3177:rabbit_port = 5672

3189:rabbit_userid = openstack

3193:rabbit_password = openstack

3348:[oslo_middleware]

3369:[oslo_policy]

3394:[oslo_reports]

3404:[profiler]

3414:[lvm]

3415:volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver

3416:volume_group = cinder-volumes

3417:iscsi_protocol = iscsi

3418:iscsi_helper = lioadm

[root@linux-node2 ~]# systemctl enable openstack-cinder-volume.service target.service

Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-cinder-volume.service to /usr/lib/systemd/system/openstack-cinder-volume.service.

Created symlink from /etc/systemd/system/multi-user.target.wants/target.service to /usr/lib/systemd/system/target.service.

[root@linux-node2 ~]# systemctl start openstack-cinder-volume.service target.service

Linux中cinder的作用,openstack之dashboard与cinder(一)相关推荐

  1. Linux中常用目录作用

    Linux中常用目录作用 1.可以在家目录root或home,以及temp目录下随便放东西. 2.根目录下的bin和sbin,usr目录下的bin和sbin,这四个目录都是用来保存系统命令的.其中,普 ...

  2. linux中ftok的作用,Unix/Linux编程之ftok函数用法

    linux 中ftok函数的用法 1.函数作用: 系统建立IPC通讯(如消息队列.共享内存时)必须指定一个ID值.通常情况下,该id值通过ftok函数得到 2.函数原型: #include #incl ...

  3. linux中感叹号的作用,感叹号在Linux bash中使用技巧

    1. 重复执行上一条指令  !! [root@iZ23t6nzr7dZ python]# ls /usr/local/ aegis bin etc games include lib lib64 li ...

  4. Linux中写入union作用,Linux进程描述符中union的用法

    首先,它是 union thread_union { struct thread_info thread_info; unsigned long stack[THREAD_SIZE/sizeof(lo ...

  5. linux中感叹号的作用,Linux - 感叹号

    在Linux命令行下令人惊叹的惊叹号(!) ! 符号在 Linux 中不但可以用作否定符号,还可以用来从历史命令记录中取出命令或不加修改的执行之前运行的命令.下面的所有命令都已经在 Bash Shel ...

  6. Linux中mv的作用是,linux中的mv命令的详细解释

    linxu下的mv命令是一个常用命令,可以为文件或者目录重命名,下面由秋天网 Qiutian.ZqNF.Com小编为大家整理了linux的mv命令的详细解释的相关知识,希望对大家有帮助! 一.linu ...

  7. 【彻底弄懂】linux中pthread_detach()的作用

    文章目录 linux中pthread_detach()解析 linux中pthread_detach()解析 使用pthread_create创建的线程有两种状态:joinable和unjoinabl ...

  8. linux中profile文件作用,解析Linux系统中bashrc和profile文件的作用区别

    使用终端ssh登录Linux操作系统的控制台后,会出现一个提示符号(例如:#或~),在这个提示符号之后可以输入命令,Linux根据输入的命令会做回应,这一连串的动作是由一个所谓的Shell来做处理. ...

  9. Linux中kobject的作用,Linux设备驱动模型-- 数据结构Kset/KObject

    前言 Kset和kobject是Linux设备驱动模型中的核心数据结构,其主要作用是将系统中的设备抽象出来,以树状结构组织,方便系统统一管理. 而这个统一管理的地方,就是sysfs,先放一张示例图,阐 ...

最新文章

  1. 专为SaaS而生的PaaS平台!
  2. python3 语法再学习
  3. 中国丝绸市场投资规划及未来发展前景展望报告2022-2028年
  4. CTF- Reverse迷宫题类型方法特征讲解
  5. [读书笔记]鸟哥的LINUX私房菜 十三章 shell scripts
  6. 07.full text query_string查询
  7. apache poi excel显示 base64 图片_数据处理之带图片Excel数据处理解惑
  8. 将iso镜像包设置成yum源_Centos7 Nginx搭建局域网yum仓库详细步骤,转发
  9. 【网页素材】数据图表界面设计UI设计PSD模板
  10. 2019年,有远见的程序员都在关注这些硬核公众号
  11. ScrollView详解
  12. Angular 在洋葱圈的实践与思考
  13. 10.Linux 高性能服务器编程 --- 信号
  14. 从零基础入门Tensorflow2.0 ----一、3.3 实战深度神经网络(激活函数)
  15. 有什么电脑软件可以测试网速,电脑怎么测试网速(测网速大全)
  16. Vs2008调试慢的问题
  17. A Self-paced Multiple-instance Learning Framework for Co-saliency Detection文章阅读
  18. soul-网关实战(一)学习路线
  19. bugku ctf 各种绕过 (各种绕过哟)
  20. 【java基础】吐血总结Stream流操作

热门文章

  1. 什么是Gradle?
  2. Activiti6自学之路(九)——请假申请和请假审批数据库表设计
  3. Spring Boot 全局懒加载
  4. 手机能连接WiFi,但就是无法使用,这是怎么回事?
  5. 安卓防盗软件_开学 | 开学季手机防盗
  6. linux——Mplayer
  7. 【精品】Intellij中Emmet插件的使用技巧
  8. 程序员给女友4千生活费,收到女友错发信息后分手,神对话!
  9. 安装elementui
  10. 1103: 平均学分绩点(函数专题)C语言