INSTRUCTIONS TO PROVISION OPENSTACK

MANILA AND CINDER (MITAKA-BASED) USING

NETAPP CLUSTERED DATA ONTAP (CDOT),

PACKSTACK, AND RDO

 

Akshai Parthasarathy

Technical Marketing Engineer, Cloud Solutions

Data Fabric Group

NetApp

akshai@netapp.com


 

Table of Contents

Architecture   3

Setup Clustered Data ONTAP (CDOT)  5

OpenStack Server Configuration   7

Networking Pre-Configuration   7

Install OpenStack Liberty Using Script   10

Setup Neutron Networking   11

Setup Security Group, Glance, Key-Pair, and Ubuntu Instance/VM     12

Setup Manila and Create a Share   14

Login to the Ubuntu Instance and Mount the Share   16

Setup Cinder and Create a Volume   18

Login to the Ubuntu Instance and Use the Cinder Volume   21

Troubleshooting   22

Acknowledgments   24

 


 

Instructions to Provision OpenStack Manila (Mitaka-based) Using NetApp Clustered Data ONTAP (cDOT), PackStack, and RDO

The following instructions setup OpenStack Manila and Cinder (Mitaka-based) using PackStack and RDO. RDO is a community of people using and deploying OpenStack on CentOS, Fedora, and Red Hat Enterprise Linux. These instructions are for CentOS7.

Architecture

 

This exercise will walk you through installing OpenStack on a single server with 3 network interface cards. Clustered Data ONTAP should be setup with a Cluster Management LIF prior to proceeding. Our recommendation is to provision sufficient disk space (100GB or more), memory (16GB or more), and networking (1Gbps or more) for the OpenStack server. The instructions assume the availability of:

 

      An external network that you can use to SSH to your server and Clustered Data ONTAP.

      A private network that is used for OpenStack instance-to-instance communication. It is not heavily used in this lab guide, but is needed for instance-to-instance communication.

      A storage network on which the Clustered Data ONTAP NFS Data LIFS are located. In our lab, the Clustered Data ONTAP Cluster Management LIF was located on the external network, but it should still be functional if you have it on the Storage Network along with the NFS Data LIF.

 

You will also step through the deployment of a Neutron router, creation of a Nova instance, setup and use of a Manila share, and setup and use of a Cinder volume.

 

The architecture is shown below.


 

Setup Clustered Data ONTAP (CDOT)

 

Please setup your CDOT with a Cluster Management LIF on the external network before proceeding.

 

#Login to CDOT using your username and password

[user@local-machine]$ ssh admin@<cluster-mgt-lif-ip-address>

Password: <password>

 

Example:

$ ssh admin@10.10.10.200

 

#Create a new vserver (SVM). The name used was �netapp-vs� and aggregate (disk pool) used was �aggr1.� Your aggregate may be different.

OPSK-02::> vserver create -vserver netapp-vs -rootvolume root -aggregate aggr1 -rootvolume-security-style unix

 

#Ensure that the vserver was created

OPSK-02::> vserver show

 

                               Admin      Operational Root

Vserver     Type    Subtype    State      State       Volume     Aggregate

----------- ------- ---------- ---------- ----------- ---------- ----------

netapp-vs  data    default    running    running     root       aggr1

<output-removed>

 

#Create a new NFS Data LIF with the appropriate port, address, and netmask

OPSK-02::> network interface create -vserver netapp-vs -lif nfs_lif -role data -data-protocol nfs -home-node OPSK-02-n1 -home-port e0b -address 172.20.20.200 -netmask 255.255.255.0

 

#Note that NFS Data LIF was created

OPSK-02::> network interface show

            Logical    Status     Network            Current       Current Is

Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home

----------- ---------- ---------- ------------------ ------------- ------- ----

Cluster

netapp-vs

            nfs_lif      up/up    172.20.20.200/24   OPSK-02-n1    e0b     true

<output-removed>

 

#Create a default export policy

OPSK-02::> vserver export-policy rule create -vserver netapp-vs -policyname default -clientmatch 0.0.0.0/0 -rwrule any -rorule any  -allow-suid true -allow-dev true -protocol any

 

