Non-CDMI Content Type

advertisement
Getting Started with
StorageGRID CDMI
Integrations
January 2013
1
CDMI Support in StorageGRID 9.0
 Implements parts of CDMI 1.0.1
 Both CDMI Content Type (JSON-encoded)
and Non-CDMI Content Type (non-JSONencoded) operations
 Nameless objects only (no container)
 Objects identified by CDMI Object ID
NetApp DevCon 2012
2
Functional Coverage of CDMI
 Data Objects:
 create (i.e., ingest)
 read (i.e., retrieve) – all value bytes or byte-range
 update (CDMI user metadata only)
 delete
 Capability Objects:
 let CDMI clients discover what’s implemented in
StorageGRID 9.0
NetApp DevCon 2012
3
CDMI Operations Coverage at a Glance
C = CDMI Content Type, N = Non-CDMI Content Type
p = access by pathname, ID = access by Object ID
NetApp DevCon 2012
4
Integration with StorageGRID Object
Management
 Objects ingested through CDMI can be
accessed using SGAPI (i.e., HTTP API), and
vice versa
 CDMI Object ID maps easily to StorageGRID
UUID:
NetApp DevCon 2012
5
Integration with StorageGRID Object
Management (cont’d)
 CDMI Data Object user metadata can be used
in ILM (Information Lifecycle Management)
rule
 Example: if a CDMI object has user metadata
“foo” equals to “abc”, keep 2 copies on disk;
and then after 1 year, move to tape
NetApp DevCon 2012
6
Integration with StorageGRID Object
Management (cont’d)
 Administrative UI and tools provides:
 operation counters
 audit messages
 log messages
NetApp DevCon 2012
7
Hands-on Lab
NetApp Confidential - Internal Use Only
8
StorageGRID 9.0 CDMI Lab
 Try out CDMI operations against a live
StorageGRID instance
 Create, Read, Update, Delete on a CDMI
Data Object using CDMI Content Type
 Send CDMI HTTP requests to the
StorageGRID server
NetApp DevCon 2012
9
StorageGRID 9.0 CDMI Lab
 Tools required:
 OpenSSL
 Curl
 Bash
 NetApp CDMI Toolbox
NetApp DevCon 2012
10
NetApp CDMI Toolbox
 Free Download at NetApp Community:
https://communities.netapp.com/docs/DOC18817 (registration required)
 Handy for:
 composing basic StorageGRID CDMI requests
 conversion between CDMI Object ID and
StorageGRID UUID
NetApp DevCon 2012
11
StorageGRID CDMI Root URI
 StorageGRID CDMI root URI is “/CDMI/”
 So the complete URL is like
https://<server IP>:<port>/CDMI/cdmi_objectid/
NetApp DevCon 2012
12
Exercise 1: Create an Object using CDMI
Content Type
 Start OpenSSL in Git Bash window:
openssl s_client -connect 192.168.168.128:8080 -quiet
 Enter server IP (192.168.168.128) into CDMI
Toolbox:
 Click:
NetApp DevCon 2012
13
Exercise 1: Create an Object using CDMI
Content Type (cont’d)
 HTTP request generated:
POST /CDMI/cdmi_objectid/ HTTP/1.1
Host: 192.168.128.128:8080
Accept: application/cdmi-object
Content-Type: application/cdmi-object
Content-Length: 231
X-CDMI-Specification-Version: 1.0.1
{
"domainURI" : "/cdmi_domains/",
"metadata" : {
"a" : "A",
"ab" : "AB",
"b" : "B"
},
"mimetype" : "text/plain; charset=utf-8",
"valuetransferencoding" : "utf-8",
"value" : "Hello"
}
NetApp DevCon 2012
14
Exercise 1: Create an Object using CDMI
Content Type (cont’d)
 Copy and paste HTTP request into OpenSSL:
NetApp DevCon 2012
15
Exercise 2: Read an Object using CDMI
Content Type
 Copy the ID of the object just created from the
previous HTTP response:
 Paste into CDMI Toolbox:
 Click:
NetApp DevCon 2012
16
Exercise 3: Update User Metadata of an
Object using CDMI Content Type
 Click:
 Modify JSON body to:
{
"metadata" : {
"greetings" : "Hello, world"
}
}
NetApp DevCon 2012
17
Exercise 4: Delete an Object using CDMI
Content Type
 Click:
NetApp DevCon 2012
18
Developer Resources
 SNIA CDMI Specification
http://www.snia.org/tech_activities/standards/curr_sta
ndards/cdmi
 NetApp Community
https://communities.netapp.com/community/interfaces
_and_tools/developer/cr/content
 CDMI Toolbox
 CDMI Reference
 StorageGRID API Reference
NetApp DevCon 2012
19
NetApp DevCon 2012
20
Download