Cloud Service Automation CSA-OO best practices Kumar Oct 21, 2014
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Highlights • • • • • • • •
2
CSA supported Models Basic guidelines on Provider – Life cycle action OO flows CSA REST Calls in OO Error handling in OO flows OO flows and CSA timeouts OO content structure OO components versioning – topology Modify v/s Public actions
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
CSA concepts
3
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
CSA models CSA 4.x supports two model to develop design templates • Sequential model – Widely used, Control, flexible • Topology model – Descriptive, TOSCA standards, Time to value
4
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Sample design – lifecycle actions
5
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Service Design
6
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Basic guidelines on Life cycle action OO flows Initialize •
Action OO flows don't modify the provider,
•
Flows can validate information like availability, capacity, etc…
Reserve •
Action OO flows can modify the provider and secure the resource.
•
Flows should always record the resource and associate them to the service in the provider
Deploy •
Deploy flows, affect only the provider selected and the resource reserved
•
Action flows should not interact outside this envelope.
•
Deploy flows should provide information if data are modified in the resource provider
Un-Deploy •
Un-deploy, affect only the provider selected and the resource reserved, it should not interact outside this envelope.
•
Un-deploy should cancel out any modification done.
Un Reserve and Un-Initialize •
Un-reserve flows release the reserved resource completely, the state after release should be the same as before reserve.
•
Un-initialize, last validation and clean-up, can be used to validate if the previous operations did work.
7
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Service design – Topology
8
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
REST calls for specific properties • OO flows use REST calls to interact with CSA: – Provider info, Artifact info, Component properties, Service Offering details, Subscription details, Instance details, Billing etc. • XML document response can be bulky for few REST calls which can affect OO flows. OO flows serialize every step. • Use filters to narrow your results. – Scope = Baseplusone, detail =Template For example Get Instance details https://
:/csa/rest/user/myinstance Get Artifact details https://:/csa/rest/artifact
9
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
REST calls – artifact views Use Artifact views and fast views to retrieve property values
10
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Error handling – OO flows For each of the flows, catch the error and update CSA with two steps to update: • a variable that can be re-used by the failure flow • Set the CSA process status
11
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
OO flows and CSA timeouts Default timeouts • Every action has default timeout of 3600 sec. • Not every action completes in default time. • Enhancements to OO flows changes its deployment time.
Best Practice • Measure deployment action of OO flows and set timeout in CSA.
12
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Sequence structure
14
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
OO best practices – Topology model Components • Basic building blocks are components • OO flows are embraced as components
Interface • No more token interaction • No more REST calls from components into CSA
Component response • Results (Properties) are not stored on components • OO flow is block of operation with Inputs and Outputs to fulfill deployment
15
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Topology structure /Library/Integrations///…
16
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Modify subscription v/s public actions If Cloud services are charged, then Use Modify subscriptions. Service components goes through a Life cycle state change and are accounted during price calculations during billing
Use Public actions only to manage a component without a state change. Price is not impacted due to public actions
17
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.