Upload
johan-louwers
View
237
Download
0
Embed Size (px)
Citation preview
8/10/2019 Oracle DBaaS OEM WebServices
1/29
8/10/2019 Oracle DBaaS OEM WebServices
2/29
8/10/2019 Oracle DBaaS OEM WebServices
3/29
3Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1
A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
Example variable
Case(s)
Within the calling application users can request the creation of a
new database as a standalone action.
Within in overall flow in the calling application the need arises to
create a new database as part of a larger request flow. For
example creating application server, database server and deploy
an application.
8/10/2019 Oracle DBaaS OEM WebServices
4/29
4Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1
A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(S) Start of sub-flow for database creation.
Example variable
Input required.
A number of inputs are needed from a request form in the custom
calling application.
Inputs are specified in the next slides
8/10/2019 Oracle DBaaS OEM WebServices
5/29
5Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1
A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
URI :
/em/cloud/dbaas/dbplatformtemplate/ CC3BBB665A6BC6FFE040F00AEF252456
Request headers :
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=
Content-Type:application/oracle.com.cloud.common.DbPlatformInstance+json
BODY :
{
"zone": "/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19 ",
"name": "",
"description": "",
"params":
{
"username": "Master Account username for the DB","password": "Password for the Master Account on the DB",
"database_sid" : "Database SID" ,
"service_name" : "Name of the additional service to be created"
}
}
Example variable
8/10/2019 Oracle DBaaS OEM WebServices
6/29
8/10/2019 Oracle DBaaS OEM WebServices
7/29
8/10/2019 Oracle DBaaS OEM WebServices
8/298Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
Username:password
Username & password of the self service user (inside OEM) who is
requesting the new database to be created.
Needs to be provided from a free text fields in the custom request
form within the calling application
8/10/2019 Oracle DBaaS OEM WebServices
9/299Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
Zone ID
Needs to be provided as the value of a dropdown menu in the custom
request form within the calling application where the visible text is a
meaningful text to humans. (when only one zone is available this could be a static hiddenvalue in the form)
Can be delivered manually by DBaaS team or can be
queried via APIs
8/10/2019 Oracle DBaaS OEM WebServices
10/29
8/10/2019 Oracle DBaaS OEM WebServices
11/2911Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
Description
Description of the request.(possible naming convention 50 chars long & no special chars)
Needs to be provided from a free text field in the custom request form
within the calling application.
Will require java-script to enforce naming convention.
8/10/2019 Oracle DBaaS OEM WebServices
12/2912Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
Username (DB)
Master account username for the database. (possible naming convention 10 charslong & no special chars)
Needs to be provided from a free text field in the custom request form
within the calling application.
Will require java-script to enforce naming convention.
8/10/2019 Oracle DBaaS OEM WebServices
13/2913Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
Password (DB)
Master account password for the database. (possible naming convention min 8chars long, should include at least one capital let ter and a number)
Needs to be provided from a free password field in the custom
request form within the calling application.
Will require java-script to enforce naming convention.
8/10/2019 Oracle DBaaS OEM WebServices
14/2914Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
Service name
Service name for the database.(possible naming convention min 10 chars long, shouldall be capital letters, no special chars)
Needs to be provided from a free field in the custom request form
within the calling application.
Will require java-script to enforce naming convention.
8/10/2019 Oracle DBaaS OEM WebServices
15/2915Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
FQDN
FQDN of the EM12C server
8/10/2019 Oracle DBaaS OEM WebServices
16/2916Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(1) Call EM12C API (A)for database creation
curl example :
curl -k -u username:password-X POST -H "Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json" -d
"{\"zone\":\"/em/cloud/dbaas/zone/ 82CF1C28FA20A183C99D138FF8065F19 \",\"
name\":\"REQUEST_TESTDB\",\"description\":\ TEST DATABASE CREATE\",\"params\":{\"username\":\ TEST_ADMIN\",\"password\":\TEST_PASSWD\"
,\"service_name\":\"TESTNAME\"}}"
https://example.company.com:7799/em/cloud/dbaas/dbplatformtemplate/ CC3B
BB665A6BC6FFE040F00AEF252456
Example variable
Template ID
Needs to be provided as the value of a dropdown menu in the custom
request form within the calling application where the visible text is a
meaningful text to humans. (when only one template is available this could be a statichidden value in the form)
Can be delivered manually by DBaaS team or can be
queried via APIs
8/10/2019 Oracle DBaaS OEM WebServices
17/2917Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(2) Database creation takes, depending on the platform,
from a couple of seconds to a couple of minutes. Wait timer
for 3minutes is advised before continuing to the next step.
Example variable
8/10/2019 Oracle DBaaS OEM WebServices
18/2918Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
!! If the request is NOT completed return to step 2 !!
8/10/2019 Oracle DBaaS OEM WebServices
19/29
19Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
URI :
/em/cloud/dbaas/dbplatforminstance/byrequest/ 1171
Request headers :
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=
BODY :
!! ID from response message (A) !!
8/10/2019 Oracle DBaaS OEM WebServices
20/29
20Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
curl example :
curl -k -u username:password
https://example.company.com.nl:7799/em/cloud/dbaas/dbplatforminstance/b
yrequest/1171
Username:password
Username & password of the self service user (inside OEM) who is
requesting the new database to be created.
Is already provided as part of input for step 1 Needs to be provided
from a free text f ields in the custom request form within the calling
application
8/10/2019 Oracle DBaaS OEM WebServices
21/29
21Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
curl example :
curl -k -u username:password
https://example.company.com.nl:7799/em/cloud/dbaas/dbplatforminstance/b
yrequest/1171
FQDN
FQDN of the EM12C server
8/10/2019 Oracle DBaaS OEM WebServices
22/29
22Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
Sample response :
{
"uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/1171" ,
"name" : "REQUEST_TESTDB_CREATE_31_41" ,
"description" : "Create Database for \"REQUEST_TESTDB\"." ,"resource_state" : {
"state" : "CREATING"
} ,
"context_id" : "1171" ,
"media_type" :
"application/oracle.com.cloud.common.DbPlatformInstance+json" ,
"canonicalLink" :
"/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/
dbplatforminstance/byrequest/1171" ,
"status" : "IN_PROGRESS" ,
"created" : "2014-11-24 18:31:43.0"
}
!! Indicating creation is not ready, return to step 2 !!
8/10/2019 Oracle DBaaS OEM WebServices
23/29
23Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
Sample response :
{
"uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/1171" ,
"name" : "DBNAME.example.company.com" ,
"resource_state" : {"state" : "READY"
} ,
"context_id" : "1171" ,
"media_type" :
"application/oracle.com.cloud.common.DbPlatformInstance+json" ,
"canonicalLink" :
"/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/
dbplatforminstance/byrequest/1171" ,
"status" : "RUNNING" ,
"created" : "2014-11-24 18:40:41.0" ,
"based_on" :
"/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456" ,
"connect_string" :
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=somehost.examp
le.company.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTNAME.exampl
!! Indicating creation is done !!
8/10/2019 Oracle DBaaS OEM WebServices
24/29
24Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
Additional information.
Some examples of additional information in the response which can
be used in the calling application for next steps or to inform therequesting user.
Name : full database name
Created : creation date of database
connect_string : connection string for connecting to the database
master_username : username of the database master account
db_version : version of the database
standby_database_configured: standby database created (Boolean)
8/10/2019 Oracle DBaaS OEM WebServices
25/29
25Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(3) Call EM12C API (B)for database creation process status
Example variable
Additional information.
Some examples of additional information in the response which can
be used in the calling application for next steps or to inform therequesting user.
"measurable_attributes" :
[
{"name:"up_time,"value:"0,"units:"Hours} ,
{"name:"total_sga,"value:"4077.703,"units:"MB} ,
{"name:"available_space,"value:"1056.813,"units:"MB} ,
{"name:"cpu_utilization,"value:"0.071,"units:"%} ,
{"name:"total_memory,"value:"4253.839,"units:"MB} ,{"name:"db_time,"value:".117,"units:"CentiSeconds Per Second},
{"name":"cpu_count","value":"2","units":"Cores }
]
8/10/2019 Oracle DBaaS OEM WebServices
26/29
26Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
S
E
1 A
2
3 B
Calling application Oracle EM12C Sub-flow from calling application to request databases creation
(E) End of sub-flow for database creation.
Example variable
Next step.
The full end-to-end flow in the calling application can continue.
User could/should be informed on the details of the created database.
8/10/2019 Oracle DBaaS OEM WebServices
27/29
More information
8/10/2019 Oracle DBaaS OEM WebServices
28/29
28Copyright 2014 Capgemini. All rights reserved.
Capgemini : Database as a Service Johan Louwers. | 2014
EM12C APIDatabase creation
https://docs.oracle.com/cd/E24628_01/doc.121/e28814/dbaas_ssa_user_api.htm#EMCLO1148
https://docs.oracle.com/cd/E24628_01/doc.121/e28814/dbaas_ssa_user_api.htmhttps://docs.oracle.com/cd/E24628_01/doc.121/e28814/dbaas_ssa_user_api.htmhttps://docs.oracle.com/cd/E24628_01/doc.121/e28814/dbaas_ssa_user_api.htmhttps://docs.oracle.com/cd/E24628_01/doc.121/e28814/dbaas_ssa_user_api.htm8/10/2019 Oracle DBaaS OEM WebServices
29/29
The information contained in this presentation is proprietary.
2014 Capgemini. All rights reserved.Rightshoreis a trademark belonging to Capgemini.
www.capgemini.com
About Capgemini
With almost 140,000 people in over 40 countries, Capgemini is
one of the world's foremost providers of consulting, technology
and outsourcing services. The Group reported 2013 global
revenues of EUR 10.1 billion.
Together with its clients, Capgemini creates and delivers
business and technology solutions that fit their needs and drive
the results they want. A deeply multicultural organization,
Capgemini has developed its own way of working, theCollaborative Business Experience, and draws on
Rightshore, its worldwide delivery model.
Learn more about us at www.capgemini.com .
http://www.capgemini.com/http://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/rightshorerhttp://www.capgemini.com/about/how-we-work/rightshorerhttp://www.capgemini.com/http://www.capgemini.com/http://www.capgemini.com/http://www.capgemini.com/http://www.capgemini.com/http://www.capgemini.com/http://www.capgemini.com/about/how-we-work/rightshorerhttp://www.capgemini.com/about/how-we-work/rightshorerhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.capgemini.com/about/how-we-work/the-collaborative-business-experiencetmhttp://www.slideshare.net/capgeminihttp://www.youtube.com/capgeminihttp://www.twitter.com/capgeminihttp://www.linkedin.com/company/capgeminihttp://www.facebook.com/Capgeminihttp://www.capgemini.com/