SlideShare a Scribd company logo
Storage Plug-ins!!!
Plug-in preview for the new storage frameworks with SolidFire
Mike Tutkowski
• Lead Open Source Developer @SolidFire
• Dedicated to CloudStack Development
McClain Buggle
• Strategic Alliance Manager @SolidFire
Who are these guys?
The CloudStack Opportunity
 Cloud is happening NOW
 Pain points are REAL
 LACK of viable alternatives
 Opportunity is MASSIVE
 AWS is not standing still
Why the Urgency Around CloudStack?
ApplicationValue/Margin
High
Med
Low
IOPS
What is the
opportunity?
Low Hig
h
Performance Sensitive Apps
CRM / ERP / Database
Messaging / Productivity
Desktop
Performance
Sensitivity
$$$
$$
$
Applications
Dev / Test
Backup / Archive
We’ve
seen this
movie
before...
$-
$100
$200
$300
$400
$500
$600
$700
$800
$900
$1,000
2002 2003 2004 2005 2006 2007
x86 Virtualiza on -- VMware License Revenue ($M)
x86 Virtualization – The Test/Dev Era
Is this a
re-run?
0.00
100.00
200.00
300.00
400.00
500.00
600.00
700.00
800.00
900.00
2006 2007 2008 2009 2010 2011
AWS S3 Objects (Millions)
Cloud Computing – The Test/Dev Era
Why yes,
it is!
0
100
200
300
400
500
600
700
800
900
$0
$100
$200
$300
$400
$500
$600
$700
$800
$900
$1,000
YR1 YR2 YR3 YR4 YR5 YR6
x86 Virtualiza on -- VMware License Revenue ($M) Cloud -- Amazon S3 Objects (Billions)
The Test/Dev Era – x86 Virtualization vs. Cloud Computing
x86 Virtualization
This movie
ended well…
x86 Virtualization – From Test/Dev to Production
0
200
400
600
800
1000
1200
1400
1600
1800
2000
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
x86 Virtualiza on -- VMware License Revenue ($M)
Cloud
Computing
This ending
is still being
written The Test/Dev Era
The Produc on Era
The Production Era Opportunity: x86 Virtualization vs. Cloud
How do we
influence the
outcome?
Margin
High
Med
Low
IOPS
Low Hig
h
Performance Sensitive Apps
CRM / ERP / Database
Messaging / Productivity
Desktop
Performance
Sensitivity
$$$
$$
$
Applications
Dev / Test
Backup / Archive
Key Cloud
Infrastructure
Innovations
• Availability
• Performance
• Quality-of-Service
• Scalability
• Automation
• Storage is a major pain-point in most early-cloud deployments
• Unpredictable Performance
• Not designed for Multi-tenancy
• Storage a key underpinning to successful application deployments
• Today = Backup/Archive, Dev/Test
• Tomorrow = Mission & Business Critical Applications
What does this have to do with CloudStack?
Where we are today with a storage plug-in
Primary Storage in CloudStack
CloudStack was not designed for dynamic provisioning and does not leverage vendor
unique storage features within the framework.
For SolidFire we are interested in features that allow users to select minimum,
maximum, and burst IOPS for a given volume.
Use Cases for a CloudStack Plug-In
Ability to defer the creation of a volume until the moment the end user elects to execute
a Compute or Disk Offering.
Still have CS Admin configure the Primary Storage, but now it is based on a plug-in
instead of on a pre-existing storage volume.
No requirement on part of the CSP to write orchestration logic.
My Specific Needs from the Plug-in
A CloudStack storage plug-in is divided into three components:
Provider: Logic related to the plug-in in general (ex: name of plug-in).
Life Cycle: Logic related to life cycle (ex: creation) of a given storage system (ex: a single SolidFire
SAN).
Driver: Logic related to creating and deleting volumes on the storage system.
Must add a dependency in the client/pom.xml file as such:
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>
<version>${project.version}</version>
</dependency>
So…how do you actually make a plug-in?
 Must implement the PrimaryDataStoreProvider interface.
 Provides CloudStack with the plug-in's name as well as the Life Cycle and Driver