#Note that the export policy was created

OPSK-02::> vserver export-policy rule show

             Policy          Rule    Access   Client                RO

Vserver      Name            Index   Protocol Match                 Rule

netapp-vs   default         1       any      0.0.0.0/0             any

<output-removed>

 

#Add aggregates to the vserver. Your aggregate names may be different.

OPSK-02::>vserver add-aggregates -vserver netapp-vs -aggregates aggr1 aggr2

 

#Add NFS protocols to the vserver (use tab-completion)

OPSK-02::> vserver nfs create -vserver netapp-vs -access true -v3 enabled -tcp enabled -mount-rootonly enabled -nfs-rootonly disabled -permitted-enc-types des,des3,aes-128,aes-256 -showmount disabled -name-service-lookup-protocol udp

 

 

The CDOT filer has now been configured for Manila.

 


 

OpenStack Server Configuration

 

Obtain an x86_64 server.

Setup 3 network interface cards on the box.

Ensure it has 16GB of memory, 100GB of disk space, and 1GbE networking.

Install Centos 7 on it. The version installed in the lab was:

CentOS Linux release 7.2.1511 (Core) with GUI

 

Networking Pre-Configuration

 

#Login to the server

[user@local-machine ~ ]$ ssh root@<external-network-interface-ip-address>

Password: <password>

 

#Turn NetworkManager off

[root@stlrx300s7-102 ~ ]$ service NetworkManager stop

[root@stlrx300s7-102 ~ ]$ chkconfig NetworkManager off

 

#For name resolution, use the following in /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

nameserver 127.0.0.1

 

As mentioned previously, there should be 3 interfaces on the CentOS server.

1.     Interface1 connects to your LAN is the external interface

2.     Interface2 connects to your private network

3.     Interface3 connects to your storage network

 

 

Interface 1

Interface 2

Interface 3

ID

enp8s0f0

enp4s0f1

enp4s0f0

IP Address

10.10.10.100

192.168.10.20

172.20.20.100

Network

10.10.10.0/24

192.168.10.0/24

172.20.20.0/24

Description

External Interface

Internal Interface

Storage Network Interface

 

The initial configuration of each of these interfaces is shown below, please adapt these to suit your networking.

 

#ifcfg- enp8s0f0

#Interface 1 initial configuration

TYPE=Ethernet

BOOTPROTO=static

IPADDR=10.10.10.100

NETMASK=255.255.255.0

GATEWAY=10.10.10.1

DNS1=10.60.60.100

DNS2=10.70.70.200

DEFROUTE=yes

PEERDNS=yes

PEERROUTES=yes

NAME=enp8s0f0

UUID=a82d2cc3-7e94-496f-9085-54c88ea6983b

DEVICE=enp8s0f0

ONBOOT=yes

 

#ifcfg- enp4s0f1

#Interface 2 initial configuration

TYPE=Ethernet

BOOTPROTO=static

IPADDR=192.168.10.20

NETMASK=255.255.255.0

DEFROUTE=no

NAME=enp4s0f1

UUID=6d6d7592-f005-4bc1-b5b3-377bdc4aa8b8

DEVICE=enp4s0f1

ONBOOT=yes

 

#ifcfg- enp4s0f0

#Interface 3 initial configuration

TYPE=Ethernet

BOOTPROTO=static

IPADDR=172.20.20.100

NETMASK=255.255.255.0

DEFROUTE=no

NAME=enp4s0f0

UUID=1844b13f-baaf-4708-96bc-a4e6bb6ecf60

DEVICE=enp4s0f0

ONBOOT=yes

 

Once the interfaces are configured according to your network infrastructure, please:

      ensure that you can ping other hosts in the external (LAN) and storage networks

      ensure that private network interface is up and configured with an IP address. Use the command ifconfig

 

[root@stlrx300s7-36 network-scripts]# service network restart

Restarting network (via systemctl):               [  OK  ]

 

#ping the Clustered Data ONTAP Cluster Management LIF

[root@stlrx300s7-36 network-scripts]$ ping 10.10.10.200

