EM 12c Cloud API - Oracle - Integrated Cloud Applications ... · PDF file– Template...
Transcript of EM 12c Cloud API - Oracle - Integrated Cloud Applications ... · PDF file– Template...
2/15/2013
1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1
Enterprise Manager 12c Cloud Management API
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2
� EM 12c Cloud Management Solution
� Cloud Management APIs
– Why use APIs?
– REST APIs
– Supported Operations
– Resource Models and Specifications
– Examples
– References and Industry Standards
Table of Contents
2/15/2013
2
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3
• Identify all IT assets• Decide apps, cost models,
policies, roles&• Consolidation planning (P2V,
P2E, DB, App..)• Setup infrastructure&• Setup shared services (IaaS,
DBaaS, PaaS, Apps)
• Assemble using shared components
• Test applications• Deploy apps through self
service GUI/API
• Self-Service resource management
• Cloud resource and request monitoring
• Application to Disk stack management
• Centralized incident and configuration management
• End-user , business-level , application monitoring
• Meter resource utilization and cloud usage
• Optionally chargeback to application owners, end-users, and/or business departments
• Optimize cloud performance, capacity, QOS, agility, geography, people, costs&
Plan
Setup
Build
Test
Deploy
Monitor
Manage
Meter &
Charge
Optimize
Applications andBusiness Services
Infrastructure as a Service
Platform as a Service
DBaaS MWaaS
Complete Cloud Lifecycle Management
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4
Self-Service Access, Metering & Chargeback
� Infrastructure-as-a-Service (IaaS)
– x86 and SPARC
� Platform-as-a-Service (PaaS)
– Database (DBaaS), Java,3.
– Physical and virtual environment support
� Application-to-Disk resource metering
� Chargeback/Showback
� Out-of-box Portal and RESTful APIs
2/15/2013
3
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5
Cloud Management API
� Integrate existing IT
infrastructures and resources
with cloud workflows
� Connecting different cloud
services together
� Create a custom self service
portal for cloud workflows
Why use APIs?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6
Cloud Management API Industry Standards Reducing friction among clouds
� Oracle Cloud Standards Team is participating in and driving adoption of Oracle Cloud
API in emerging industry cloud standards
� As these standards are released, adopted by ISO and receive market adoption Oracle
will implement for EM and other products
� Three Cloud API standards
� Cloud Storage: Cloud Data Management Interface (CDMI) from the Storage Networking
Industry Association (SNIA); recently adopted by ISO
� IaaS: Cloud Infrastructure Management Interface (CIMI) from the Distributed Management
Task Force (DMTF); Release 1.0 issued, release 1.1 in development.
� PaaS: Cloud Application Management for Platforms (CAMP) from the Organization for the
Advancement of Structured Information Standards (OASIS); release 1.0 in development.
2/15/2013
4
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7
Cloud Management API
� Deploying databases and Oracle VM assemblies from custom-built
self-service consoles
� Integration into a bigger orchestration flow, such as a provisioning
preceded with approval workflows
� Deploying databases and Oracle VM assemblies from service desks
� As a part of public clouds for integration with the tenant management
systems
Examples of when to use APIs
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8
Cloud Management API
� EM 12c exposes REST APIs for operations that can be performed by a cloud
self service user
� The RESTful API enables integration to perform the following:
– Browse templates that contain definitions and metadata of a logical unit of service
– Deploy a template into the cloud and form an IT topology on demand
– Perform operations (such as ONLINE, OFFLINE) on the resources
� The API is based on the HTTP (version 1.1) protocol and GET, POST, PUT,
and DELETE requests are all used
REST APIs
2/15/2013
5
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9
Cloud Management APIResource Models
� Representations of the resources that the API operates on
� Cloud resource representations are made up of name=value fields, encoded
using a JavaScript Object Notation (JSON) dictionary
� Each type of cloud resource has its own Internet Media Type
– application/oracle.com.cloud.<service_family>.Xxxxxxxx+json
� Cloud resources are organized by common service entities
– specific services (e.g. IaaS or DBaaS) extend common service entities
where appropriate
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10
Infrastructure as a Service (IaaS)
2/15/2013
6
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11
RequirementsInfrastructure as a Service on x86
� Licenses
– Oracle Cloud Management Pack for Oracle Database for Database Assemblies
– Oracle Cloud Management Pack for Oracle Middleware for Weblogic Assemblies
– Template provisioning is part of base Enterprise Manager
� Product Version:
– EM 12cR2
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.12
Resource ModelInfrastructure as a Service (IaaS)
• VM Template: Oracle VM
Template
• Assembly Template: Oracle
Virtual Assembly (OVA)
• VM: Guest Virtual Machine
• Assembly Instance: Result of
Oracle Virtual Assembly (OVA)
deployment
• IaaS Zone: IaaS Zone that allows
Oracle VM Template and OVA
deployments
2/15/2013
7
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.13
ResourceURI
[https://example.us.oracle.com]Media Type
Cloud /em/cloud application/oracle.com.cloud.common.Cloud+json
IaaS Zone /em/cloud/iaas/zone/<zone id> application/oracle.com.cloud.common.iaas.Zone+json
VM Template
[Service Template]/em/cloud/iaas/servicetemplate/vm/<template id> application/oracle.com.cloud.common.VMTemplate+json
Assembly Template
[Service Template]/em/cloud/iaas/servicetemplate/assembly/<template id> application/oracle.com.cloud.common.AssemblyTemplate+json
VM
[Service Instance]/em/cloud/iaas/server/byrequest/<request id> application/oracle.com.cloud.common.VM+json
Assembly Instance
[Service Instance]/em/cloud/iaas/assemblyrequest/<request id> application/oracle.com.cloud.common.AssemblyInstance+json
Resource ModelIaaS Resource Specifications
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14
Supported OperationsInfrastructure as a Service (IaaS)
� List all IaaS Zones in the Cloud
� List all Service Templates (are either VM Templates and Assembly Templates)
� List all Service Instances (are either VMs or Assembly Instances)
� Request Service Instances in a IaaS Zone
� Deploy VM Templates or Assembly Templates
� Change VM status
� Change VM size
� Delete Service Instances
2/15/2013
8
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15
Resource Description
Operations
GET POST PUT DELETE
Cloud Represents the user's starting view of all accessible resources ���� ���� ���� ����
IaaS ZoneIs an infrastructure boundary within which IaaS servicies can be
deployed. ���� ���� ���� ����
VM Template
[Service Template]
Represents an Oracle VM Template, which is essentially a
packaged virtual machine image ���� ���� ���� ����
Assembly Template
[Service Template]
Represents a multi-tier application packaging built using Oracle
Virtual Assembly (OVA) Builder tool. ���� ���� ���� ����
VM
[Service Instance]Represents a single Guest Virtual Machine ���� ���� ���� ����
Assembly Instance
[Service Instance]Represents one instance of an assembly deployment ���� ���� ���� ����
Supported OperationsInfrastructure as a Service (IaaS)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.16
There are two ways to
provision a VM:
1. POST to the IaaS Zone within
which the VM is to reside
Inputs:
• VM template
• CPU and Memory
• VM name prefix
• VNC and root passwords
ExamplesCreating a service instance: VM Creation
URL:https://example.oracle.com/em/cloud/iaas/zone/D73AF0D42C8459E11419862797D1F37D
Headers:Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json
Body:{"based_on":"/em/cloud/iaas/servicetemplate/vm/ oracle%3AdefaultService%3Aem%3Aprovisioning%3A1%3Acmp% 3AVirtualization%3ATemplate%3AC76CEB5563EA5E13E040578CDA817FAF%3A0.1",
"cpu" : [2,0],"memory" : "512","params":{"server_prefix":"ZONEPOST","vnc_password":"welcome1",
"root_password":"welcome1"}
}
2/15/2013
9
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.17
2. POST to the VM Template
from which the VM is to be
deployed
Inputs:
• IaaS Zone
• CPU and Memory
• VM name prefix
• VNC and root passwords
URL:https://example.oracle.com/em/cloud/iaas/servicetemplate/vm/oracle%3AdefaultServ
ice%3Aem%3Aprovisioning%3A1%3Acmp%3AVirtualization%3ATemplate%3AC76CEB5563EA5E13E040578CDA817FAF%3A0.1
Headers:Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=
Content-Type: application/oracle.com.cloud.common.VM+json
Body:{"zone":"/em/cloud/iaas/zone/D73AF0D42C8459E11419862797D1F37D",
"cpu" : [2,0],"memory" : "512","params":{"server_prefix":"STPOST","vnc_password":"welcome1",
"root_password":"welcome1"}
}
ExamplesCreating a service instance: VM Creation (Cont'd)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.18
The CPU and Memory of a VM
can be adjusted to increase or
decrease the capacity.
For example, to adjust the VM's
CPU to 1 vCPU and increase the
memory from 512 to 1024, a PUT
request can be issued.
ExamplesChanging VM Size
URL:https://example.oracle.com/em/cloud/iaas/server/vm/C5CA59AF9386975E8AEA45B0F04
0F095?resource_state
Headers:Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.VM+json
Body:{"cpu":[1,0], "memory":"1024"
}
EXAMPLE RESPONSE
{"resource_state" : {
"state" : "READY" ,"messages" : [
{"text" : "'PUT' resource operation on
'application/oracle.com.cloud.common.VM' identified by 'C5CA59AF9386975E8AEA45B0F040F095' is successfully submitted with reference '106'" ,
"date" : "2012-08-20T01:15:28+0000"}
]}
}
2/15/2013
10
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.19
Database as a Service (DBaaS)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20
� Licenses
– Oracle Cloud Management Pack for Oracle Database
� Product Version:
– EM 12cR2 with Oracle Cloud Application plug-in 12.1.0.4 and patch 16085618
– EM 12cR2 with Oracle Cloud Application plug-in 12.1.0.5*
RequirementsDatabase as a Service
*API support for Schema-aaS is planned
2/15/2013
11
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.21
Supported OperationsDatabase as a Service
� List all PaaS infrastructure zones (or just zone) used for DBaaS
� List all database service templates
� List all databases
– Deployed to a zone
– Deployed using a database service template
� Request databases by deploying service templates
� Monitor and manage databases
� Delete databases
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.22
DB Platform Template
• Database Service Template
DB Platform Instance
• Single Instance or RAC
Database
DBaaS Zone
• PaaS Infrastructure Zone
that allows Database requests
Resource ModelsDatabase as a Service
2/15/2013
12
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.23
Resource Description
Operations
GET POST PUT DELETE
CloudA cloud represents the user's starting view of all accessible
resources ���� ���� ���� ����
Service Family Type A service family type is a category of services that are offered
by the cloud. For example, IaaS, DBaaS, MWaaS, etc. These
categories are predefined.���� ���� ���� ����
DBaaS Zone
A DBaaS zone represents a logical boundary where the
resources may reside to support deployment of database
services���� ���� ���� ����
DB Platform Template
[Service Template]
A DB platform template represents the definition of the
deployable database service ���� ���� ���� ����
DB Platform Instance
[Service Instance]
A DB platform instance describes the metadata about
databases deployed using the service templates. ���� ���� ���� ����
Resource ModelsDBaaS REST Operations
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.24
ResourceURI
[https://example.us.oracle.com]Media Type
Cloud /em/cloud application/oracle.com.cloud.common.Cloud+json
Service Family Type/em/cloud/service_family_type/dbaas application/oracle.com.cloud.common.ServiceFamilyType+json
DBaaS Zone /em/cloud/dbaas/zone/<zone id> application/oracle.com.cloud.common.DbZone+json
DB Platform Template
[Service Template]/em/cloud/dbaas/dbplatformtemplate/<template id> application/oracle.com.cloud.common.DbPlatformTemplate+json
DB Platform Instance
[Service Instance]/em/cloud/dbaas/dbplatforminstance/byrequest/<request id> application/oracle.com.cloud.common.DbPlatformInstance+json
Resource ModelsDBaaS Resource Specifications
2/15/2013
13
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.25
There are two ways to
provision a Database
service:
1. POST to the DBaaS Zone on
which DB is to reside.
Inputs:
• DB platform template
• Request name
• Request description
• Master account username
and password
ExamplesCreating a DB Platform Instance: DB Creation
URL:https://example.oracle.com/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19
Headers:Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+jsonAccept: application/oracle.com.cloud.common.DbPlatformInstance+json
Body:{
"based_on": "/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456",
"name": "<Request name>","description": "<Request Description>","params":{
"username": "Master Account username for the DB",
"password": "Password for the Master Account on the DB"}
}
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.26
2. POST to the DB Platform
Template of which the DB is
to be based on.
Inputs:
• DBaaS Zone
• Request name
• Request description
• Master account username
and password
URL:https://example.oracle.com/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE04
0F00AEF252456
Headers:Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Content-Type: application/oracle.com.cloud.common.DbPlatformInstance+json
Accept: application/oracle.com.cloud.common.DbPlatformInstance+json
Body:{
"zone": "/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19",
"name": "<Request name>","description": "<Request Description>","params":{
"username": "Master Account username for the DB",
"password": "Password for the Master Account on the DB"}
}
ExamplesCreating a DB Platform Instance: DB Creation (Cont'd)
2/15/2013
14
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.27
The Database could be in
different states:
1. Scheduled
2. Creating
3. Ready / Running
4. Deleting
To get database status, perform
a GET on the DB Platform
Instance resource.
ExamplesGET Database Status
URL:https://example.oracle.com/em/cloud/dbaas/dbplatforminstance/byrequest/7
Headers:Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=Accept: application/oracle.com.cloud.common.DbPlatformInstance+json
EXAMPLE RESPONSE{
"uri": "/em/cloud/dbaas/dbplatforminstance/byrequest/7","name": "DBbbfc45.server1.example.com","resource_state":{
"state": "READY"
},"context_id": "7","media_type":
"application/oracle.com.cloud.common.DbPlatformInstance+json","status": "RUNNING",
"created": "2012-10-18 05:00:02","based_on":
/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456","connect_string":
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=server1.example.com)(
PORT=1521)))(CONNECT_DATA=(SID=DBbbfc45)))","database Type": "oracle_database","destination_zone":
"/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19","total_sessions": "28“ . . . .
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.28
Java as a Service (JaaS)
2/15/2013
15
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.29
� Licenses
– Oracle Cloud Management Pack for Oracle Middleware
� Product Version:
– EM 12cR2 with Oracle Cloud Application plug-in 12.1.0.5
RequirementsJava as a Service
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.30
Supported OperationsJava as a Service
� List all PaaS infrastructure zones (or just zone) used for JaaS
� List all Java Service Templates
� List all Java Instances
– Deployed to a zone
– Deployed using a Java Service Template
� Request Java Platform Instance by deploying service templates
� Monitor and manage Java Instance
� Delete Java Instance
2/15/2013
16
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.31
Supported Operations Java as a Service (cont’d)
� Deploy / un-deploy application to / from Java Instance
� Add / remove datasource for Java Instance
� Start / stop Java Instance
� Start / stop application
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.32
Java Platform Template
• Middleware Service
Template
Java Platform Instance
•Single Middleware
instance
JaaS Zone
• PaaS Infrastructure Zone
that allows Java requests
Resource ModelsJava as a Service
2/15/2013
17
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.33
Resource Description
Operations
GET POST PUT DELETE
CloudA cloud represents the user's starting view of all accessible
resources ���� ���� ���� ����
Service Family Type A service family type is a category of services that are offered
by the cloud. For example, IaaS, DBaaS, MWaaS, etc. These
categories are predefined.���� ���� ���� ����
JaaS Zone
A JaaS zone represents a logical boundary where the
resources may reside to support deployment of middleware
services���� ���� ���� ����
Java Platform Template
[Service Template]
A Java platform template represents the definition of the
deployable middleware service ���� ���� ���� ����
Java Platform Instance
[Service Instance]
A Java platform instance describes the metadata about
databases deployed using the service templates. ���� ���� ���� ����
Resource ModelsJaaS REST Operations
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.34
Resource Description
Operations
GET POST PUT DELETE
Application Instance
ComponentRepresents the application component in the software library ���� ���� ���� ����
Application Instance
Deployment
Represents an instance of the Component Deployed in a
Middleware ���� ���� ���� ����
Data Source Data Source instance created on the middleware ���� ���� ���� ����
Resource ModelsJaaS REST Operations
2/15/2013
18
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.35
ResourceURI
[https://example.us.oracle.com]Media Type
Cloud /em/cloud application/oracle.com.cloud.common.Cloud+json
Service Family Type /em/cloud/service_family_type/jaas application/oracle.com.cloud.common.ServiceFamilyType+json
JaaS Zone /em/cloud/jaas/zone/<zone id> application/oracle.com.cloud.common.Zone+json
JaaS Platform Template
[Service Template]/em/cloud/jaas/javaplatformtemplate/<template id> application/oracle.com.cloud.jaas.JavaPlatformTemplate+json
JaaS Platform Instance
[Service Instance]/em/cloud/jaas/javaplatforminstance/<instance id> application/oracle.com.cloud.jaas.JavaPlatformInstance+json
Resource ModelsJaaS Resource Specifications
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.36
ResourceURI
[https://example.us.oracle.com]Media Type
Application Instance
Component
/em/cloud/jaas/applicationinstancecomponent/<app
component id>
application/oracle.com.cloud.jaas.ApplicationInstanceComponent
+json
Application Instance
Deployment/em/cloud/jaas/applicationinstancedeployment/<instance id>
application/oracle.com.cloud.jaas.ApplicationInstanceDeploymen
t+json
Data Source /em/cloud/jaas/datasource/<datasource id> application/oracle.com.cloud.common.Zone+json
Resource ModelsJaaS Resource Specifications (Cont'd)
2/15/2013
19
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.37
POST on
JavaPlatformTemplate URI to
create JavaPlatformInstance
Inputs:
• Name
• zone
ExamplesCreating a
Java Platform Instance
POST Request /em/cloud/jaas/javaplatformtemplate/D016AADD465462ACE040F20AD18167BA
Host: example.us.oracle.com
Authorization: Basic xxxxxxx
Accept: application/oracle.com.cloud.jaas.JavaPlatformInstance+json
Content-Type: application/oracle.com.cloud.jaas.JavaPlatformInstance+json
Body
{
"name" : “accountsinstance",
"zone" : "/em/cloud/jaas/zone/A1B44A4EBCC4563125D9D0A3AAE4FD51"
}
Response:
{
"uri" : "/em/cloud/jaas/javaplatforminstancerequest/14" ,
"name" : “accountsinstance_Create_20120717_045804697" ,
"resource_state" : {
"state" : "INITIATED" ,
"messages" :
[
{
"text" : “progress" ,
“date" : "2012-07-17T09:16:13+0000"
}
]
} ,
"context_id": "1”,
"media_type": "application/oracle.com.cloud.jaas.JavaPlatformInstance+json" ,
"service_family_type": "jaas" ,
"status": "SCHEDULED"}
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.38
.
ExamplesGET JaaS Instance
GET on URL
httpd://example.oracle.com/em/cloud/jaas/javaplatforminstance/960A4A8244145EC7949303B4ECD650D
Headers
Authorization: Basic xxxxxxxAccept: application/oracle.com.cloud.jaas.JavaPlatformInstance+json
{
"uri" : "/em/cloud/jaas/javaplatforminstance/960A4A8244145EC7949303B4EC0" ,
"name" : "jb__sd_platform_12_24_2012_13_38_28" ,
"resource_state" : {
"state" : "READY"
} ,
"context_id" : "960A4A8244145EC7949303B4ECD650D0" ,
"media_type" : "application/oracle.com.cloud.jaas.JavaPlatformInstance+json" ,
"service_family_type" : "jaas" ,
"status" : "RUNNING" ,
"zone" : {
"uri" : "/em/cloud/jaas/zone/A1B44A4EBCC4563125D9D0A3AAE4FD51" ,
"name" : "Zone1" ,
"context_id" : "A1B44A4EBCC4563125D9D0A3AAE4FD51" ,
"media_type" : "application/oracle.com.cloud.jaas.Zone+json" ,
"service_family_type" : "jaas"
} ,
"based_on" : {
"uri" : "/em/cloud/jaas/javaplatformtemplate/D016AADD465462ACE040F20" ,
"name" : "PS4_LowHeapTemplate" ,
"context_id" : "D016AADD465462ACE040F20AD18167BA" ,
"media_type" : "application/oracle.com.cloud.jaas.JavaPlatformTemplate+json" ,
"service_family_type" : "jaas"
} ,
"data_sources" : {
"media_type" : "application/oracle.com.cloud.jaas.DataSource+json" ,
"total" : "0" ,
"elements" :
[ ]
} ,
"jdbc_drivers" :
[
"com.ddtek.jdbc.oracle.OracleDriver" ,
"oracle.jdbc.xa.client.OracleXADataSource" ,
"oracle.jdbc.OracleDriver" ,
"com.ddtek.jdbcx.oracle.OracleDataSource"
] ,
"server_count" : "1" ,
"application_instance_deployments" : {
"media_type" :
"application/oracle.com.cloud.jaas.ApplicationInstanceDeployment+json" ,
"total" : "0" ,
"elements" :
[ ]
}
}
2/15/2013
20
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.39
Metering/Showback API
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.40
emcli verb to retrieve
hourly data and perform:
• Rollup aggregation
• Integration with billing
systems
• Showback over sliding
time windows
Get Metering Data
emcli get_metering_data
[-start_date=<start date in mmddyyyy> [-end_date=<end_date in mmddyyyy>]] [ -
target_type=<target type> [-target_name= <target name> ] ] [ -cost_center=<cost center
name> ] [ -charge]
Example:
•emcli get_metering_data -start_date=01152011 -end_date=02152011 -
target_type=oracle_database: Returns metering information for all Oracle DB targets
(active or enabled in Chargeback) that are owned by the logged in user, starting from 15th
January 2011 until the 15th February 2011
•emcli get_metering_data -target_type=host target_name=my_host -
cost_center=organization1: Returns metering and charge information for "my_host" target
(of type host) for the current report cycle for "organization1" cost-center
2/15/2013
21
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.41
Using Oracle’s Open API’s and Industry Standard APIs APIs Allow Customers to Add Their Own Value
� As management applications are written to the API’s we comply with, the
application will work against multiple clouds
� Oracle strategy is to implement Oracle APIs first and Industry Standard
APIs as they mature and development schedules allow.
� Customer can feel secure in adopting our APIs without fear of being locked in –
competitors who do not implement standards cannot say this
� Standards enable portability
� allow data and compute workloads to move easily between clouds,
offering choice in best of breed offerings
� Standards also offer stability and discipline of version compatibility to the API
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.42
References
� Specifications and Standards
– Specific contributions have been made in
� Cloud Application Management for Platforms (CAMP) for PaaS
� Cloud Infrastructure Management Interface (CIMI) for IaaS
� Collateral
– Cloud Management Page on OTN
– Cloud Administration Guide
2/15/2013
22
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.43