Top Banner
Creating a GUI to Add Primary Storage based on Plugins Student : Seifeddine Jemli Mentor : Mike Tutkowski
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Seif_mike_gsoc_2014_cloudstack

Creating a GUI to Add Primary

Storage based on Plugins

Student :

Seifeddine

Jemli

Mentor :

Mike Tutkowski

Page 2: Seif_mike_gsoc_2014_cloudstack

Plan

• Context

• What the process was like

• How it looks now

• Improving the tags inputs

• Conclusion

Page 3: Seif_mike_gsoc_2014_cloudstack

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

• 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

What the process was like

Page 6: Seif_mike_gsoc_2014_cloudstack

• 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

How it looks like now

Page 8: Seif_mike_gsoc_2014_cloudstack

• 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

Add Primary Storage (Zone Wide)

Page 10: Seif_mike_gsoc_2014_cloudstack

Add Primary Storage (Cluster)

Page 11: Seif_mike_gsoc_2014_cloudstack

• 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

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

• 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

• 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

• 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

• 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

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

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

listStorageTags API call

Page 20: Seif_mike_gsoc_2014_cloudstack

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

Editing the Storage Tags of a Primary

Storage

Page 22: Seif_mike_gsoc_2014_cloudstack

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

Host Tags new input

(Add Host form)

Page 24: Seif_mike_gsoc_2014_cloudstack

listHostTags API call

Page 25: Seif_mike_gsoc_2014_cloudstack

Editing the Host Tags

Page 26: Seif_mike_gsoc_2014_cloudstack

New Inputs for the “Add Disk

Offering” form

Page 27: Seif_mike_gsoc_2014_cloudstack

New Inputs for the “Add Compute

Offering” form

Page 28: Seif_mike_gsoc_2014_cloudstack

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

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

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

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)