PING 10.10.10.200 (10.10.10.200) 56(84) bytes of data.

64 bytes from 10.10.10.200: icmp_seq=1 ttl=64 time=1.09 ms

...

 

#ping the Clustered Data ONTAP Data LIF

[root@stlrx300s7-36 network-scripts]# ping 172.20.20.200

PING 172.20.20.200 (172.20.20.200) 56(84) bytes of data.

64 bytes from 172.20.20.200: icmp_seq=1 ttl=255 time=0.180 ms

...

 

#ensure that the private network interface is UP

[root@stlrx300s7-36 network-scripts]# ifconfig enp4s0f1

enp4s0f1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        inet 192.168.10.20  netmask 255.255.255.0  broadcast 192.168.10.255

        ether 00:19:99:e0:0b:75  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

 

Create a new user for OpenStack RDO (optional-you may already have a user created, but it may be easier to follow future instructions if you create this user)

 

[root@stlrx300s7-102 ~ ]$ useradd rdouser

[root@stlrx300s7-102 ~ ]$ sudo visudo

 

#Make the following change (comment out the first line and uncomment the second line):

....

## Allows people in group wheel to run all commands

# %wheel        ALL=(ALL)       ALL

 

## Same thing without a password

%wheel ALL=(ALL)       NOPASSWD: ALL

....

 

#Add rdouser to wheel group

[rdouser@stlrx300s7-102 ~ ]$ usermod -aG wheel rdouser

[rdouser@stlrx300s7-102 ~ ]$ passwd rdouser

Password: <password>

Confirm: <password>

 

#Transfer the install script from your local machine

[user@local-machine ~ ] $ scp provision-packstack-mitaka.sh rdouser@<external-interface-ip-address>:/home/rdouser

Install OpenStack Mitaka Using Script

 

$./provision-packstack-mitaka.sh <answer-file-name> <cluster-management-lif-ip-address> <vserver-name> <CDOT-username> <CDOT-password> <external-ethernet-interface> <private-ethernet-interface> <storage-ethernet-interface>

 

Example:

[rdouser@stlrx300s7-102 ~ ]$./provision-packstack-mitaka.sh ans.txt 10.10.10.200 netapp-vs admin Netapp123 enp8s0f0 enp4s0f1 enp4s0f0

 

Wait 30-45 mins for the install to complete. In order to assess your installation success, please scroll up on the console until you see a message similar to the screenshot below.

 

../../../../../Desktop/Screen%20Shot%202016-09-06%20at%206.26.

 

Note: You will need to scroll up to check on the installation success.

 

Setup Neutron Networking

Continue working on the OpenStack server.

 

#Source the keystonerc_admin file

[rdouser@stlrx300s7-102 ~] $. keystonerc_admin

 

#Create an external network and subnet. Note that you need to change the subnet configuration ip addresses to suit your networking. We have allocated a pool of 5 addresses in this example for OpenStack instances/VMs (10.10.10.160-165).

#Note: These ip addresses are not arbitrary. They have to match your topology.

 

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron net-create external-net --router:external --provider:physical_network exnet --provider:network_type flat

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron subnet-create external-net 10.10.10.0/24 --name external-subnet --allocation-pool start=10.10.10.160,end=10.10.10.165 --disable-dhcp --gateway 10.10.10.1

 

#Create a private network and subnet. You have to change the ip addresses to suit your networking.

#Note: These ip addresses are not arbitrary. They have to match your topology.

 

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron net-create private-net

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron subnet-create private-net 192.168.10.0/24 --name private-subnet --gateway 192.168.10.1

 

 

#Create a router between private and external networks

 

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron router-create pri-ext-router

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron router-interface-add pri-ext-router private-subnet

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron router-gateway-set pri-ext-router external-net

 

#Create a storage network and subnet. You have to change the ip addresses to suit your networking. We have again allocated a pool of 5 addresses for OpenStack VMs/instances. (172.20.20.180-185)

#Note: These ip addresses are not arbitrary. They have to match your topology.

 

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron net-create storage-net --provider:physical_network stgnet --provider:network_type flat

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron subnet-create storage-net 172.20.20.0/24 --name storage-subnet --allocation-pool start=172.20.20.180,end=172.20.20.185

 

