ControlTier Inc. > Open.ControlTier
 
Font size:      

The project-v1.0 DTD

The 'project' XML document declares object data suitable for Workbench.

Note
This is a demonstration document using all possible elements in the current ControlTier project-v10.dtd.

project

The root (aka "top-level") element of the project.xml file. Contains a set of resource elements. There is an explict ordering of subsequent resource definitions.

elements
elementdescription
nodenode resource
settingsetting resource
packagepackage resource
deploymentdeployment resource

Example

<!DOCTYPE project PUBLIC
        "-//ControlTier Software Inc.//DTD Project Document 1.0//EN" "project.dtd">
<project>
  <node .../>
  <setting ...  />
  <package ... />
  <deployment ...  />
</project>
     

node

The node element defines a Node resource object.

attributes
attributedescriptionvalues
typenode typeNode
namenode namea name
descriptionnode descriptiona character string
hostnameadmistrative hostnamea valid hostname
osArchoperating system architecture(eg uname -p)
osFamilyoperating system familywindows or unix
osNameoperating system name(eg uname -s)
osVersionoperating system version(eg uname -r)
ctlbaseCTL framework instance directoryCT_BASE
ctlhomeCTL software installation root directoryCTL_HOME
ctlusernameCTL remote connection username(eg ${framework.ssh.user}
ctlpasswordCTL remote connection passwordUnceccessary when using key-based authentication

elements
elementdescription
resourcesChild dependencies
referrersParent dependencies

Example

<node name="strongbad" type="Node"
    description="a development host"
    hostname="strongbad.local"
    osArch="i386" osFamily="unix" osName="Darwin" osVersion="9.2.2"
    ctlbase="/ctier/ctl" ctlhome="/ctier/pkgs/ctl-1.1" ctlusername="${framework.ssh.user}"/>
     

setting

The setting element defines a Setting resource object.

attributes
attributedescriptionvalues
typesetting typeSetting type
namesetting namea name
descriptionsetting descriptiona character string
settingTypethe setting valuea string
settingValuethe value typea string

elements
elementdescription
referrersParent dependencies

Example

<setting type="PackageFinishScript" name="apache-tomcat-5.5.26.zip" 
           description="The script used during prepare" 
           settingValue="$HOME/bin/tomcat-finish.sh" settingType="script"/>
     

package

The package element defines a Package resource object.

attributes
attributedescriptionvalues
typepackage typePackage type
namepackage namea name
descriptionpackage descriptiona character string
archplatform architecturea string
basethe package base namea string
buildtimethe package buildtimea string
filenamethe package filename namea string
filetypethe package archive type(eg, zip,tgz,jar,rpm)
installrootthe package installation root directorya path
installrankthe package relative install rank(eg, an integer)
releasethe package releasea string
releasetagthe package release taga string
repoUrlthe URL to the packagea URL
restartBoolean specifying if a restart is requiredtrue/false
vendorthe package vendora string
versionthe package versiona string

elements
elementdescription
resourcesChild dependencies
referrersParent dependencies

Example

<package 
      arch="noarch"
      base="apache-tomcat-5.5.26" 
      buildtime="2008061570109" 
      description="The Tomcat application server." 
      filename="apache-tomcat-5.5.26.zip" 
      filetype="zip" 
      installroot="/demo/apache-tomcat-5.5.26" 
      installrank="" 
      name="apache-tomcat-5.5.26.zip" 
      release=""
      releasetag=""
      repoUrl="${framework.pkgRepo.upload-url}/default/zip/zips/apache-tomcat-5.5.26.zip" 
      restart="false"
      type="zip"
      vendor=""
      version="5.5.26"      
      />
     

Another example showing resources:

<!--
      **
      ** Defines path to the prepare and finish scripts
      **
-->
<setting type="PackagePrepareScript" name="apache-tomcat-5.5.26.zip" 
           description="The script used during finish" 
           settingValue="$HOME/bin/tomcat-prepare.sh" settingType="script"/>
<setting type="PackageFinishScript" name="apache-tomcat-5.5.26.zip" 
           description="The script used during prepare" 
           settingValue="$HOME/bin/tomcat-finish.sh" settingType="script"/>
<!--
      **
      ** Defines package resource
      **
-->
<package 
      arch="noarch"
      base="apache-tomcat-5.5.26" 
      buildtime="2008061570109" 
      description="The Tomcat application server." 
      filename="apache-tomcat-5.5.26.zip" 
      filetype="zip" 
      installroot="/demo/apache-tomcat-5.5.26" 
      installrank="" 
      name="apache-tomcat-5.5.26.zip" 
      release=""
      releasetag=""
      repoUrl="${framework.pkgRepo.upload-url}/default/zip/zips/apache-tomcat-5.5.26.zip" 
      restart="false"
      type="zip"
      vendor=""
      version="5.5.26"      
      >
    <!--
      **
      ** References the prepare and finish scripts as dependencies to the package
      **
      -->
    <resources>
      <resource type="PackagePrepareScript" name="apache-tomcat-5.5.26.zip"/>
      <resource type="PackageFinishScript" name="apache-tomcat-5.5.26.zip"/>
    </resources>
</package>
     

deployment

The deployment element defines a Deployment resource object.

attributes
attributedescriptionvalues
typedeployment typeDeployment type
namedeployment namea name
descriptiondeployment descriptiona character string
basedirthe base directorya path
installRootthe install directorya path

elements
elementdescription
resourcesChild dependencies
referrersParent dependencies

Example

<deployment 
      type="Deployment"
      name="tomcat1" 
      description="The Tomcat deployment." 
      installRoot="/demo/apache-tomcat-5.5.26" 
      basedir="/demo/apache-tomcat-5.5.26" />
     

Another example showing resources and referrers:

<deployment 
      type="Deployment"
      name="tomcat1" 
      description="The Tomcat deployment." 
      installRoot="/demo/apache-tomcat-5.5.26" 
      basedir="/demo/apache-tomcat-5.5.26">

   <resources>
      <resource name="apache-tomcat-5.5.26.zip" type="zip" />
      <resource name="extras.jar" type="jar" />
   </resources>

   <referrers>
      <resource name="centos" type="Node" />
      <resource name="development" type="Node" />
   </referrers>
</deployment>
     

resource

A resource object. A resource element is used to reference another object in the project model by type and name.

attributes
attributedescriptionvalues
typeresource typea type
nameresource namea name

Example

Refrences an instance of Deployment named "tomcat1".

<resource type="Deployment" name="tomcat1" />

resources

The resources tag defines a set of child dependencies. Each dependency is referenced via a resource element.

elements
attributedescription
resourceA child dependency resource

Example

<resources>
  <resource name="apache-tomcat-5.5.26.zip" type="zip" />
  <resource name="extras.jar" type="jar" />
</resources>
     

referrers

The referrers tag defines a set of parent dependencies. Each dependency is referenced via a resource element.

elements
attributedescription
resourceA parent dependency resource

Example

<referrers>
  <resource name="centos" type="Node" />
  <resource name="development" type="Node" />
</referrers>