Manila Newton Source Installation

Source: Internet
Author: User
Tags aliyun

First, prepare the environment

1. Pre-installed software

Yum insall epel-release-yyum install python-virtualenv git screen-y

2. Edit/etc/pip.conf

[Global]index-url = http://mirrors.aliyun.com/pypi/simple/[install]trusted-host=mirrors.aliyun.com

3. Create user

Useradd-m mcat/etc/sudoers.d/m defaults:m!requirettym all= (All) Nopasswd:all

4. Initial environment

Su-mvirtualenv ven_msource ven_m/bin/activatepip Install pip--upgrade# Synchronizing the database will provide a missing module Pymysql,python-memcachedpip Install Pymysqlpip Install python-memcached


5. Create a database

MYSQL-HMARIADB_HOST-UROOT-P CREATE DATABASE Manila; GRANT all privileges the manila.* to ' Manila ' @ ' percent ' identified by ' 123456 ';

6, create the Manila User,endpoint

# useropenstack user create --password 123456 manilaopenstack role add  --project service --user manila admin# serviceopenstack service  create --name manila   --description  "openstack shared file  Systems " shareopenstack service create --name manilav2   --description   "Openstack shared file systems"  sharev2# endpointopenstack endpoint  Create --region regionone   share public http://192.168.1.200:8786/v1/%\ ( tenant_id\) sopenstack endpoint create --region regionone   share  Internal http://192.168.1.200:8786/v1/%\ (tenant_id\) sopenstack endpoint create --region  regionone   share admin http://192.168.1.200:8786/v1/%\ (tenant_id\) sopenstack  endpoint create --region regionone   sharev2 public http://192.168.1.200:8786/v2/%\ (tenant_id\) sopenstack endpoint create --region regionone   sharev2 internal  Http://192.168.1.200:8786/v2/%\ (tenant_id\) Sopenstack endpoint create --region regionone    sharev2 admin http://192.168.1.200:8786/v2/%\ (tenant_id\) s

7. Download and install Manila

git clone https://github.com/openstack/manila.gitcd manilagit checkout Stable/newtonpip install-r Requirements.txtpython setup.py Install

8. Prepare the configuration file

Mkdir-p ~/log/manilamkdir-p/etc/manilamkdir-p ~/var/lib/manila/tmpcp-r%git_dir%/manila/etc/manila/{api-paste.ini , policy.json,rootwrap.conf,rootwrap.d/}/etc/manila/# generate Manila.confpip install Toxyum install POSTGRESQL-DEVELTOX-E g Enconfigyum Remove postgresql-devel-y && yum autoremove-ycp%git_dir%/etc/manila/manila.conf.sample/etc/ manila/manila.conf# default generated configuration file sed/^#/d/etc/manila/manila.conf | Sed/^$/d[default][cinder][cors][cors.subdomain][database][keystone_authtoken][matchmaker_redis][neutron][nova] [Oslo_concurrency] [OSLO_MESSAGING_AMQP] [Oslo_messaging_notifications] [Oslo_messaging_rabbit] [OSLO_MESSAGING_ZMQ] [Oslo_middleware] [Oslo_policy]

Second, configure the Manila control node

1. Edit/etc/manila/manila.conf

[default]transport_url = rabbit://openstack:[email protected]default_share_type =  default_share_typeshare_name_template = share-%srootwrap_config = /etc/manila/ Rootwrap.confapi_paste_config = /etc/manila/api-paste.iniauth_strategy = keystonemy_ip  = 192.168.1.200# log_file = manila.loglog_dir = /home/m/log/manila[ keystone_authtoken]memcached_servers = 192.168.1.200:11211auth_uri = http:// 192.168.1.200:5000auth_url = http://192.168.1.200:35357auth_type = passwordproject_domain_ id = defaultuser_domain_id = defaultproject_name = serviceusername =  manilapassword = 123456[database]connection = mysql+pymysql://manila:[email protected ]/manila[oslo_concurrency]# lock_path = /var/lock/manila# lock_path = /var/lib/ Manila/tmplock_path = /home/m/var/lib/maniLa/tmp 

2. Synchronizing the database

Manila-manage db Sync

Third, configure the shared node, non-share server mode

1. Installation dependent

Yum Install lvm2 nfs-utils nfs4-acl-tools

2. Create VG

Pvcreate/dev/sdavgcreate MANILA-VOLUMES/DEV/SDA