Setup Security Group, Glance, Key-Pair, and Ubuntu Instance/VM

 

#Allow Security Group Access for VMs/instances

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova secgroup-add-rule default udp 1 65535 0.0.0.0/0

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0

 

#Create a Glance Image

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ curl http://uec-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img  | glance image-create --name=ubuntu --container-format=bare --disk-format=qcow2

 

#Create a key-pair

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ mkdir /home/rdouser/.ssh

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ ssh-keygen -t rsa -N "" -f id_rsa

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ mv id_rsa /home/rdouser/.ssh/

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ mv id_rsa.pub /home/rdouser/.ssh/

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova keypair-add openstack_key --pub-key /home/rdouser/.ssh/id_rsa.pub

 

#Get the network IDs for the private and storage networks

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ neutron net-list

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

| id                                   | name         | subnets                                              |

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

| 22bdde43-f4ae-4254-adac-b9f33274f2b6 | private-net  | 143d2345-8314-448b-bde4-921bfa39a0b4 192.168.10.0/24 |

| 7e79c010-a71b-4261-beaa-b2ea25eefcd2 | storage-net  | 14d911f6-6c9c-4664-a79c-f23b117c5189 172.20.20.0/24 |

| de1ddd64-b905-43de-bf3f-31b8f36f90c8 | external-net | ee0f4aab-7bfa-4bb5-88c4-1796bc423f52 10.10.10.0/24  |

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

 

#Create an instance using the network UUIDs from the previous command

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova boot --flavor m1.medium --image ubuntu --key-name openstack_key --nic net-id=<network-id-for-private> --nic net-id=<network-id-for-storage> <instance-name>

 

#Example: Creating an instance called �test�

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova boot  --flavor m1.medium --image ubuntu --nic net-id=22bdde43-f4ae-4254-adac-b9f33274f2b6 --nic net-id=7e79c010-a71b-4261-beaa-b2ea25eefcd2 test

 

#Create a floating IP address and associate it with the instance

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova floating-ip-create external-net

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

| Id                                   | IP            | Server Id | Fixed IP | Pool         |

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

| f67ddc23-b6e3-4b6c-8a5c-9864c1153387 | 10.10.10.162 | -         | -        | external-net |

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

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova floating-ip-associate test 10.10.10.162

 

#Wait until the instance is Running and has 3 ip addresses

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ nova list

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

| ID                                   | Name  | Status | Task State | Power State | Networks                                                            |

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

| 87b3c024-3e43-4f36-b85b-a23f4ba4a0f4 | test | ACTIVE | -          | Running     | private-net=192.168.10.17, 10.10.10.162; storage-net=172.20.20.182 |

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

 

You will connect to your Nova instance using its floating ip address.

Setup Manila and Create a Share

 

#Setup Manila to use Single Storage Virtual Machine Mode (Single SVM)

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ manila type-create ontap_share false

 

#Create and enable access to the share

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ manila create --share-type ontap_share nfs 1

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ manila list

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

| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type  | Export location                                           | Host                        |

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

| 02ff4bc6-5143-4d6d-b399-c47e377c601b | None | 1    | NFS         | creating | False     | ontap_share | 172.20.20.200:/share_02ff4bc6_5143_4d6d_b399_c47e377c601b | stlrx300s7-102@netapp#aggr2 |

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

 

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ manila access-allow 02ff4bc6-5143-4d6d-b399-c47e377c601b ip 0.0.0.0/0

 

#Ensure that the share is available

[rdouser@stlrx300s7-102 rdouser(keystone_admin)]# manila list

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

| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type  | Export location                                           | Host                        |

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

| 02ff4bc6-5143-4d6d-b399-c47e377c601b | None | 1    | NFS         | available | False     | ontap_share | 172.20.20.200:/share_02ff4bc6_5143_4d6d_b399_c47e377c601b | stlrx300s7-102@netapp#aggr2 |

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

#If the share is still being created, please run the manila list command again and wait.

