Use Vagrant to automatically build an OpenStack Manila environment including NetApp clustered Data ONTAP simulator backend
This project is the foundation for the automation lab used as part of the OpenStack Liberty Design Summit session Manila: Taking OpenStack Shared File Storage to the Telco Cloud. The project has evolved since the summit, but you can still find the summit release under the release tab.
- 8 GB RAM
- 15-20 GB of free disk space
- SSD recommended
- Linux / Mac
- Internet connection
- Virtualbox installed
- Vagrant installed
- Access to the NetApp support site to download the cDOT simulator. Site access may be limited to customers and partners.
- If you use Git, clone this repo. If you don't use Git, download the project and extract it.
- Download NetApp Manageability (NM) SDK. Version 5.4 has been tested.
- Save the downloaded file
netapp-manageability-sdk*.zip
to this project's root directory, e.g.~/vagrant-devstack-manila-vsim/netapp-manageability-sdk-5.4.zip
- Download Clustered Data ONTAP 8.x Simulator for VMware Workstation, VMware Player, and VMware Fusion. Version 8.2.3 has been tested.
- Save the downloaded file
vsim_netapp-cm.tgz
to this project's root directory, e.g.~/vagrant-devstack-manila-vsim/vsim_netapp-cm.tgz
- Configure the Cluster base license.
Editvsim.conf
, at the top set the 8.x Cluster base license withinCLUSTER_BASE_LICENSE
accordingly. The license can be obtained from the support site.
vsim.conf
:
...
# Specify the Cluster Base License
# Important: Use the Cluster Base license for Clustered-ONTAP Simulator 8.x for
# VMware Workstation, VMware Player, and VMware Fusion
CLUSTER_BASE_LICENSE="SMKXXXXXXXXXXXXXXXXXXXXXXXXX"
...
Important: Use the non-ESX build license.
- Configure additional licenses required for Manila
Configure the additional, required licenses CIFS, NFS, FlexClone for the use with Manila The additional licenses can be obtained from the support site.
vsim.conf
:
...
# Define additional licenses,e.g. NFS, CIFS, as a comma seperated list without spaces
# Important: Use the licenses for the non-ESX build for the first node in a cluster
LICENSES="YVUXXXXXXXXXXXXXXXXXXXXXXXXX,SOHXXXXXXXXXXXXXXXXXXXXXXXXX,MBXXXXXXXXXXXXXXXXXXXXXXXXXX"
...
Important: Use the non-ESX build licenses.
- From this directory, e.g.
~/vagrant-devstack-manila-vsim/
, run:
$ vagrant up
- You will be asked to import the simulator as a Vagrant box on first run. Press
y
to proceed and import. The import will take a few minutes. - During the deployment, a service VM will be started. The service VM will offer an ip address to the simulator and configure the VSim.
- After the VSim has been deployed, a DevStack VM will be provisioned. The DevStack run will take about 40 minutes depending on the speed of your internet connection.
- Wait until the deployment is ready. Once ready, to access the DevStack console and create and mount a share, run:
$ vagrant ssh devstackvm
- As the demo user you can create a share network on your private network, and then create a share on that share network, from the DevStack console run:
$ cd devstack
$ source openrc demo demo
$ neutron net-list
$ manila share-network-create --neutron-net-id $PRIVATE_NET_ID$ --neutron-subnet-id $PRIVATE_SUBNET_ID$ --name MyShareNetwork
$ manila create --share-network MyShareNetwork --name MyShare NFS 1
$ manila list
$ neutron security-group-rule-create --protocol icmp default
$ neutron security-group-rule-create --protocol tcp --port-range-min 22 --port-range-max 22 default
$ nova boot --poll --flavor m1.nano --image ubuntu_1204_nfs_cifs demo-vm0
$ nova list
$ manila access-allow MyShare ip $NOVA_INSTANCE_IP$
$ nova floating-ip-create public
$ nova add-floating-ip demo-vm0 $FLOATING_IP$
$ ssh ubuntu@$FLOATING_IP$
$ sudo mkdir /mnt/share
$ sudo mount -t nfs $MYSHARE_EXPORT_LOCATION$ /mnt/share
$ sudo touch /mnt/share/hello_world
- To access the Horizon dashboard, point your browser to http://192.168.10.30. The admin credentials are username admin, password devstack. The demo credentials are username demo, password devstack
- When done, you can destroy the entire environment. Run:
$ vagrant destroy
The simulator will automatically be configured with a node-mgmt lif as well as a cluster-mgmt lif. You can customize the IP address of that lif to match your Vagrant networking setup.
Please note: A dnsmasq process is used to offer the IP to the simulator. Please ensure you don't have a conflicting DHCP server on the same VBoxNet.
vsim.conf
:
...
# Host address for the VSim node auto mgmt lif which exposes ONTAPI
# Note: A cluster mgmt lif will be created with the address x.x.x.4 and an
# additional service vm will deployed w/ the host address of x.x.x.253
NODE_MGMT_IP="10.0.207.3"
...
Add Vagrant plugins for the use with proxies and to enable caching
If you are behind a proxy, you may want to install Vagrant Proxyconf
vagrant plugin install vagrant-proxyconf
To speed up the deployment and avoid unnecessary downloads, install Vagrant Cachier
vagrant plugin install vagrant-cachier
- From this directory, e.g.
~/vagrant-devstack-manila-vsim/
, run:
$ vagrant destroy
$ vagrant box remove VSim
$ vagrant box remove ubuntu/trusty64
- Uninstall Virtualbox and Vagrant
- There is almost no error handling in place, please do not just abort the program when things take a while. At first start, please be patient, preparing the VSim Vagrant box can take several minutes.
- Occassionaly,
vagrant destroy
will error and can not delete all VM disks. These stale VMs may consume significant disk space. Manual deletion is required. Delete those VMs from your Virtualbox directory, e.g.~\VirtualBox VMs
- The setup is currently limited to a single node cluster
- Setup on Windows doesn't work reliably
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.