objects the storage system uses.
 Must be listed in the applicationContext.xml.in file (Spring Framework related).
 A single instance of this class is created for CloudStack.
Provider – About
public interface PrimaryDataStoreProvider extends DataStoreProvider {
}
public interface DataStoreProvider {
public static enum DataStoreProviderType {
PRIMARY,
IMAGE
}
public DataStoreLifeCycle getDataStoreLifeCycle();
public DataStoreDriver getDataStoreDriver();
public HypervisorHostListener getHostListener();
public String getName();
public boolean configure(Map<String, Object> params);
public Set<DataStoreProviderType> getTypes();
}
Provider – Interface
public class SolidfirePrimaryDataStoreProvider implements PrimaryDataStoreProvider {
private final String providerName = "SolidFire";
protected PrimaryDataStoreDriver driver;
protected HypervisorHostListener listener;
protected DataStoreLifeCycle lifecyle;
@Override
public String getName() { return providerName; }
@Override
public DataStoreLifeCycle getDataStoreLifeCycle() { return lifecyle; }
@Override
public boolean configure(Map<String, Object> params) {
lifecyle = ComponentContext.inject(SolidFirePrimaryDataStoreLifeCycle.class);
driver = ComponentContext.inject(SolidfirePrimaryDataStoreDriver.class);
listener = ComponentContext.inject(DefaultHostListener.class);
return true;
}
Provider – Implementation
Notes:
 client/tomcatconf/applicationContext.xml.in
 Each provider adds a single line.
 “id” is only used by Spring Framework (not by CS Management Server). Recommend just providing a descriptive
name.
Example:
<bean id="ClassicalPrimaryDataStoreProvider"
class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl" />
<bean id="solidFireDataStoreProvider"
class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider" />
Provider – Configuration
 Must implement the PrimaryDataStoreLifeCycle interface.
 Handles the creation, deletion, etc. of a storage system (ex: SAN) in CloudStack.
 The initialize method of the Life Cycle object adds a row into the cloud.storage_pool
table to represent a newly added storage system.
Life Cycle – About
public interface PrimaryDataStoreLifeCycle extends DataStoreLifeCycle {
}
public interface DataStoreLifeCycle {
public DataStore initialize(Map<String, Object> dsInfos);
public boolean attachCluster(DataStore store, ClusterScope scope);
public boolean attachHost(DataStore store, HostScope scope, StoragePoolInfo existingInfo);
boolean attachZone(DataStore dataStore, ZoneScope scope);
public boolean dettach();
public boolean unmanaged();
public boolean maintain(DataStore store);
public boolean cancelMaintain(DataStore store);
public boolean deleteDataStore(DataStore store);
}
Life Cycle – Interface
@Override
public DataStore initialize(Map<String, Object> dsInfos) {
String url = (String)dsInfos.get("url");
String uuid = getUuid(); // maybe base this off of something already unique
Long zoneId = (Long)dsInfos.get("zoneId");
String storagePoolName = (String) dsInfos.get("name");
String providerName = (String)dsInfos.get("providerName");
PrimaryDataStoreParameters parameters = new PrimaryDataStoreParameters();
parameters.setHost("10.10.7.1"); // really get from URL
parameters.setPort(3260); // really get from URL
parameters.setPath(url);
parameters.setType(StoragePoolType.IscsiLUN);
parameters.setUuid(uuid);
parameters.setZoneId(zoneId);
parameters.setName(storagePoolName);
parameters.setProviderName(providerName);
return dataStoreHelper.createPrimaryDataStore(parameters);
}
Life Cycle – Implementation
 Must implement the PrimaryDataStoreDriver interface.
 Your opportunity to create or delete a volume and to add a row to or delete a row
from the cloud.volumes table.
 A single instance of this class is responsible for creating and deleting volumes on all
storage systems of the same type.
Driver – About
public interface PrimaryDataStoreDriver extends DataStoreDriver {
public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCmdResult> callback);
public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CommandResult> callback);
}
public interface DataStoreDriver {
public String grantAccess(DataObject data, EndPoint ep);
public boolean revokeAccess(DataObject data, EndPoint ep);
public Set<DataObject> listObjects(DataStore store);
public void createAsync(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback);
public void deleteAsync(DataObject data, AsyncCompletionCallback<CommandResult> callback);
public void copyAsync(DataObject srcdata, DataObject destData, AsyncCompletionCallback<CopyCommandResult> callback);
public boolean canCopy(DataObject srcData, DataObject destData);
public void resize(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback);
}
Driver – Interface
public void createAsync(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback) {
String iqn = null;
try {
VolumeInfo volumeInfo = (VolumeInfo)data;
iqn = createSolidFireVolume(volumeInfo);
VolumeVO volume = new VolumeVO(volumeInfo);
volume.setPath(iqn);
volumeDao.persist(volume);
} catch (Exception e) {
s_logger.debug("Failed to create volume (Exception)", e);
}
CreateCmdResult result = new CreateCmdResult(iqn, errMsg == null ? data.getSize() : null);
result.setResult(errMsg);
callback.complete(result);
}
Driver – Implementation
Ask the CS MS to provide a list of all storage providers
http://127.0.0.1:8080/client/api?command=listStorageProviders&type=primary&response=json
Ask the CS MS to add a Primary Storage (a row in the cloud.storage_pool table) based on your
plug-in (ex: make CloudStack aware of a SolidFire SAN)
http://127.0.0.1:8080/client/api?command=createStoragePool&scope=zone&zoneId=a7af53b4-ec15-
4afc-a9ee-
8cba82b43474&name=SolidFire_831569365&url=MVIP%3A192.168.138.180%3BSVIP%3A10.10.7.1
&provider=SolidFire&response=json
Ask the CS MS to provide a list of all Primary Storages
http://127.0.0.1:8080/client/api?command=listStoragePools&response=json
API Calls
 Need support for root disks. At the moment, the framework is mainly focused on data