Login to the Ubuntu Instance and Mount the Share

 

#Open new shell and ssh to the OpenStack Server

[user@local-machine]$ ssh root@10.10.10.100

 

#Login to the Ubuntu instance. The external network ip address (floating ip) indicated here can be obtained from the output of the nova list command from your other shell on OpenStack. (Highlighted)

 

[root@stlrx300s7-102 ~]$ su - rdouser

[rdouser@stlrx300s7-102 ~]$ . keystonerc_admin

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ ssh ubuntu@10.10.10.162

 

#make the following change in /etc/hosts. �test� is the name of this instance (the value that was specified in the nova boot command)

root@test:~$ sudo vim /etc/hosts

#replace the following lines

#127.0.0.1 localhost

127.0.0.1 test

 

#make the following change to dns

root@test:~$ sudo vim /etc/resolv.conf

nameserver 8.8.8.8

 

#Setup Networking for eth1 � the storage network interface

ubuntu@test:~$ sudo su �

root@test:~$ apt-get install nfs-common -y

 

#update the eth1 interface

root@test:~$ vim /etc/network/interfaces.d/eth1.cfg

#insert the following lines for the secondary network interface

auto eth1

iface eth1 inet dhcp

#restart eth1

root@test:~$ ifdown eth1 && ifup eth1

 

#Ensure that eth1 has an ip address in the storage network

 

root@test:~$ ifconfig eth1

 

eth1      Link encap:Ethernet  HWaddr fa:16:3e:c5:cb:5a

          inet addr:172.20.20.182  Bcast:172.20.20.255  Mask:255.255.255.0

          inet6 addr: fe80::f816:3eff:fec5:cb5a/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1400  Metric:1

          RX packets:1193 errors:0 dropped:0 overruns:0 frame:0

          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:110852 (110.8 KB)  TX bytes:2846 (2.8 KB)

 

 

#Get the mount point of the share. Switch to the OpenStack shell and run manila list

[rdouser@stlrx300s7-102 rdouser(keystone_admin)]# manila list

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

| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type  | Export location                                           | Host                        |

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

| 02ff4bc6-5143-4d6d-b399-c47e377c601b | None | 1    | NFS         | available | False     | ontap_share | 172.20.20.200:/share_02ff4bc6_5143_4d6d_b399_c47e377c601b | stlrx300s7-102@netapp#aggr2 |

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

 

 

#On the Ubuntu instance, mount the share using its export path

root@test:~$ exit

ubuntu@test:~$ sudo mkdir /mnt/nfs_share

ubuntu@test:~$ sudo mount -t nfs 172.20.20.200:/share_02ff4bc6_5143_4d6d_b399_c47e377c601b /mnt/nfs_share

 

#Confirm that the share is mounted

root@test~# df -kh

Filesystem                                                 Size  Used Avail Use% Mounted on

udev                                                       2.0G   12K  2.0G   1% /dev

tmpfs                                                      396M  344K  396M   1% /run

/dev/disk/by-label/cloudimg-rootfs                          40G  872M   37G   3% /

none                                                       4.0K     0  4.0K   0% /sys/fs/cgroup

none                                                       5.0M     0  5.0M   0% /run/lock

none                                                       2.0G     0  2.0G   0% /run/shm

none                                                       100M     0  100M   0% /run/user

172.20.20.200:/share_02ff4bc6_5143_4d6d_b399_c47e377c601b  973M  128K  973M   1% /mnt/nfs_share

 

#Ensure that the share is writable

ubuntu@test:~$ sudo ls /mnt/nfs_share

ubuntu@test:~$ sudo touch /mnt/nfs_share/file.txt

ubuntu@test:~$ sudo ls /mnt/nfs_share

file.txt

 

 

You have now setup Manila, created a share and accessed from an OpenStack instance. If your networking is setup to provide access to the storage network (with or without routing), you should also be able to create shares using Manila for clients outside the OpenStack cloud.

 

Setup Cinder and Create a Volume

 

On your CDOT, please create a FlexVol volume container, ensuring that your unix-permissionsandjunction-path are as shown below. You will use the junction path as the Cinder back end later.

 

