openstack on centos 7.1(Shared File Systems)

1.Install and configure controller node

Prerequisites

mysql -u root -p

CREATE DATABASE manila;

GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'localhost' IDENTIFIED BY 'MANILA_DBPASS'; #Replace MANILA_DBPASS with a suitable password

GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'%' IDENTIFIED BY 'MANILA_DBPASS';

exit;
. admin-openrc

openstack user create --domain default --password-prompt manila

openstack role add --project service --user manila admin

openstack service create --name manila --description "OpenStack Shared File Systems" share

openstack service create --name manilav2 --description "OpenStack Shared File Systems" sharev2

openstack endpoint create --region RegionOne share public http://controller:8786/v1/%\(tenant_id\)s

openstack endpoint create --region RegionOne share internal http://controller:8786/v1/%\(tenant_id\)s

openstack endpoint create --region RegionOne share admin http://controller:8786/v1/%\(tenant_id\)s

openstack endpoint create --region RegionOne sharev2 public http://controller:8786/v2/%\(tenant_id\)s

openstack endpoint create --region RegionOne sharev2 internal http://controller:8786/v2/%\(tenant_id\)s

openstack endpoint create --region RegionOne sharev2 admin http://controller:8786/v2/%\(tenant_id\)s

Install and configure components

yum install openstack-manila python-manilaclient

/etc/manila/manila.conf

[database]
...
connection = mysql+pymysql://manila:MANILA_DBPASS@controller/manila #Replace MANILA_DBPASS with the password you chose for the Share File System database

[DEFAULT]
...
rpc_backend = rabbit
default_share_type = default_share_type
rootwrap_config = /etc/manila/rootwrap.conf
auth_strategy = keystone
my_ip = 10.0.0.11

[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS #Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ

[keystone_authtoken]
...
memcached_servers = controller:11211
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = manila
password = MANILA_PASS

[oslo_concurrency]
...
lock_path = /var/lib/manila/tmp
su -s /bin/sh -c "manila-manage db sync" manila

Finalize installation

systemctl enable openstack-manila-api.service openstack-manila-scheduler.service

systemctl start openstack-manila-api.service openstack-manila-scheduler.service

2.Install and configure a share node

Install and configure components

yum install openstack-manila-share python2-PyMySQL
[database]
...
connection = mysql://manila:MANILA_DBPASS@controller/manila

[DEFAULT]
...
rpc_backend = rabbit
default_share_type = default_share_type
rootwrap_config = /etc/manila/rootwrap.conf
auth_strategy = keystone
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS

[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS

[keystone_authtoken]
...
memcached_servers = controller:11211
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = manila
password = MANILA_PASS

[oslo_concurrency]
...
lock_path = /var/lib/manila/tmp

Configure share server management support options

Shared File Systems Option 1: No driver support for share servers management

yum install lvm2 nfs-utils nfs4-acl-tools portmap

systemctl enable lvm2-lvmetad.service

systemctl start lvm2-lvmetad.service

pvcreate /dev/sdc

vgcreate manila-volumes /dev/sdc

/etc/lvm/lvm.conf

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

Configure components

[DEFAULT]
...
enabled_share_backends = lvm
enabled_share_protocols = NFS,CIFS

[lvm]
share_backend_name = LVM
share_driver = manila.share.drivers.lvm.LVMShareDriver
driver_handles_share_servers = False
lvm_share_volume_group = manila-volumes
lvm_share_export_ip = MANAGEMENT_INTERFACE_IP_ADDRESS #Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network interface on your storage node

Finalize installation

systemctl enable openstack-manila-share.service

systemctl start openstack-manila-share.service

3.Verify operation

. admin-openrc

manila service-list
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值