Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

COSMOS SDD Topology

Talking points

  • How we define topology directly ties into how we resolve variables. Only top-level variables are visible in topology and how they are associated with resource instances are not defined by the SDD spec. In the case of the current implementation, we use "Name" as the identifier of the resource. For certain resources, "Name" is a valid property, but for others like CIM_FileSystem.Root in the example below, Name is mapped to Root for the purposes of resource resolution. The OASIS TC came up with Name/Property in topology before a resource model was decided upon. Given the use of Resource.Property as QNames for identifying logical resources and binding them with physical instances, should Name be abandoned all together?
  • Also highlighted in the example below is a jre resource with three potential physical instances depending upon scope. The SDD spec indicates that when logical resources may map to different physical resources (variable topologies) that each physical resource should be listed a separate logical resources in topology. Relevant SDD spec is cut/paste below. This is in section 4.2 paragraph 6 ...

1113 Some topologies are variable. That is, a particular set of logical resources of the same type in the
1114 topology might be associated with different physical resource instances or the same physical resource
1115 during deployment. In this case, a separate logical resource definition is created in topology for each
1116 possible physical resource instance. Uniqueness constraints can then be used to describe the conditions
1117 under which the separate resources can be associated with a single resource.

Additional feedback to the OASIS TC is that the Name element in ResourceType from the spec is ambiguous and in need of re-work. See "Name" in section 4.2.2.2 of the specification.

1199 Resource name is an identifying characteristic of the resource that correlates with a name
1200 for the resource in the deployment environment.
1201 The type of the Name element, VariableExpressionType, allows the resource name to be expressed
1202 as a simple string or in terms of a user input parameter or other variable.
1203 An example of a good use of a variable expression in Resource.Name is to make sure that the
1204 installation directory is hosted on a file system that has sufficient space available for deployment.
1205 In this example, the file system resource element would define a HostedResource element for the
1206 directory. The Name of the directory would be expressed as a variable expression that refers to a
1207 user input parameter for installation location. Content elements that use the installation directory
1208 would express a requirement on the directory and on the file system with the additional constraint
1209 that the file system have a certain amount of available space (to satisfy the consumption
1210 constraints). The fact that both resources are required and that they are defined with a hosts–
1211 hostedBy relationship in Topology, means that the directory that is used must be the installation
1212 directory and it must be hosted by a file system that meets the consumption constraint for
1213 available space.
1214 Only the Variable elements defined in a top level content element can be used to define a resource
1215 Name, because these are the only variables visible within Topology.
1216 If the name of a resource is changed during deployment, for example, during an update, then the
1217 resource name SHOULD NOT be included in the resource specification. Instead, the pre-update
1218 resource name SHOULD be specified in the RequiredBase element of the installable unit that
1219 provides the update, and the post-update name SHOULD be specified in the ResultingResource
1220 element of the same installable unit.

Example SDD

<sdd-dd:Topology>
    <sdd-dd:Resource id="os" type="sp:CIM_OperatingSystem">
        <sdd-dd:HostedResource id="preciseJre" type="sp:CIM_J2eeJVM">
            <sdd-dd:Property>
                <sdd-dd:PropertyName>sp:CIM_J2eeJVM.Version</sdd-dd:PropertyName>
                <sdd-dd:Value>$(preciseJreVersion)</sdd-dd:Value>
            </sdd-dd:Property>
        </sdd-dd:HostedResource>
        <sdd-dd:HostedResource id="minJre" type="sp:CIM_J2eeJVM">
            <sdd-dd:Property>
                <sdd-dd:PropertyName>sp:CIM_J2eeJVM.Version</sdd-dd:PropertyName>
                <sdd-dd:Value>$(minJreVersion)</sdd-dd:Value>
            </sdd-dd:Property>
        </sdd-dd:HostedResource>
        <sdd-dd:HostedResource id="maxJre" type="sp:CIM_J2eeJVM">
            <sdd-dd:Property>
                <sdd-dd:PropertyName>sp:CIM_J2eeJVM.Version</sdd-dd:PropertyName>
                <sdd-dd:Value>$(maxJreVersion)</sdd-dd:Value>
            </sdd-dd:Property>
        </sdd-dd:HostedResource>           
        <sdd-dd:HostedResource id="filesystem" type="sp:CIM_FileSystem">
            <sdd-dd:Property>
                <sdd-dd:PropertyName>sp:CIM_FileSystem.Root</sdd-dd:PropertyName>
                <sdd-dd:Value>$(installRoot)</sdd-dd:Value>
            </sdd-dd:Property>
            <sdd-dd:HostedResource id="installDir" type="sp:CIM_Directory">
                <sdd-dd:Property>
                    <sdd-dd:PropertyName>sp:CIM_Directory.Name</sdd-dd:PropertyName>
                    <sdd-dd:Value>$(installLocation)</sdd-dd:Value>
                </sdd-dd:Property>
            </sdd-dd:HostedResource>
        </sdd-dd:HostedResource>