disks.
 Need code to create datastores on ESX hosts and shared mount points on KVM hosts
(we already have logic to create storage repositories on XenServer hosts).
 Speaking in terms of XenServer (but true for other hypervisors), when a volume is
attached or detached, we need logic in place that handles zone-wide storage.
 No GUI support yet to add a provider...must be done with the API.
What’s left to do?
Trivia
Question
The framework treats the default
storage behavior as a plug-in
Why?
1620 Pearl Street,
Boulder, Colorado 80302
Phone: 720.523.3278
Email: info@solidfire.com
www.solidfire.com
Slides: http://www.slideshare.net/SolidFireInc/cloudstack-meetup-santa-clara

More Related Content

PPTX
CloudStack Meetup Santa Clara
PPTX
Hazelcast
PPTX
A Groovy Kind of Java (San Francisco Java User Group)
PDF
JSR107 State of the Union JavaOne 2013
PPTX
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
PPTX
Enrique lima azure-it-pro-ps
PDF
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
PDF
JavaOne 2014: Taming the Cloud Database with jclouds
CloudStack Meetup Santa Clara
Hazelcast
A Groovy Kind of Java (San Francisco Java User Group)
JSR107 State of the Union JavaOne 2013
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
Enrique lima azure-it-pro-ps
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
JavaOne 2014: Taming the Cloud Database with jclouds

What's hot (14)

