Creating Weaver application definition files

Application definition files are Weaver files that describe the application in logical terms. These files describe the nodes, components, and users for the application without specifying the infrastructure for them.

About this task

An application definition file does not specify information about the infrastructure for the application or specific details of the deployment. Instead, the application definition file describes the logical organization of the application in terms of the application nodes and the relationships between those nodes. When you create an environment file, you realize the elements in the application definition to elements in the infrastructure file.

Procedure

  1. Create an empty Weaver file.
  2. In the Weaver file, define a topology element to represent the application, including its version, name, and description. For example, the following code creates a topology for an application named My Application.
    topology (:myapplication) {
      version="1.0.0"
      name = "My Application"
      description = "A simple application"
    
    }
    The version is usually three numbers, such as 1.0.0, as in the previous example. When you build the application, the weaver agent adds a timestamp to the version number to create the build ID, such as 1.0.0.2013.0101-1201.
  3. Specify one or more nodes for the application, as in the following example. Each node represents a piece of conceptual infrastructure that hosts one or more components.
    node(:application_node_a){
      name "Application node A"
      description "This node hosts component A of the application"
    }
  4. Within the node definition, specify one or more components and properties for those components. Each component represents a component of the application. The following example shows a node with one component: This component has three properties, but it does not specify values for these components.
    node(:application_node_a){
      name "Application node A"
      description "This node hosts component A of the application"
    
      component(:component_a){
        name "Application component A"
        description "This is component A of the application"
        property :property1 
        property :property2
        property :property3
      }
    }
  5. Specify the configuration links between the components. For example, the following code creates a link between the components component_a and component_b.
      config_link(:myapplication_link1) {
        name "Link between components A and B"
        description "This is a link between components A and B"
          
        source(:component_a) {      
          property :property4 => component_a.property1
        }
        
        target(:component_b) {
        }
      }
    Note that properties in the link can refer to properties in the components. In the previous example, the property4 property is linked to the property1 property in a component.
  6. Save the file.

Feedback