Seif_mike_gsoc_2014_cloudstack
-
Upload
seif100 -
Category
Engineering
-
view
127 -
download
3
Transcript of Seif_mike_gsoc_2014_cloudstack
![Page 1: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/1.jpg)
Creating a GUI to Add Primary
Storage based on Plugins
Student :
Seifeddine
Jemli
Mentor :
Mike Tutkowski
![Page 2: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/2.jpg)
Plan
• Context
• What the process was like
• How it looks now
• Improving the tags inputs
• Conclusion
![Page 3: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/3.jpg)
Context• Prior to CloudStack 4.2, there was no way to
write a storage plugin.
• Since CloudStack 4.2, custom storage behaviour has been implementable via a plugin model.
• The Default Storage Plugin implements functionality that existed in CloudStack prior to the 4.2 release.
![Page 4: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/4.jpg)
• Each Primary Storage has to be associated with a plugin.
• If we don’t specify the plugin when creating the Primary Storage, it is associated with the Default Plugin.
• The CloudStack GUI didn’t support adding Primary Storage with respect to different Storage Vendor Plugins (example: SolidFire)
![Page 5: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/5.jpg)
What the process was like
![Page 6: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/6.jpg)
• Admins who wanted to add a Primary Storage which is not based on the Default Storage Plugin had to invoke the addPrimaryStorageAPI outside of the CloudStack GUI.
• Admins needed to perform this task either with CloudStack’s CLI, its API, or some other tool that leveraged CloudStack’s CLI or its API.
![Page 7: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/7.jpg)
How it looks like now
![Page 8: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/8.jpg)
• Now, admins who want to add a Primary Storage which is not based on the Default Storage Plugin can directly do so with the CloudStack GUI..
• The addPrimaryStorage API is called in the background after getting all the necessary parameters from the “Add Primary Storage” form.
![Page 9: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/9.jpg)
Add Primary Storage (Zone Wide)
![Page 10: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/10.jpg)
Add Primary Storage (Cluster)
![Page 11: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/11.jpg)
• Zone-wide primary storage is simply primary storage that all hosts in all clusters of that zone can access.
• Cluster primary storage is CloudStack's traditional model whereby only hosts in a given cluster can see that primary storage.
![Page 12: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/12.jpg)
Storage Tags
• A storage tag is a string attribute associated with Primary Storage, a Disk Offering, and a Compute Offering.
• The storage tag is a field that tells what kind of Primary Storage can satisfy your volume's needs (could be simple like “Fast” or specific like the model of a particular vendor’s hardware).
![Page 13: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/13.jpg)
• Storage Tags for Compute and Disk Offeringsare used to identify the requirements of the root or data disks of VMs. For example, a high-end Compute Offering may require “fast” for its root disk volume.
• Admins used to need to memorize the tags they wanted to use for a specific Primary Storage (or look them up in an inconvenient way). They also needed to type in a comma-separated list of tags.
![Page 14: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/14.jpg)
• To provide a better user experience, we thought of adding auto-completion to the Storage Tags input.
That’s why we adapted and integrated this open source library to the CloudStack GUI : http://loopj.com/jquery-tokeninput/
• The new “Storage Tags” and “Host Tags” inputs will make it easier for admins.
![Page 15: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/15.jpg)
• As part of the process, we needed to create two new API calls to CloudStack :
- listStorageTags
- listHostTags
• These API calls retrieve the list of the existing Storage tags or Host tags in order to populate them into the new GUI control.
![Page 16: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/16.jpg)
• The existing tags will be suggested to the user in the Autocompletion dropdown.
• The admin can then either select one or many existing tags and/or add new new ones.
![Page 17: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/17.jpg)
Adding a new Storage Tag
In order to add a new Storage Tag in the “Storage
Tags Input”, we have to write the name of the
storage Tag, then press “space bar” or “comma” or
click outside to lose focus on the input.
![Page 18: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/18.jpg)
Searching for a Storage Tag
The new input suggests existing Storage Tags that
can match the typed text.
These suggestions change dynamically whenever
we type a new letter.
![Page 19: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/19.jpg)
listStorageTags API call
![Page 20: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/20.jpg)
No Storage Tags Found
When there is no Storage Tag matching the typed
letters, we have to enter a new Storage Tag.
New Storage Tags can be added even if existing
Storage Tags are displayed in the list.
![Page 21: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/21.jpg)
Editing the Storage Tags of a Primary
Storage
![Page 22: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/22.jpg)
Host Tags
● Host Tags have a similar use case as
the Storage Tags, but for Virtual
Machines.
● If you spin up a Virtual Machine using
a compute offering that has one or
more host tags, then the VM can only
be placed on hosts that have those
host tags.
![Page 23: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/23.jpg)
Host Tags new input
(Add Host form)
![Page 24: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/24.jpg)
listHostTags API call
![Page 25: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/25.jpg)
Editing the Host Tags
![Page 26: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/26.jpg)
New Inputs for the “Add Disk
Offering” form
![Page 27: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/27.jpg)
New Inputs for the “Add Compute
Offering” form
![Page 28: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/28.jpg)
Technologies used
● jQuery and CSS for implementing the
GUI changes.
● Java for implementing the API
commands.
● The Vagrant machine that simplifies
building a full CloudStack
environment.https://github.com/imduffy15/GSoC-2014
![Page 29: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/29.jpg)
Conclusion
● My participation in GSoC was a very
good experience overall, with a lot of
learning.
● I will probably work on a key-value
control to facilitate the entry of the
URLs in the “Add Primary Storage”
form.
![Page 30: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/30.jpg)
Thanks to
● My mentor for his guidance.
● The Apache CloudStack community
members for their help.
● Google for giving students the
opportunity to take part in this coding
event.
![Page 31: Seif_mike_gsoc_2014_cloudstack](https://reader033.fdocuments.us/reader033/viewer/2022060205/55a1ac171a28abc2798b4574/html5/thumbnails/31.jpg)
Student : Seifeddine Jemli
● Computer Science student at the french “grande ecole”, ENSEIRB-MATMECA.
Mentor : Mike Tutkowski
● Senior CloudStack Developer at ‘SolidFire’● CloudStack PMC Member● CloudStack Committer● Weightlifter (DL: 505 lbs, Squat: 430 lbs)