PDF
MongoDB Sharding
PDF
MySQL Enterprise Backup - BnR Scenarios
PDF
Altinity Quickstart for ClickHouse
PDF
Advanced Data Modeling with Apache Cassandra
PDF
Introduction to Data Modeling with Apache Cassandra
PDF
gDBClone - Database Clone “onecommand Automation Tool”
PPT
Android - Api & Debugging in Android
PDF
Coursera Cassandra Driver
PDF
ODA Backup Restore Utility & ODA Rescue Live Disk
PDF
Cassandra 3.0 Data Modeling
PPTX
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
PDF
Paris Cassandra Meetup - Cassandra for Developers
PPTX
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...
PDF
分散DB Apache Kuduのアーキテクチャ DBの性能と一貫性を両立させる仕組み 「HybridTime」とは
MongoDB Sharding
MySQL Enterprise Backup - BnR Scenarios
Altinity Quickstart for ClickHouse
Advanced Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
gDBClone - Database Clone “onecommand Automation Tool”
Android - Api & Debugging in Android
Coursera Cassandra Driver
ODA Backup Restore Utility & ODA Rescue Live Disk
Cassandra 3.0 Data Modeling
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
Paris Cassandra Meetup - Cassandra for Developers
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...
分散DB Apache Kuduのアーキテクチャ DBの性能と一貫性を両立させる仕組み 「HybridTime」とは
Ad

Similar to Storage Plug-ins (20)

PPTX
CloudStack Meetup London - Primary Storage Presentation by SolidFire
PPTX
Solid fire cloudstack storage overview - CloudStack European User Group
PDF
Jetpack, with new features in 2021 GDG Georgetown IO Extended
PDF
Droidcon Paris 2015
PPTX
The Best Way to Become an Android Developer Expert with Android Jetpack
PDF
Spring.io
PPT
Spring and Cloud Foundry; a Marriage Made in Heaven
PDF
Architecture components - IT Talk
PDF
Architecture Components
PPTX
struts unit best pdf for struts java.pptx
PPTX
struts unit best pdf for struts java.pptx
PDF
Level Up Your Integration Testing With Testcontainers
PDF
From Zero to Cloud in 12 Easy Factors
PPTX
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
PDF
Con4445 jesus
PDF
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
ODP
Guaranteeing CloudStack Storage Performance
KEY
Django deployment with PaaS
PDF
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...
PDF
Elastic and Cloud-ready Applications with Payara Micro
CloudStack Meetup London - Primary Storage Presentation by SolidFire
Solid fire cloudstack storage overview - CloudStack European User Group
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Droidcon Paris 2015
The Best Way to Become an Android Developer Expert with Android Jetpack
Spring.io
Spring and Cloud Foundry; a Marriage Made in Heaven
Architecture components - IT Talk
Architecture Components
struts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptx
Level Up Your Integration Testing With Testcontainers
From Zero to Cloud in 12 Easy Factors
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Con4445 jesus
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Guaranteeing CloudStack Storage Performance
Django deployment with PaaS
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...
Elastic and Cloud-ready Applications with Payara Micro
Ad

More from buildacloud (20)

