设为首页 收藏本站
查看: 910|回复: 0

[经验分享] OpenStack 系列之File Share Service(Manila) Install Guide

[复制链接]

尚未签到

发表于 2018-6-1 10:33:40 | 显示全部楼层 |阅读模式
OpenStack  File Share Service(Manila) For Centos

  Introduction:
  Manila is the File Shareservice project for OpenStack. To administer the OpenStack File Share service,it is helpful to understand a number of concepts like share networks, shares,multi-tenancy and back ends that can be configured with Manila. Whenconfiguring the File Share service, it is required to declare at least one backend. Manila can be configured to run in a single-node configuration or acrossmultiple nodes. Manila can be configured to provision shares from one or moreback ends. The OpenStack File Share service allows you to offer file-shareservices to users of an OpenStack installation.
  

  1.Create the database.
mysql -u root -p
CREATE DATABASE manila;
GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'localhost'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'%'IDENTIFIED BY 'password';2.Create users, roles,service and API endpoint.
openstack user create --password-prompt manila
openstack role add --project service --user manila admin
openstack service create --name manila --description"OpenStack Shared Filesystems" share
openstack endpoint create \
  --publicurl http://x.x.x.x:8786/v1/%\(tenant_id\)s \
  --internalurl http://x.x.x.x:8786/v1/%\(tenant_id\)s \
  --adminurl http://x.x.x.x:8786/v1/%\(tenant_id\)s \
  --region RegionOne \
  share3.Install required packages on controller node.openstack-manila-api and openstack-manila-scheduler services will run on thecontroller node.
yum install openstack-manila python-manilapython-manilaclient4.Installed required packages on compute node.openstack-manila-share service will run on the compute node.
yum install openstack-mania-share python-manila  5. Edit the /etc/manila/manila.conf file and api-paste.ini
[DEFAULT]
osapi_share_listen=0.0.0.0
api_paste_config=/etc/manila/api-paste.ini
state_path=/var/lib/manila
glance_host=X.X.X.X
storage_availability_zone=nova
rootwrap_config=/etc/manila/rootwrap.conf
auth_strategy=keystone
enabled_share_backends=backend1
nova_catalog_info=compute:nova:publicURL
nova_catalog_admin_info=compute:nova:adminURL
nova_api_insecure=False
nova_admin_username=nova
nova_admin_password=password
nova_admin_tenant_name=service
nova_admin_auth_url=http://X.X.X.X:5000/v2.0
network_api_class=manila.network.neutron.neutron_network_plugin.NeutronNetworkPlugin
debug=True
verbose=True
log_dir=/var/log/manila
use_syslog=False
rpc_backend=rabbit
control_exchange=openstack
amqp_durable_queues=False
cinder_catalog_info=volume:cinder:publicURL
neutron_api_insecure=False
cinder_admin_username=cinder
neutron_auth_strategy=keystone
cinder_admin_password=password
notification_driver=messaging
neutron_admin_tenant_name=service
cinder_cross_az_attach=True
neutron_url=http://X.X.X.X:9696
cinder_api_insecure=False
cinder_admin_auth_url=http://X.X.X.X:5000/v2.0
cinder_http_retries=3
cinder_admin_tenant_name=service
neutron_admin_password=password
neutron_admin_username=neutron
neutron_admin_auth_url=http://X.X.X.X:5000/v2.0
neutron_url_timeout=30
default_share_type = default
sql_connection = mysql://manila:password@x.x.x.x/manila
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = password
[oslo_concurrency]
lock_path=/var/lock/manila  Warning!!!
  This Manila Share Backend is configure on Manila Share node,So Manila-api and Manila-scheduler not configure.
  

[backend1]
service_network_division_mask=28
volume_name_template=manila-share-%s
service_instance_network_helper_type=neutron
max_time_to_build_instance=300
share_mount_path=/shares
manila_service_keypair_name=manila-service
service_network_name=manila_service_network
interface_driver=manila.network.linux.interface.OVSInterfaceDriver
service_network_cidr=10.254.0.0/16
service_instance_flavor_id=100
service_instance_smb_config_path=$share_mount_path/smb.conf
volume_snapshot_name_template=manila-snapshot-%s
share_backend_name=backend1
smb_template_config_path=$state_path/smb.conf
service_instance_name_template=manila_service_instance_%s
driver_handles_share_servers = True
service_instance_user = manila
service_instance_password=manila
service_image_name = manila-service-image
path_to_private_key = /root/.ssh/id_rsa
path_to_public_key = /root/.ssh/id_rsa.pub
share_backend_name = GENERIC1
share_driver = manila.share.drivers.generic.GenericShareDriver
share_helpers=CIFS=manila.share.drivers.generic.CIFSHelper,NFS=manila.share.drivers.generic.NFSHelper
share_volume_fstype=ext4
max_time_to_attach=120
service_instance_security_group=manila-service
connect_share_server_to_tenant_network=False
Replace /etc/manila/api-paste.ini,Configure Keystone authtoken.
service_protocol = http
service_host = X.X.X.X
service_port = 5000
auth_host = X.X.X.X
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = manila
admin_password = password
signing_dir = /var/lib/manila
auth_uri=http://X.X.X.X:5000/  

  

  6.Populate the Manila Database.
su -s /bin/sh -c "manila-manage db sync" manila7.Start and enable manila services.
systemctl start openstack-manila-api
systemctl start openstack-manila-scheduler
systemctl enable openstack-manila-api
systemctl enable openstack-manila-scheduler
systemctl start openstack-manila-share
systemctl enable openstack-manila-share  8.Upload manila service imageto glance.
wget https://github.com/uglide/manila-image-elements/releases/download/0.1.0/manila-service-image.qcow2
glance image-create --name "manila-service-image-new" --file manila-service-image.qcow2 --disk-format qcow2 --container-format bare --visibility public --progress  9.Create default share type.
manila type-create default True  10. Create Manila flavor type.
nova flavor-create manila-service-flavor 100 128 0 1  11. Create nova for manila Security Group.
nova secgroup-create manila-service 'manila-service description'
nova secgroup-add-rule manila-service icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule manila-service tcp 22 22 0.0.0.0/0
nova secgroup-add-rule manila-service tcp 2049 2049 0.0.0.0/0
nova secgroup-add-rule manila-service udp 2049 2049 0.0.0.0/0
nova secgroup-add-rule manila-service udp 445 445 0.0.0.0/0
nova secgroup-add-rule manila-service tcp 445 445 0.0.0.0/0
nova secgroup-add-rule manila-service tcp 137 139 0.0.0.0/0
nova secgroup-add-rule manila-service udp 137 139 0.0.0.0/0  12. Create share network.
manila share-network-create --name devinshare --neutron-net-id XXXXXXX --neutron-subnet-id XXXXXXX  13. Create NFS share.
manila create NFS 1 --name devin --share-network devinshare  14. Configure Manila access.
manila access-allow devin ip XXX(instance_ip) --access-level rw  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-497480-1-1.html 上篇帖子: 如何开启OpenStack社区贡献之路 下篇帖子: openstack(一)入门
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表