370 likes | 497 Views
TOSCA Normative Types Proposal. Internal Working Draft v0.5 Submitter: Matt Rutkowski. Proposed Normative (Base) Node Types – Viewed as “layers”. Structural Types. <none>: RootNodeType – Part 1. Definition: The fundamental type that all TOSCA NodeTypes derive from.
E N D
TOSCA Normative Types Proposal Internal Working Draft v0.5 Submitter: Matt Rutkowski
<none>: RootNodeType – Part 1 Definition: The fundamental type that all TOSCA NodeTypes derive from. * Cells shaded in blue indicate suggested new interfaces (operations that correspond to “compute” and “storage”
<none>: RootNodeType – Part 2 Definition: The fundamental type that all TOSCA NodeTypes derive from. The set of Potential InstanceState values available for any node: • Notes: • If lifecycle operations are sequential (i.e. rely upon script completion) then perhaps allowing operations for “transitional” states do not make sense. • Seems to help “imperative” models more so than declarative
RootNodeType:Tier (this is a “grouping” type) Definition A tier is a topological concept used to describe sets of nodes (or sub-topologies) that can be deployed and managed as a single logical processing element with specific scalability, availability and other group-wise semantics while supporting a specific kind of application processing (sometimes referred to as “roles”). Tiers that support the same kind of application processing are substitutable. The application processing capability of a tier is a function of the kinds of application components which are hosted by its constituent compute elements. The tier’s scaling discipline defines how and when the capacity of the tier is adjusted. * This is primarily a grouping concept for scaling. Is there a better way?
RootNodeType: Compute (formerly Server) Definition An instantiated compute resource that encapsulates both CPU and Memory. Ideally, this would support a “built-in” host OS (or platform API), as many typical / common use cases assume one.
RootNodeType: Storage Definition TBD
RootNodeType: Network Definition TBD
RootNodeType: OperatingSystem (Optionally merge as a property of “Compute” Node Type) Definition TBD – This is typically a guest OS. Ideally, if indeed for 99% of use cases it is simply an OSType and version would like to flatten this conceptually as properties on Server/VM
RootNodeType: WebServer Definition TBD – Ideally, would like to move towards an “Application Runtime” (indicates additive APIs / language to the OS) since that is its primary purpose.
RootNodeType: DBMS Definition TBD
RootNodeType: SoftwareComponent Definition Provides a simple means to define a generic software component to be modeled and referenced while allowing scripts to be invoked, etc. (Chef cookbooks run etc.) as part of the topology.
RootNodeType: WebApplication Definition TBD – “Web” is unecessary, any “Application” with exported endpoints is valid, perhaps just use “Application”
RootNodeType: Database Definition TBD
Composite Node Types (Need mechanism for compositing nodes for substitution)
SugarCRM with abstract Layers (Node Types) allowing substitution AppLayer (Composite NodeType) (as a Service Template) SugarCRMApp Web Application SugarCRMApp Web Application DependsOn hostedOn DependsOn hostedOn • PaaSLayer(Composite NodeType) • (as a Service Template) • At its simplest a, • “ApplicationRuntime” environment PaaSLayer Layer == PHPModule Apache Module Apache WebServer DependsOn hostedOn hostedOn IaaSLayer(Composite NodeType) (as a Service Template) IaaSLayer Layer Linux Operating System == hostedOn 1..n VM (Nova) Compute Storage (Cinder) Storage Public (Quantum) Network
RootNodeType: ApplicationRuntime(Composite Runtime Environment) Definition Implies a WebServer + one or more LangaugeRuntimes (e.g. PHP, Java, etc.)?
<none>: RootRelationshipType Definition The fundamental type that all TOSCA RelationshipTypes derive from.
RootRelationshipType: HostedOn • Definition • Relationship that indicates a node can “host” or contain another node of a specified type. For example: • aDatabase node is “hostedOn” a DBMS (Database Management System) node • a WebServer node is “hostedOn” a n OperatingSystem node.
RootRelationshipType: ConnectsTo • Definition • Relationship that indicates a node can “connect” to another node of a specified type. For example: • A WebApplication node “connectsTo” a Database node. Known Subclasses IPEndpointRequreiment, HTTPEndpointRequirement, IPEndpointCapability, HTTPEndpointCapability Can we not flatten??? Using properties such as “protocol” (or protocol list?)
RootRelationshipType: DependsOn • Definition • Relationship that indicates a node is “dependent” on another node of a specified type. For example: • A PHP runtime “dependsOn”an Apache web server
<none>: RootArtifactType Definition The fundamental type that all TOSCA Artifact Types derive from. • Known Subclasses • name="ScriptArtifact" • PropertiesDefinition element="tns:ScriptArtifactProperties" • name="FileArtifact“ • None • name="ArchiveArtifact“ • PropertiesDefinition element="tns:ArchiveArtifactProperties" • name="OsPackageArtifact“ • PropertiesDefinition element="tns:OsPackageArtifactProperties“ • name="UserContentArtifact“ • PropertiesDefinition element="tns:UserContentArtifactProperties“ • name="RPMGroupArtifact“ • PropertiesDefinition element="tns:RPMGroupArtifactProperties"
SugarCRM Variant Use Cases
Advanced SugarCRM Scenario: SugarCRM with Networking SugarCRMApp Web Application SugarCRM Database Database DependsOn hostedOn hostedOn PHPModule Apache Module Apache WebServer MySQL DBMS ConnectsTo hostedOn hostedOn hostedOn ApacheLinuxOS Operating System MySqlLinuxOS Operating System hostedOn hostedOn 1 1..n ApacheVM Compute MySqlVM Server DependsOn DependsOn hostedOn hostedOn WebTier ScalableTier DBTier Tier Public Network Private Network
Advanced SugarCRM Scenario: SugarCRM with Storage SugarCRMApp Web Application SugarCRM Database Database DependsOn hostedOn hostedOn PHPModule Apache Module Apache WebServer MySQL DBMS ConnectsTo hostedOn hostedOn hostedOn ApacheLinuxOS Operating System MySqlLinuxOS Operating System hostedOn hostedOn 1 1..n ApacheVM Compute MySqlVM Server DependsOn DependsOn hostedOn hostedOn WebTier ScalableTier DBTier Tier Public Storage Private Strorage
TOSCA Service Template schema <ServiceTemplate id="...“ name="..."? ... substitutableNodeType="..."?> <BoundaryDefinitions> <Properties> <PropertyMappings> ... </PropertyMappings/> ? </Properties> ? <PropertyConstraints> … </PropertyConstraints> ? <Requirements> <Requirement name=“…”? ref="...REF"/> + </Requirements> ? <Capabilities> <Capability name=“…” ref="...REF"/> + </Capabilities> ? <Policies> ... </Policies> ? <Interfaces> <Interface name=“…"> <Operation name="xs:NCName"> ... </Operation> + </Interface> + </Interfaces> ? </BoundaryDefinitions> ? <TopologyTemplate> ( <NodeTemplateid=“…" name=“…”? type=“…“ minInstances=""? maxInstances=“…"?> <Properties> XML fragment </Properties> ? <PropertyConstraints> … </PropertyConstraints> ? <Requirements> <Requirement id="..." name="..." type="..."> + <Properties> XML fragment <Properties> ? <PropertyConstraints> … </PropertyConstraints> ? </Requirement> </Requirements> ? <Capabilities> <Capability id="..." name="..." type="..."> + <Properties> XML fragment <Properties> ? <PropertyConstraints> ... </PropertyConstraints> ? </Capability> </Capabilities> ? <DeploymentArtifacts> <DeploymentArtifact name=“…" artifactType=“…“ artifactRef=“…"?> artifact specific content ? </DeploymentArtifact> + </DeploymentArtifacts> ? </NodeTemplate> | <RelationshipTemplate id=“…" name=“…"? type=“…"> … </RelationshipTemplate> ) + </TopologyTemplate> </ServiceTemplate>
TOSCA Boundary Definitions Schema <BoundaryDefinitions> <Properties> XML fragment <PropertyMappings> <PropertyMappingserviceTemplatePropertyRef="...“ targetObjectRef="...REF“ targetPropertyRef="..."/> + </PropertyMappings/> ? </Properties> ? <PropertyConstraints> <PropertyConstraint property="...“ constraintType="xs:anyURI"> + constraint ? </PropertyConstraint> </PropertyConstraints> ? <Requirements> <Requirement name="..."? ref="...REF"/> + </Requirements> ? <Capabilities> <Capability name="..."? ref="...REF"/> + </Capabilities> ? <Policies> <Policy name="..."? policyType="...“ policyRef="..."?> policy specific content ? </Policy> + </Policies> ? <Interfaces> <Interface name="xs:NCName"> <Operation name="xs:NCName"> ( <NodeOperation nodeRef="...REF“ interfaceName="xs:anyURI“ operationName="xs:NCName"/> | <RelationshipOperationrelationshipRef="...REF“ interfaceName="xs:anyURI“ operationName="xs:NCName"/> | <Plan planRef="...REF"/> ) </Operation> + </Interface> + </Interfaces> ? </BoundaryDefinitions> ?
NodeType XML schema <NodeType name="xs:NCName" targetNamespace="xs:anyURI"? abstract="yes|no"?final="yes|no"?> <Tags> <Tag name="..." value="..."/> + </Tags> ? <DerivedFrom typeRef="..."/> ? <PropertiesDefinition element="..."? type="..."?/> ? <RequirementDefinitions> <RequirementDefinition name="..." requirementType="..." lowerBound="xs:integer"? upperBound="xs:integer | ..."?> <Constraints> <Constraint constraintType="xs:anyURI"> constraint type specific content </Constraint> + </Constraints> ? </RequirementDefinition> + </RequirementDefinitions> ? <CapabilityDefinitions> <CapabilityDefinition name="..." capabilityType="..." lowerBound="xs:integer"? upperBound="xs:integer | ..."?> <Constraints> <Constraint constraintType="xs:anyURI"> constraint type specific content </Constraint> + </Constraints> ? </CapabilityDefinition> + </CapabilityDefinitions> <InstanceStates> <InstanceState state="xs:anyURI"> + </InstanceStates> ? <Interfaces> <Interface name="xs:NCName | xs:anyURI"> <Operation name="xs:NCName"> <InputParameters> <InputParameter name="..." type="..." required="yes|no"?/> + </InputParameters> ? <OutputParameters> <OutputParameter name="..." type="..." required="yes|no"?/> + </OutputParameters> ? </Operation> + </Interface> + </Interfaces> ? </NodeType>
RelationshipType <RelationshipType name="xs:NCName" targetNamespace="xs:anyURI"? abstract="yes|no"? final="yes|no"?> + <Tags> <Tag name="..." value="..."/> + </Tags> ? <DerivedFrom typeRef="..."/> ? <PropertiesDefinition element="..."? type="..."?/> ? <InstanceStates> <InstanceState state="xs:anyURI"> + </InstanceStates> ? <SourceInterfaces> <Interface name="xs:NCName | xs:anyURI"> ... </Interface> + </SourceInterfaces> ? <TargetInterfaces> <Interface name="xs:NCName | xs:anyURI"> ... </Interface> + </TargetInterfaces> ? <ValidSource typeRef="..."/> ? <ValidTarget typeRef="..."/> ? <AbstractOperations> <Operation/> + </AbstractOperations> </RelationshipType>
Advanced Scenarios: “ScalableSugarCRM Web Application” Scalability DBTier Service Template WebTier Service Template ApacheLB LoadBalancer • “Tier” Node Types convey scalability • The “Web Application Tier” is declared Scalablewith upper bounds “n” instances • Note: the “Database Tier” remains a single instance • A Load Balancer node is added to the previous template to route requests among “Web Application Tier” instances • Both tiers are packaged into their own service templates permitting Substitution SugarCRMApp Web Application SugarCRM Database Database Apache WebServer MySQL DBMS ApacheLinuxOS Operating System MySqlLinuxOS Operating System ApacheVM Server MySqlVM Server 1 1..n DBTier Tier WebTier ScalableTier The range of instances would be a property of the “Tier” Node Type Components grouped into composable service templates.