PDF
The Future of SDN in CloudStack by Chiradeep Vittal
PPTX
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapati
PDF
L4-L7 services for SDN and NVF by Youcef Laribi
POTX
Jenkins, jclouds, CloudStack, and CentOS by David Nalley
PPTX
Intro to Zenoss by Andrew Kirch
ODP
Guaranteeing Storage Performance by Mike Tutkowski
PDF
Cloud Application Blueprints with Apache Brooklyn by Alex Henevald
PPT
Introduction to Apache CloudStack by David Nalley
PDF
Managing infrastructure with Application Policy by Mike Cohen
PPTX
Intro to Zenoss by Andrew Kirch
PPTX
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
PDF
Rest api design by george reese
PPTX
Enterprise grade firewall and ssl termination to ac by will stevens
PDF
State of the cloud by reuven cohen
PDF
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
PPTX
DevCloud - Setup and Demo on Apache CloudStack
PDF
Cloud Network Virtualization with Juniper Contrail
PPTX
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
PDF
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
PPT
CloudStack University by Sebastien Goasguen
The Future of SDN in CloudStack by Chiradeep Vittal
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapati
L4-L7 services for SDN and NVF by Youcef Laribi
Jenkins, jclouds, CloudStack, and CentOS by David Nalley
Intro to Zenoss by Andrew Kirch
Guaranteeing Storage Performance by Mike Tutkowski
Cloud Application Blueprints with Apache Brooklyn by Alex Henevald
Introduction to Apache CloudStack by David Nalley
Managing infrastructure with Application Policy by Mike Cohen
Intro to Zenoss by Andrew Kirch
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
Rest api design by george reese
Enterprise grade firewall and ssl termination to ac by will stevens
State of the cloud by reuven cohen
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
DevCloud - Setup and Demo on Apache CloudStack
Cloud Network Virtualization with Juniper Contrail
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
CloudStack University by Sebastien Goasguen

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Empathic Computing: Creating Shared Understanding
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
NewMind AI Monthly Chronicles - July 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Weekly Chronicles - August'25 Week I
Digital-Transformation-Roadmap-for-Companies.pptx
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
Empathic Computing: Creating Shared Understanding
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Storage Plug-ins

  • 1. Storage Plug-ins!!! Plug-in preview for the new storage frameworks with SolidFire
  • 2. Mike Tutkowski • Lead Open Source Developer @SolidFire • Dedicated to CloudStack Development McClain Buggle • Strategic Alliance Manager @SolidFire Who are these guys?
  • 4.  Cloud is happening NOW  Pain points are REAL  LACK of viable alternatives  Opportunity is MASSIVE  AWS is not standing still Why the Urgency Around CloudStack?
  • 5. ApplicationValue/Margin High Med Low IOPS What is the opportunity? Low Hig h Performance Sensitive Apps CRM / ERP / Database Messaging / Productivity Desktop Performance Sensitivity $$$ $$ $ Applications Dev / Test Backup / Archive
  • 6. We’ve seen this movie before... $- $100 $200 $300 $400 $500 $600 $700 $800 $900 $1,000 2002 2003 2004 2005 2006 2007 x86 Virtualiza on -- VMware License Revenue ($M) x86 Virtualization – The Test/Dev Era
  • 7. Is this a re-run? 0.00 100.00 200.00 300.00 400.00 500.00 600.00 700.00 800.00 900.00 2006 2007 2008 2009 2010 2011 AWS S3 Objects (Millions) Cloud Computing – The Test/Dev Era
  • 8. Why yes, it is! 0 100 200 300 400 500 600 700 800 900 $0 $100 $200 $300 $400 $500 $600 $700 $800 $900 $1,000 YR1 YR2 YR3 YR4 YR5 YR6 x86 Virtualiza on -- VMware License Revenue ($M) Cloud -- Amazon S3 Objects (Billions) The Test/Dev Era – x86 Virtualization vs. Cloud Computing
  • 9. x86 Virtualization This movie ended well… x86 Virtualization – From Test/Dev to Production 0 200 400 600 800 1000 1200 1400 1600 1800 2000 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 x86 Virtualiza on -- VMware License Revenue ($M)
  • 10. Cloud Computing This ending is still being written The Test/Dev Era The Produc on Era The Production Era Opportunity: x86 Virtualization vs. Cloud
  • 11. How do we influence the outcome? Margin High Med Low IOPS Low Hig h Performance Sensitive Apps CRM / ERP / Database Messaging / Productivity Desktop Performance Sensitivity $$$ $$ $ Applications Dev / Test Backup / Archive Key Cloud Infrastructure Innovations • Availability • Performance • Quality-of-Service • Scalability • Automation
  • 12. • Storage is a major pain-point in most early-cloud deployments • Unpredictable Performance • Not designed for Multi-tenancy • Storage a key underpinning to successful application deployments • Today = Backup/Archive, Dev/Test • Tomorrow = Mission & Business Critical Applications What does this have to do with CloudStack?
  • 13. Where we are today with a storage plug-in
  • 14. Primary Storage in CloudStack
  • 15. CloudStack was not designed for dynamic provisioning and does not leverage vendor unique storage features within the framework. For SolidFire we are interested in features that allow users to select minimum, maximum, and burst IOPS for a given volume. Use Cases for a CloudStack Plug-In
  • 16. Ability to defer the creation of a volume until the moment the end user elects to execute a Compute or Disk Offering. Still have CS Admin configure the Primary Storage, but now it is based on a plug-in instead of on a pre-existing storage volume. No requirement on part of the CSP to write orchestration logic. My Specific Needs from the Plug-in
  • 17. A CloudStack storage plug-in is divided into three components: Provider: Logic related to the plug-in in general (ex: name of plug-in). Life Cycle: Logic related to life cycle (ex: creation) of a given storage system (ex: a single SolidFire SAN). Driver: Logic related to creating and deleting volumes on the storage system. Must add a dependency in the client/pom.xml file as such: <dependency> <groupId>org.apache.cloudstack</groupId> <artifactId>cloud-plugin-storage-volume-solidfire</artifactId> <version>${project.version}</version> </dependency> So…how do you actually make a plug-in?
  • 18.  Must implement the PrimaryDataStoreProvider interface.  Provides CloudStack with the plug-in's name as well as the Life Cycle and Driver objects the storage system uses.  Must be listed in the applicationContext.xml.in file (Spring Framework related).  A single instance of this class is created for CloudStack. Provider – About
  • 19. public interface PrimaryDataStoreProvider extends DataStoreProvider { } public interface DataStoreProvider { public static enum DataStoreProviderType { PRIMARY, IMAGE } public DataStoreLifeCycle getDataStoreLifeCycle(); public DataStoreDriver getDataStoreDriver(); public HypervisorHostListener getHostListener(); public String getName(); public boolean configure(Map<String, Object> params); public Set<DataStoreProviderType> getTypes(); } Provider – Interface
  • 20. public class SolidfirePrimaryDataStoreProvider implements PrimaryDataStoreProvider { private final String providerName = "SolidFire"; protected PrimaryDataStoreDriver driver; protected HypervisorHostListener listener; protected DataStoreLifeCycle lifecyle; @Override public String getName() { return providerName; } @Override public DataStoreLifeCycle getDataStoreLifeCycle() { return lifecyle; } @Override public boolean configure(Map<String, Object> params) { lifecyle = ComponentContext.inject(SolidFirePrimaryDataStoreLifeCycle.class); driver = ComponentContext.inject(SolidfirePrimaryDataStoreDriver.class); listener = ComponentContext.inject(DefaultHostListener.class); return true; } Provider – Implementation
  • 21. Notes:  client/tomcatconf/applicationContext.xml.in  Each provider adds a single line.  “id” is only used by Spring Framework (not by CS Management Server). Recommend just providing a descriptive name. Example: <bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl" /> <bean id="solidFireDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider" /> Provider – Configuration
  • 22.  Must implement the PrimaryDataStoreLifeCycle interface.  Handles the creation, deletion, etc. of a storage system (ex: SAN) in CloudStack.  The initialize method of the Life Cycle object adds a row into the cloud.storage_pool table to represent a newly added storage system. Life Cycle – About
  • 23. public interface PrimaryDataStoreLifeCycle extends DataStoreLifeCycle { } public interface DataStoreLifeCycle { public DataStore initialize(Map<String, Object> dsInfos); public boolean attachCluster(DataStore store, ClusterScope scope); public boolean attachHost(DataStore store, HostScope scope, StoragePoolInfo existingInfo); boolean attachZone(DataStore dataStore, ZoneScope scope); public boolean dettach(); public boolean unmanaged(); public boolean maintain(DataStore store); public boolean cancelMaintain(DataStore store); public boolean deleteDataStore(DataStore store); } Life Cycle – Interface
  • 24. @Override public DataStore initialize(Map<String, Object> dsInfos) { String url = (String)dsInfos.get("url"); String uuid = getUuid(); // maybe base this off of something already unique Long zoneId = (Long)dsInfos.get("zoneId"); String storagePoolName = (String) dsInfos.get("name"); String providerName = (String)dsInfos.get("providerName"); PrimaryDataStoreParameters parameters = new PrimaryDataStoreParameters(); parameters.setHost("10.10.7.1"); // really get from URL parameters.setPort(3260); // really get from URL parameters.setPath(url); parameters.setType(StoragePoolType.IscsiLUN); parameters.setUuid(uuid); parameters.setZoneId(zoneId); parameters.setName(storagePoolName); parameters.setProviderName(providerName); return dataStoreHelper.createPrimaryDataStore(parameters); } Life Cycle – Implementation
  • 25.  Must implement the PrimaryDataStoreDriver interface.  Your opportunity to create or delete a volume and to add a row to or delete a row from the cloud.volumes table.  A single instance of this class is responsible for creating and deleting volumes on all storage systems of the same type. Driver – About
  • 26. public interface PrimaryDataStoreDriver extends DataStoreDriver { public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCmdResult> callback); public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CommandResult> callback); } public interface DataStoreDriver { public String grantAccess(DataObject data, EndPoint ep); public boolean revokeAccess(DataObject data, EndPoint ep); public Set<DataObject> listObjects(DataStore store); public void createAsync(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback); public void deleteAsync(DataObject data, AsyncCompletionCallback<CommandResult> callback); public void copyAsync(DataObject srcdata, DataObject destData, AsyncCompletionCallback<CopyCommandResult> callback); public boolean canCopy(DataObject srcData, DataObject destData); public void resize(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback); } Driver – Interface
  • 27. public void createAsync(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback) { String iqn = null; try { VolumeInfo volumeInfo = (VolumeInfo)data; iqn = createSolidFireVolume(volumeInfo); VolumeVO volume = new VolumeVO(volumeInfo); volume.setPath(iqn); volumeDao.persist(volume); } catch (Exception e) { s_logger.debug("Failed to create volume (Exception)", e); } CreateCmdResult result = new CreateCmdResult(iqn, errMsg == null ? data.getSize() : null); result.setResult(errMsg); callback.complete(result); } Driver – Implementation
  • 28. Ask the CS MS to provide a list of all storage providers http://127.0.0.1:8080/client/api?command=listStorageProviders&type=primary&response=json Ask the CS MS to add a Primary Storage (a row in the cloud.storage_pool table) based on your plug-in (ex: make CloudStack aware of a SolidFire SAN) http://127.0.0.1:8080/client/api?command=createStoragePool&scope=zone&zoneId=a7af53b4-ec15- 4afc-a9ee- 8cba82b43474&name=SolidFire_831569365&url=MVIP%3A192.168.138.180%3BSVIP%3A10.10.7.1 &provider=SolidFire&response=json Ask the CS MS to provide a list of all Primary Storages http://127.0.0.1:8080/client/api?command=listStoragePools&response=json API Calls
  • 29.  Need support for root disks. At the moment, the framework is mainly focused on data disks.  Need code to create datastores on ESX hosts and shared mount points on KVM hosts (we already have logic to create storage repositories on XenServer hosts).  Speaking in terms of XenServer (but true for other hypervisors), when a volume is attached or detached, we need logic in place that handles zone-wide storage.  No GUI support yet to add a provider...must be done with the API. What’s left to do?
  • 30. Trivia Question The framework treats the default storage behavior as a plug-in Why?
  • 31. 1620 Pearl Street, Boulder, Colorado 80302 Phone: 720.523.3278 Email: info@solidfire.com www.solidfire.com Slides: http://www.slideshare.net/SolidFireInc/cloudstack-meetup-santa-clara