OPSK-02::> volume create -vserver netapp-vs -volume cinderbe -aggregate aggr1 -size 25G -state online -type RW -policy default -unix-permissions ---rwxrwxrwx  -security-style unix �junction-path /cinderbe

 

The CDOT filer has now been configured for Cinder. We will perform the remaining steps on the OpenStack.

 

#change to the root user

[rdouser@stlrx300s7-102 rdouser(keystone_admin)]# sudo su

 

#�cd� to /etc/cinder and modify cinder.conf as shown below

[root@stlrx300s7-102 rdouser(keystone_admin)]#

cd /etc/cinder/

 

#edit cinder.conf as shown below. Pay particular attention to netapp_server_hostname (the CDOT IP Address), netapp_password (the CDOT password), and netapp_vserver (should be �netapp-vs�)

[root@stlrx300s7-35 cinder]# vim cinder.conf

 

enabled_backends=netapp

[netapp]

volume_backend_name=netapp

volume_driver=cinder.volume.drivers.netapp.common.NetAppDriver

netapp_server_hostname=10.10.10.200

netapp_storage_protocol=nfs

netapp_storage_family=ontap_cluster

netapp_login=admin

netapp_password=<replace-with-CDOT-password>

netapp_vserver=netapp-vs

nfs_shares_config=/etc/cinder/shares.conf

nas_secure_file_permissions = false

nas_secure_file_operations = false

 

 

#edit the shares.conf file. The portion after the �:�  is the Cinder backend and must match the junction path for the CDOT FlexVol exactly.

vim shares.conf

172.20.20.73:/cinderbe

 

#restart the Cinder scheduler and volume services

[root@stlrx300s7-35 cinder]# service openstack-cinder-scheduler restart

Redirecting to /bin/systemctl restart  openstack-cinder-scheduler.service

[root@stlrx300s7-35 cinder]# service openstack-cinder-volume restart

Redirecting to /bin/systemctl restart  openstack-cinder-volume.service

[root@stlrx300s7-35 cinder]#

 

#create a volume-type and point it to the netapp backend. This will inform Cinder to create volumes on the netapp filer

[root@stlrx300s7-35 cinder(keystone_admin)]# cinder type-create ontap

<output removed>

[root@stlrx300s7-35 cinder(keystone_admin)]# cinder type-key ontap set volume_backend_name=netapp

 

#confirm that the extra specs were set correctly

[root@stlrx300s7-35 cinder(keystone_admin)]# cinder extra-specs-list

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

|                  ID                  |  Name  |              extra_specs              |

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

| 83514593-ceff-4331-a5f7-e6add0f08d25 | ontap  |   {u'volume_backed_name': u'netapp'}   |

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

 

#create a Cinder volume

[root@stlrx300s7-35 cinder(keystone_admin)]# cinder create --volume-type ontap 1

<output-removed>

 [root@stlrx300s7-35 cinder(keystone_admin)]# cinder list

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

|                  ID                  |   Status  | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |

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

| 7ad7e231-292a-45ac-ac7a-37149dcfc436 | available |        -         |  -   |  1   |    ontap    |  false   |    False    |             |

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

 

#attach the cinder volume the �test� nova instance

[root@stlrx300s7-35 manila(keystone_admin)]# nova volume-attach test 7ad7e231-292a-45ac-ac7a-37149dcfc436

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

| Property | Value                                |

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

| device   | /dev/vdb                             |

| id       | 7ad7e231-292a-45ac-ac7a-37149dcfc436 |

| serverId | 87b3c024-3e43-4f36-b85b-a23f4ba4a0f4 |

| volumeId | 7ad7e231-292a-45ac-ac7a-37149dcfc436 |

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

 

#confirm that the volume is attached

[root@stlrx300s7-35 manila(keystone_admin)]# cinder list

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

|                  ID                  | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach |             Attached to              |

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

| 1cae0e72-b8ae-4d42-9430-74380e4400ce | in-use |        -         |  -   |  1   |  packstack  |  false   |    False    | 87b3c024-3e43-4f36-b85b-a23f4ba4a0f4 |

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

 

