Jump to: navigation, search

Difference between revisions of "Obsolete:Manila/ManilaDevstack"

 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Requirements==
 
  
The requirements are to have a VM running Ubuntu 14.04 and password-less sudo privileges if you do not want to be prompted for passwords.
+
==Warning==
 +
<big>The information on this page is old and possibly obsolete. Please refer to the documentation maintained here: https://docs.openstack.org/manila/latest/contributor/index.html
 +
</big>
  
==Steps==
 
  
# Copy the script to the home directory of the VM.
+
== Steps ==
#Run the script.
 
#Run stack.sh from the ~/devstack directory when the script completes.
 
  
== Script ==
+
#Clone Devstack to the home directory of the VM
Copy and paste this script on your devstack host to configure the machine and devstack for manila.
+
#Enable Manila in local.conf file
 +
#Run stack.sh from the ~/devstack directory
  
# A script to setup manila devstack on Ubuntu 14.04
+
=== Kilo ===
sudo apt-get -y install git git-review python-pip python-setuptools python-dev libxslt-dev libmysqlclient-dev libpq-dev nfs-common screen
+
 
sudo apt-get -y update
+
Clone Devstack to your home directory
sudo apt-get -y upgrade
+
    git clone git://github.com/openstack-dev/devstack.git<br />
git clone git://github.com/openstack/manila.git
+
Create stack user by running
git clone git://github.com/openstack-dev/devstack.git
+
    sudo devstack/tools/create-stack-user.sh
cd devstack
+
Change stack user password if needed
 +
    sudo passwd stack
 +
Login as stack<br />
 +
    su - stack
 +
You should have ~/devstack
 +
    cd ~/devstack
 +
Copy samples/local.conf to the upper level and and add the following to the file (enable manila, and neutron, and to disable horizon and nova-network)
 +
  $ cat << EOF >> local.conf
 
   
 
   
cat << __EOF__ > local.conf
+
    disable_service horizon
<nowiki>[[local|localrc]]</nowiki>
+
    disable_service n-net
ADMIN_PASSWORD=nova
 
DATABASE_PASSWORD=nova
 
RABBIT_PASSWORD=nova
 
SERVICE_PASSWORD=nova
 
SERVICE_TOKEN=nova
 
GUEST_PASSWORD=nova
 
MYSQL_HOST=127.0.0.1
 
MYSQL_USER=root
 
MYSQL_PASSWORD=nova
 
RABBIT_HOST=127.0.0.1
 
LIBVIRT_TYPE=qemu
 
GLANCE_HOSTPORT=127.0.0.1:9292
 
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
 
SWIFT_REPLICAS=1
 
SWIFT_DATA_DIR=\$DEST/data/swift
 
LOGDAYS=1
 
LOGFILE=\$DEST/devstack.log
 
SCREEN_LOGDIR=\$DEST/logs/screen
 
RECLONE=yes
 
API_RATE_LIMIT=False
 
 
   
 
   
disable_service horizon
+
    enable_service neutron
disable_service heat
+
    enable_service q-svc
disable_service h-eng
+
    enable_service q-agt
disable_service h-api
+
    enable_service q-dhcp
disable_service h-api-cfn
+
    enable_service q-l3
disable_service h-api-cw
+
    enable_service q-meta
disable_service n-net
+
 
enable_service neutron
+
    enable_plugin manila https://github.com/openstack/manila
enable_service q-svc
+
   
enable_service q-agt
+
    Q_PLUGIN=ml2
enable_service q-dhcp
+
    ENABLE_TENANT_VLANS=True
enable_service q-l3
+
    ML2_VLAN_RANGES=physnet1:100:200
enable_service q-meta
+
    PHYSICAL_NETWORK=physnet1
enable_service tempest
+
    OVS_PHYSICAL_BRIDGE=br-eth1
enable_plugin manila https://github.com/openstack/manila
+
    Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch
  Q_PLUGIN=ml2
+
    Q_ML2_PLUGIN_TYPE_DRIVERS=vlan,vxlan
ENABLE_TENANT_VLANS=True
+
    EOF
ML2_VLAN_RANGES=physnet1:100:200
 
PHYSICAL_NETWORK=physnet1
 
OVS_PHYSICAL_BRIDGE=br-eth1
 
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch
 
Q_ML2_PLUGIN_TYPE_DRIVERS=vlan,vxlan
 
SHARE_BACKING_FILE_SIZE=22G
 
__EOF__
 
  
 +
=== Master ===
  
==Ubuntu-16.04.1-server-amd64, Tested on Nov 11-23-2016==
+
==== Ubuntu-16.04.1-server-amd64, Tested on Nov 11-23-2016 ====
 