3. Edit the Manila-share configuration file

CP manila.conf manila-shared.conf# Edit manila-share.conf, add the following configuration on the manila.conf already configured [default]...enabled_share_ backends = Lvmenabled_share_protocols = Nfs[lvm]share_backend_name = Lvmshare_driver = Manila.share.drivers.lvm.LVMShareDriverdriver_handles_share_servers = Falselvm_share_volume_group = MANILA-VOLUMESLVM_SHARE_EXPORT_IP = 192.168.1.200

4. Copy command

sudo cp/home/m/ven_m/bin/manila-rootwrap/usr/bin/

5. Configuring NFS

Systemctl enable Rpcbindsystemctl enable Nfs-serverln-s/usr/lib/systemd/system/nfs-server.service/usr/lib/systemd/ System/nfs-kernel-server.servicesystemctl daemon-reloadsystemctl Status Nfs-kernel-servermkdir-p/var/lib/ Manilachown m:m/var/lib/manila

6. Start Servie

Screen-s manila-api manila-api--config-file/etc/manila/manila.conf screen-s manila-scheduler manila-scheduler--c onfig-file/etc/manila/manila.conf screen-s manila-share Manila-share--config-file/etc/manila/manila-share.conf

7. Using Manila

Manila type-create default_share_type Falsemanila Create NFS 2--name Share1manila Access-allow Cdd7590f-b11a-4bc7-a5c1-78fccc936fe9 IP 192.168.1.16

Iv. Configuring shared nodes, Share server mode

1. Edit the Manila-share configuration file and add the following configuration on the configured manila.conf

[Default]...enabled_share_backends = genericenabled_share_protocols = nfs[neutron]url  = http://192.168.1.200:9696auth_uri = http://192.168.1.200:5000auth_url = http ://192.168.1.200:35357memcached_servers = 192.168.1.200:11211auth_type = passwordproject_ Domain_name = defaultuser_domain_name = defaultregion_name = regiononeproject_ name = serviceusername = neutronpassword = neutron_pass[nova]auth_uri =  http://192.168.1.200:5000auth_url = http://192.168.1.200:35357memcached_servers =  192.168.1.200:11211auth_type = passwordproject_domain_name = defaultuser_domain_name  = defaultregion_name = regiononeproject_name = serviceusername =  novapassword = nova_pass[cinder]auth_uri = http://192.168.1.200:5000auth_url =  Http://192.168.1.200:35357memcached_servers = 192.168.1.200:11211auth_type = passwordproject_domain_name =  defaultuser_domain_name = defaultregion_name = regiononeproject_name =  serviceusername = cinderpassword = cinder_pass[generic]share_driver =  manila.share.drivers.generic.genericsharedriverinterface_driver =  Manila.network.linux.interface.ovsinterfacedriverdriver_handles_share_servers = trueservice_instance _flavor_id = 6#service_instance_password = manilaservice_instance_user =  Centosservice_image_name = manila-service-image#service_image_name = centosshare_backend_ name = genericpath_to_private_key = /etc/manila/ssh/id_rsapath_to_public_key = / Etc/manila/ssh/id_rsa.pub

2. Download and upload MySQL image

wget soure admin-rc.shglance image-create--name "manila-service-image"--disk-format qcow2--container-for Mat Bare--file manila-service-image-master.qcow2--progress

3. Generate SSH Key

Ssh-keygenmkdir-p/etc/manila/sshcp-r. ssh/{id_rsa,id_rsa.pub}/etc/manila/sshchmod +r/etc/manila/ssh/id_rsa*

4. Start Servie

Screen-s manila-api manila-api--config-file/etc/manila/manila.conf screen-s manila-scheduler manila-scheduler--c onfig-file/etc/manila/manila.conf screen-s manila-share Manila-share--config-file/etc/manila/manila-share.conf

5. Using Manila

Soure Admin-rc.shmanila type-create default_share_type truesoure Demo-rc.shneutron Net-listmanila Share-network-create--name demo-share-network1--neutron-net-id private_network_id--neutron-subnet-id PRIVATE_ Network_subnet_idmanila Create NFS 1--name demo-share1--share-network Demo-share-network1manila access-allow Demo-share1 IP instance_ip




This article is from the "Wuling Grassland" blog, please make sure to keep this source http://penguintux.blog.51cto.com/3021117/1882151

Manila Newton Source Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.