Jump to: navigation, search

Cosmos sdd.xml

<?xml version="1.0" encoding="UTF-8" ?>
<sdd-dd:DeploymentDescriptor 
	descriptorID="0F000F000F000F000F000F000F000F00" lastModified="2001-12-31T12:00:00" schemaVersion="1.0"
	xmlns:sdd-common="http://docs.oasis-open.org/sdd/ns/common" 
	xmlns:sdd-dd="http://docs.oasis-open.org/sdd/ns/deploymentDescriptor"
	xmlns:sp="http://docs.oasis-open.org/sdd/ns/starterProfile" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://docs.oasis-open.org/sdd/ns/deploymentDescriptor http://docs.oasis-open.org/sdd/v1.0/cd04/FullSchema/cd04-deploymentDescriptor-1.0.xsd http://docs.oasis-open.org/sdd/ns/starterProfile http://docs.oasis-open.org/sdd/v1.0/cd01/cd01-sdd-starter-profile-v1.0.xsd http://docs.oasis-open.org/sdd/ns/common http://docs.oasis-open.org/sdd/v1.0/cd04/FullSchema/cd04-common-1.0.xsd ">
	
	<sdd-dd:Topology>
		<sdd-dd:Resource id="os" type="sp:CIM_OperatingSystem"> 
			<sdd-dd:HostedResource id="filesystem" type="sp:CIM_FileSystem">
				<sdd-dd:HostedResource id="installDir" type="sp:CIM_Directory">
					<sdd-dd:Property>
						<sdd-dd:PropertyName>sp:CIM_Directory.Root</sdd-dd:PropertyName>
						<sdd-dd:Value>$(installLocation)</sdd-dd:Value>
					</sdd-dd:Property> 
				</sdd-dd:HostedResource>
			</sdd-dd:HostedResource> 
			<sdd-dd:HostedResource id="COSMOS" type="sp:CIM_Application" />
		</sdd-dd:Resource>
	</sdd-dd:Topology>
	
	<sdd-dd:InstallableUnit targetResourceRef="COSMOS" id="cosmosIU">
		<sdd-dd:Variables>
			<sdd-dd:DerivedVariable id="installRoot">
				<sdd-dd:ConditionalExpression>
					<sdd-dd:Condition>
						<sdd-dd:ResourceConstraint id="UNIX.cond" 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:Value>Solaris</sdd-dd:Value>
									<sdd-dd:Value>Linux</sdd-dd:Value>
								</sdd-dd:ListOfValues>
							</sdd-dd:PropertyConstraint>
						</sdd-dd:ResourceConstraint>
					</sdd-dd:Condition>
					<sdd-dd:Expression>/opt</sdd-dd:Expression>
				</sdd-dd:ConditionalExpression>
				<sdd-dd:ConditionalExpression>
					<sdd-dd:Condition>
						<sdd-dd:ResourceConstraint id="Windows.cond" resourceRef="os" >
							<sdd-dd:PropertyConstraint>
								<sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
								<sdd-dd:Value>Windows</sdd-dd:Value>
							</sdd-dd:PropertyConstraint>
						</sdd-dd:ResourceConstraint>
					</sdd-dd:Condition>
					<sdd-dd:Expression>%ProgramFiles%</sdd-dd:Expression>
				</sdd-dd:ConditionalExpression>
			</sdd-dd:DerivedVariable>
			<sdd-dd:Parameters>
				<sdd-dd:URIParameter id="installLocation" defaultValue="$(installRoot)/COSMOS/1.0"/>
			</sdd-dd:Parameters>
		</sdd-dd:Variables>
		
		<sdd-dd:Requirements>
			<sdd-dd:Requirement operation="install" id="osRequirements">
				<sdd-dd:Alternative id="Linux">
					<sdd-dd:ResourceConstraint resourceRef="os" id="resourceConstraintLinux">
						<sdd-dd:PropertyConstraint>
							<sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
							<sdd-dd:Value>LINUX</sdd-dd:Value>
						</sdd-dd:PropertyConstraint>
						<sdd-dd:VersionConstraint>
							<sdd-dd:Supported>
								<sdd-dd:Range>
									<sdd-dd:MinVersion>5.0</sdd-dd:MinVersion>
								</sdd-dd:Range>
							</sdd-dd:Supported>
						</sdd-dd:VersionConstraint>
					</sdd-dd:ResourceConstraint>
				</sdd-dd:Alternative>
				<sdd-dd:Alternative id="Windows">
					<sdd-dd:ResourceConstraint resourceRef="os" id="resourceConstraintWindows">
						<sdd-dd:PropertyConstraint>
							<sdd-dd:PropertyName>sp:CIM_OperatingSystem.OSType</sdd-dd:PropertyName>
							<sdd-dd:Value>Windows XP</sdd-dd:Value>
						</sdd-dd:PropertyConstraint>
						<sdd-dd:VersionConstraint>
							<sdd-dd:Supported>
								<sdd-dd:Range>
									<sdd-dd:MinVersion>5.1.2600 SP2</sdd-dd:MinVersion>
								</sdd-dd:Range>
							</sdd-dd:Supported>
						</sdd-dd:VersionConstraint>
					</sdd-dd:ResourceConstraint>
				</sdd-dd:Alternative>
			</sdd-dd:Requirement>
			<sdd-dd:Requirement operation="install" id="availableDiskSpaceRequirement">
				<sdd-dd:ResourceConstraint id="diskSpaceCheck" resourceRef="filesystem">
					<sdd-dd:ConsumptionConstraint>
						<sdd-dd:PropertyName>sp:CIM_FileSystem.AvailableSpace</sdd-dd:PropertyName>
						<sdd-dd:Value unit="512-blocks">2000</sdd-dd:Value>
					</sdd-dd:ConsumptionConstraint>
				</sdd-dd:ResourceConstraint>
			</sdd-dd:Requirement>
			<sdd-dd:Requirement operation="install" id="installDirectoryWritable">
				<sdd-dd:ResourceConstraint resourceRef="installDir" id="installDirectoryWritableCheck">
					<sdd-dd:PropertyConstraint>
						<sdd-dd:PropertyName>sp:CIM_Directory.Writable</sdd-dd:PropertyName>
						<sdd-dd:Value>true</sdd-dd:Value>
					</sdd-dd:PropertyConstraint>
				</sdd-dd:ResourceConstraint>
			</sdd-dd:Requirement>
		</sdd-dd:Requirements>
		
		<sdd-dd:ResultingResource resourceRef="COSMOS">
			<sdd-dd:Name>COSMOS</sdd-dd:Name>
			<sdd-dd:Version>1.0</sdd-dd:Version>
		</sdd-dd:ResultingResource>

		<sdd-dd:Artifacts>
			<sdd-dd:InstallArtifact contentRef="cosmosAppZip" type="zip">
				<sdd-dd:Arguments>
					<sdd-dd:Argument name="installloc" value="$(installLocation)"/>
				</sdd-dd:Arguments>
				
				<sdd-dd:AdditionalContent contentRef="cosmosConfigScript">
					<sdd-dd:Substitution>
						<sdd-dd:Pattern>@TOKEN_installLocation@</sdd-dd:Pattern>
						<sdd-dd:Value>$(installLocation)</sdd-dd:Value>
					</sdd-dd:Substitution>
				</sdd-dd:AdditionalContent>
			</sdd-dd:InstallArtifact>
		</sdd-dd:Artifacts>
		
	</sdd-dd:InstallableUnit>
</sdd-dd:DeploymentDescriptor>