1. Creating a GUI to Add Primary
Storage based on Plugins
Student :
Seifeddine
Jemli
Mentor :
Mike Tutkowski
2. Plan
• Context
• What the process was like
• How it looks now
• Improving the tags inputs
• Conclusion
3. 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.
4. • 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)
6. • Admins who wanted to add a Primary Storage
which is not based on the Default Storage
Plugin had to invoke the addPrimaryStorage
API 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.
8. • 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.
11. • 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.
12. 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).
13. • Storage Tags for Compute and Disk Offerings
are 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.
14. • 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.
15. • 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.
16. • 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.
17. 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.
18. 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.
20. 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.
22. 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.
28. 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
29. 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.
30. 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.
31. 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)