+
Clone Devstack to your home directory
git clone git://github.com/openstack-dev/devstack.git<br />
+
    git clone git://github.com/openstack-dev/devstack.git<br />
 
Create stack user by running
 
Create stack user by running
 
     sudo devstack/tools/create-stack-user.sh
 
     sudo devstack/tools/create-stack-user.sh
Line 77: Line 57:
 
     sudo passwd stack
 
     sudo passwd stack
 
Login as stack<br />
 
Login as stack<br />
     git clone git://github.com/openstack-dev/devstack.git
+
     su - stack
You should have /opt/stack/devstack
+
You should have ~/devstack
     cd to devstack
+
     cd ~/devstack
vi local.conf and add the following to the file
+
Copy samples/local.conf to the upper level and and add the following to the file (enables manila)
 
     enable_plugin manila https://github.com/openstack/manila
 
     enable_plugin manila https://github.com/openstack/manila
 
run ./stack.sh<br />
 
run ./stack.sh<br />
 
Once stack is up, you can verify by
 
Once stack is up, you can verify by
 
     manila service-list
 
     manila service-list
 +
 +
== Troubleshooting ==
 +
 +
As of 11/30/2016, ssh login to share VM is broken https://bugs.launchpad.net/manila/+bug/1646135
 +
 +
Workaroundː
 +
edit the /etc/manila/manila.conf and add the following in [generic1] section
 +
    service_instance_password = manila
 +
and comment following lines
 +
    #path_to_private_key = /home/manila/.ssh/id_rsa
 +
    #path_to_public_key = /home/manila/.ssh/id_rsa.pub
 +
 +
Test
 +
    neutron net-list
 +
    neutron subnet-list
 +
    manila share-network-create --neutron-net-id <PRIVATE_NET_ID> --neutron-subnet-id <PRIVATE_SUBNET_ID> --name manila_share
 +
    manila share-network-list
 +
    manila create --name devstack_share --share-network <SHARE_NET_ID> NFS 1
 +
    manila list

Latest revision as of 23:27, 25 January 2019

Warning

The information on this page is old and possibly obsolete. Please refer to the documentation maintained here: https://docs.openstack.org/manila/latest/contributor/index.html


Steps

  1. Clone Devstack to the home directory of the VM
  2. Enable Manila in local.conf file
  3. Run stack.sh from the ~/devstack directory

Kilo

Clone Devstack to your home directory

   git clone git://github.com/openstack-dev/devstack.git

Create stack user by running

   sudo devstack/tools/create-stack-user.sh

Change stack user password if needed

   sudo passwd stack

Login as stack

   su - stack

You should have ~/devstack

   cd ~/devstack

Copy samples/local.conf to the upper level and and add the following to the file (enable manila, and neutron, and to disable horizon and nova-network)

  $ cat << EOF >> local.conf

   disable_service horizon
   disable_service n-net

   enable_service neutron
   enable_service q-svc
   enable_service q-agt
   enable_service q-dhcp
   enable_service q-l3
   enable_service q-meta
 
   enable_plugin manila https://github.com/openstack/manila

   Q_PLUGIN=ml2
   ENABLE_TENANT_VLANS=True
   ML2_VLAN_RANGES=physnet1:100:200
   PHYSICAL_NETWORK=physnet1
   OVS_PHYSICAL_BRIDGE=br-eth1
   Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch
   Q_ML2_PLUGIN_TYPE_DRIVERS=vlan,vxlan
   EOF

Master

Ubuntu-16.04.1-server-amd64, Tested on Nov 11-23-2016

Clone Devstack to your home directory

   git clone git://github.com/openstack-dev/devstack.git

Create stack user by running

   sudo devstack/tools/create-stack-user.sh

Change stack user password if needed

   sudo passwd stack

Login as stack

   su - stack

You should have ~/devstack

   cd ~/devstack

Copy samples/local.conf to the upper level and and add the following to the file (enables manila)

   enable_plugin manila https://github.com/openstack/manila

run ./stack.sh
Once stack is up, you can verify by

   manila service-list

Troubleshooting

As of 11/30/2016, ssh login to share VM is broken https://bugs.launchpad.net/manila/+bug/1646135

Workaroundː edit the /etc/manila/manila.conf and add the following in [generic1] section

   service_instance_password = manila

and comment following lines

   #path_to_private_key = /home/manila/.ssh/id_rsa
   #path_to_public_key = /home/manila/.ssh/id_rsa.pub

Test

   neutron net-list
   neutron subnet-list
   manila share-network-create --neutron-net-id <PRIVATE_NET_ID> --neutron-subnet-id <PRIVATE_SUBNET_ID> --name manila_share
   manila share-network-list
   manila create --name devstack_share --share-network <SHARE_NET_ID> NFS 1
   manila list