<sdd-dd:DerivedVariable id="preciseJreVersion">
    <sdd-dd:ConditionalExpression>
        <sdd-dd:Condition>
            <sdd-dd:ResourceConstraint id="preciseJreIBMCondition" resourceRef="os" >
                <sdd-dd:PropertyConstraint>
                    <sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
                    <sdd-dd:ListOfValues>
                        <sdd-dd:Value>AIX</sdd-dd:Value>
                    </sdd-dd:ListOfValues>
                </sdd-dd:PropertyConstraint>
            </sdd-dd:ResourceConstraint>
        </sdd-dd:Condition>
        <sdd-dd:Expression>1.5.0 SR5</sdd-dd:Expression>
    </sdd-dd:ConditionalExpression>
    <sdd-dd:ConditionalExpression>
        <sdd-dd:Condition>
            <sdd-dd:ResourceConstraint id="preciseJreSunCondition" resourceRef="os" >
                <sdd-dd:PropertyConstraint>
                    <sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
                    <sdd-dd:ListOfValues>
                        <sdd-dd:Value>Solaris</sdd-dd:Value>
                        <sdd-dd:Value>Windows XP</sdd-dd:Value>
                        <sdd-dd:Value>Windows Vista</sdd-dd:Value>
                    </sdd-dd:ListOfValues>
                </sdd-dd:PropertyConstraint>
            </sdd-dd:ResourceConstraint>
        </sdd-dd:Condition>
        <sdd-dd:Expression>1.5.0_12</sdd-dd:Expression>
    </sdd-dd:ConditionalExpression>
</sdd-dd:DerivedVariable>
 
<sdd-dd:DerivedVariable id="minJreVersion">
    <sdd-dd:ConditionalExpression>
        <sdd-dd:Condition>
            <sdd-dd:ResourceConstraint id="minJreIBMCondition" resourceRef="os" >
                <sdd-dd:PropertyConstraint>
                    <sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
                    <sdd-dd:ListOfValues>
                        <sdd-dd:Value>AIX</sdd-dd:Value>
                    </sdd-dd:ListOfValues>
                </sdd-dd:PropertyConstraint>
            </sdd-dd:ResourceConstraint>
        </sdd-dd:Condition>
        <sdd-dd:Expression>1.5.0</sdd-dd:Expression>
    </sdd-dd:ConditionalExpression>
    <sdd-dd:ConditionalExpression>
        <sdd-dd:Condition>
            <sdd-dd:ResourceConstraint id="minJreSunCondition" resourceRef="os" >
                <sdd-dd:PropertyConstraint>
                    <sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
                    <sdd-dd:ListOfValues>
                        <sdd-dd:Value>Solaris</sdd-dd:Value>
                        <sdd-dd:Value>Windows XP</sdd-dd:Value>
                        <sdd-dd:Value>Windows Vista</sdd-dd:Value>
                    </sdd-dd:ListOfValues>
                </sdd-dd:PropertyConstraint>
            </sdd-dd:ResourceConstraint>
        </sdd-dd:Condition>
        <sdd-dd:Expression>1.5.0_05</sdd-dd:Expression>
    </sdd-dd:ConditionalExpression>
</sdd-dd:DerivedVariable>
 
<sdd-dd:DerivedVariable id="maxJreVersion">
    <sdd-dd:ConditionalExpression>
        <sdd-dd:Condition>
            <sdd-dd:ResourceConstraint id="maxJreIBMCondition" resourceRef="os" >
                <sdd-dd:PropertyConstraint>
                    <sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
                    <sdd-dd:ListOfValues>
                        <sdd-dd:Value>AIX</sdd-dd:Value>
                    </sdd-dd:ListOfValues>
                </sdd-dd:PropertyConstraint>
            </sdd-dd:ResourceConstraint>
        </sdd-dd:Condition>
        <sdd-dd:Expression>1.6.0 SR3</sdd-dd:Expression>
    </sdd-dd:ConditionalExpression>
    <sdd-dd:ConditionalExpression>
        <sdd-dd:Condition>
            <sdd-dd:ResourceConstraint id="maxJreSunCondition" resourceRef="os" >
                <sdd-dd:PropertyConstraint>
                    <sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
                    <sdd-dd:ListOfValues>
                        <sdd-dd:Value>Solaris</sdd-dd:Value>
                        <sdd-dd:Value>Windows XP</sdd-dd:Value>
                        <sdd-dd:Value>Windows Vista</sdd-dd:Value>
                    </sdd-dd:ListOfValues>
                </sdd-dd:PropertyConstraint>
            </sdd-dd:ResourceConstraint>
        </sdd-dd:Condition>
        <sdd-dd:Expression>1.6.0_14</sdd-dd:Expression>
    </sdd-dd:ConditionalExpression>
</sdd-dd:DerivedVariable>

Back to the top