tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03
description: TOSCA simple profile with Apache.
template_name: apache-type
template_version: 2.0.0-SNAPSHOT
template_author: FastConnect

imports:
  - "tosca-normative-types:1.0.0-SNAPSHOT"

node_types:
  alien.nodes.Apache:
    derived_from: tosca.nodes.WebServer
    description: >
      The TOSCA Apache Node Type represents an apache component
      that can be managed and run by a TOSCA Compute Node Type.
    capabilities:
      host: alien.capabilities.ApacheContainer
    tags:
      icon: /images/apache.png
    properties:
      version:
        type: version
        default: 2.4
        constraints:
          - equal: 2.4
      port:
        type: integer
        description: Port for the Apache server
        default: 80
        constraints:
          - greater_or_equal: 1
      document_root:
          type: string
          default: "/var/www"
    interfaces:
      Standard:
        create:
          inputs:
            PORT: { get_property: [SELF, port] }
            DOC_ROOT: { get_property: [SELF, document_root] }
          implementation: scripts/install_apache.sh
        start: scripts/start_apache.sh

capability_types:
  alien.capabilities.ApacheContainer:
      derived_from: tosca.capabilities.Container

tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03
description: TOSCA simple profile with Apache.
template_name: apache-type
template_version: 2.0.0-SNAPSHOT
template_author: FastConnect

imports:
  - "tosca-normative-types:1.0.0-SNAPSHOT"

node_types:
  alien.nodes.Apache:
    derived_from: tosca.nodes.WebServer
    description: >
      The TOSCA Apache Node Type represents an apache component
      that can be managed and run by a TOSCA Compute Node Type.
    capabilities:
      host: alien.capabilities.ApacheContainer
    attributes:
      apache_url: { concat: ["http://", get_attribute: [HOST, public_ip_address], ":", get_property: [SELF, port], "/"] }
    tags:
      icon: /images/apache.png
    properties:
      version:
        type: version
        default: 2.4
        constraints:
          - equal: 2.4
      port:
        type: integer
        description: Port for the Apache server
        default: 80
        constraints:
          - greater_or_equal: 1
      document_root:
          type: string
          default: "/var/www"
    interfaces:
      Standard:
        create:
          inputs:
            PORT: { get_property: [SELF, port] }
            DOC_ROOT: { get_property: [SELF, document_root] }
          implementation: scripts/install_apache.sh
        start: scripts/start_apache.sh

capability_types:
  alien.capabilities.ApacheContainer:
      derived_from: tosca.capabilities.Container

Add the apache URL attribute
Add the apache URL attribute