Login to the Ubuntu Instance and Use the Cinder Volume

 

#Open new shell and ssh to the OpenStack Server

[user@local-machine]$ ssh root@10.10.10.100

 

#Login to the Ubuntu instance. The external network ip address (floating ip) indicated here can be obtained from the output of the nova list command.

 

[root@stlrx300s7-102 ~]$ su - rdouser

[rdouser@stlrx300s7-102 ~]$ . keystonerc_admin

[rdouser@stlrx300s7-102 ~(keystone_admin)]$ ssh ubuntu@10.10.10.162

 

#confirm that the 1GB volume is present and available for use

ubuntu@test:~$ lsblk

ubuntu@test4-ubuntu-updated:~$ lsblk

NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

vda    253:0    0  40G  0 disk

__vda1 253:1    0  40G  0 part /

vdb    253:16   0   1G  0 disk

 

 

--end of instructions �

 

Troubleshooting

 

PackStack Install: RabbitMQ

PackStack install fails because rabbitmq-server cannot be started.

 

Ensure that that /etc/hosts and /etc/hostname are similar.

Example:

/etc/hosts

::1     localhost

127.0.0.1   centos7.corp.com   centos7

 

/etc/hostname

centos7

 

PackStack Install: NetworkManager

PackStack installs fail with NetworkManager errors.

 

Ensure that NetworkManager is stopped and turned off prior to PackStack install

$ service NetworkManager stop

$ chkconfig NetworkManager off

 

Commands on Nova, Cinder and Manila fail with �You must provide a user�� ERROR

 

Please source the keystonerc_admin file if you see the following error when running commands:  

 

ERROR: You must provide a user name through --os-username or env[OS_USERNAME].

$ source ~/keystonerc_admin

$ cinder list

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

|                  ID                  |   Status  | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |

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

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

 

Creating a Nova Instance Error

Nova instances don�t boot and show an ERROR status almost immediately.

 

The Glance image you�re using may be fetched from an outdated URL. For the latest URLs, please check http://docs.openstack.org/image-guide/obtain-images.html#official-ubuntu-images. In order to try with the new URL, please run the following command with the updated URL:

 

$ curl <replace-with-updated-image-url>  | glance image-create --name=ubuntu-updated --container-format=bare --disk-format=qcow2

 

Use the ubuntu-updated image in your nova boot command.

 

$ nova boot --flavor m1.medium --image ubuntu-updated --key-name openstack_key test2

 

What were the changes made to manila.conf through the install script?

 

Manila.conf will have a new stanza called �netapp� and this stanza will be enabled using the enabled_share_backends parameter.

 

 

####################

# manila.conf      #

####################�

enabled_share_backends=netapp

[netapp]

netapp_volume_name_template=share_%(share_id)s

netapp_vserver_name_template=os_%s

netapp_vserver=netapp-vs

netapp_password=Netapp123

driver_handles_share_servers=False

netapp_server_port=80

netapp_server_hostname=10.10.10.200

netapp_transport_type=http

netapp_login=admin

netapp_storage_family=ontap_cluster

netapp_aggregate_name_search_pattern=(.*)

netapp_lif_name_template=os_%(net_allocation_id)s

netapp_port_name_search_pattern=(.*)

share_driver=manila.share.drivers.netapp.common.NetAppDriver

share_backend_name=netapp

�.

 

Do I need to setup Manila first if I only want Cinder?

No, you don�t need to setup Manila for Cinder. However, in order to setup Cinder, you should setup CDOT first and install OpenStack. To setup only Cinder, your sequence of steps will be:

 

1.     Architecture

2.     Setup Clustered Data ONTAP (CDOT)

3.     OpenStack Server Configuration

4.     Networking Pre-Configuration

5.     Install OpenStack Mitaka Using Script

6.     Setup Neutron Networking

7.     Setup Security Group, Glance, Key-Pair, And Ubuntu Instance/VM

8.     Setup Cinder and Create a Volume

9.     Login to the Ubuntu Instance and Use the Cinder Volume

 

 

Acknowledgments

The author would like to thank Dave Cain for his guidance and feedback.