ControlTier > core
 

Service

An interface to an application service deployment

Overview

Service: An interface to an application service deployment

Documentation

Documentation is available on the ControlTier Wiki: Service

Design

Super Type
Deployment
Role Concrete. (Objects can be created.)
Instance Names Unique
Notification false
Template Directory
Data View Children, proximity: 1
Logger Name

Constraints

Allowed Child Dependencies

Allowed Parent Dependencies

Attributes

Defaults for Imported Attributes

Name Default Description
service-isdown-executable executable to run for assertServiceIsDown command
service-isdown-script script to execute for assertServiceIsDown command
service-isup-executable executable to run for assertServiceIsUp command
service-isup-script script to execute for assertServiceIsUp command
service-spawn false Whether or not to spawn the service process during the startService command execution. (true/false).
service-start-executable executable to run for startService command
service-start-script script to execute for startService command
service-stop-executable executable to run for stopService command
service-stop-script script to execute for stopService command

Commands

The service type provides the following standard life cycle commands:

Life cycle commands
Name Description
Start Starts the service if the service is down.
Status Checks if service is running
Stop Stops the service if the service is up.
Update Executes the Service deployment lifecycle.

The service type provides the following hook commands called by life cycle commands:

Hook commands
Name Description
assertServiceIsDown Checks if the service is down and fails if is not. Service subclasses provide a concrete implementation.
assertServiceIsUp Checks if the services is running and fails if not. Service subclasses provide a concrete impementation
startService Starts the application service
stopService Stops the application service

The commands, assertServiceIsUp and assertServiceIsDown, are each examples of commands that test an assumption that is intended to be true. They act as an assertion statement inside command workflows and if the condition for which they test is not met, they exit with a failure. This causes the command sequence in the workflow to fail, the failure forwarded to the workflow's error handler.

View the available commands in the User Reference.

Related Types

The following types are defined for use with Service.

Port

Overview

Port: A network port

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies

Attributes

Exported Attributes
Name Property
port settingValue

ServiceIsDownExecutable

Overview

ServiceIsDownExecutable: The executable used during assertServiceIsDown

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ant
  • bash
  • cmd.exe
  • sh
  • bash
false
settingType
  • ant
  • bat
  • shell
  • shell
false

Attributes

Exported Attributes
Name Property
service-isdown-executable settingValue

ServiceIsDownScript

Overview

ServiceIsDownScript: The script used during assertServiceIsDown

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ${module.dir}/bin/isdown.bat
  • ${module.dir}/bin/isdown.sh
  • ${module.dir}/bin/isdown.xml
  • ${module.dir}/bin/isdown.sh
false
settingType
  • ant
  • bat
  • bourne
  • bourne
false

Attributes

Exported Attributes
Name Property
service-isdown-script settingValue

ServiceIsUpExecutable

Overview

ServiceIsUpExecutable: The executable used during assertServiceIsUp

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ant
  • bash
  • cmd.exe
  • sh
  • bash
false
settingType
  • ant
  • bat
  • shell
  • shell
false

Attributes

Exported Attributes
Name Property
service-isup-executable settingValue

ServiceIsUpScript

Overview

ServiceIsUpScript: The script used during assertServiceIsUp

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ${module.dir}/bin/isup.bat
  • ${module.dir}/bin/isup.sh
  • ${module.dir}/bin/isup.xml
  • ${module.dir}/bin/isup.sh
false
settingType
  • ant
  • bat
  • bourne
  • bourne
false

Attributes

Exported Attributes
Name Property
service-isup-script settingValue

ServiceSetting

Overview

ServiceSetting: A generic configuration setting for a package

Design

Super Type
Setting
Role Abstract. (Objects cannot be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies

ServiceSpawn

Overview

ServiceSpawn: Whether or not to spawn the execution of the startService script.

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • false
  • true
  • false
true

Attributes

Exported Attributes
Name Property
service-spawn settingValue

ServiceStartExecutable

Overview

ServiceStartExecutable: The executable used during startService

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ant
  • bash
  • cmd.exe
  • sh
  • bash
false
settingType
  • ant
  • bat
  • shell
  • shell
false

Attributes

Exported Attributes
Name Property
service-start-executable settingValue

ServiceStartScript

Overview

ServiceStartScript: The script used during startService

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ${module.dir}/bin/start.bat
  • ${module.dir}/bin/start.sh
  • ${module.dir}/bin/start.xml
  • ${module.dir}/bin/start.sh
false

Attributes

Exported Attributes
Name Property
service-start-script settingValue

ServiceStopExecutable

Overview

ServiceStopExecutable: The executable used during stopService

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ant
  • bash
  • cmd.exe
  • sh
  • bash
false
settingType
  • ant
  • bat
  • shell
  • shell
false

Attributes

Exported Attributes
Name Property
service-stop-executable settingValue

ServiceStopScript

Overview

ServiceStopScript: The script used during stopService

Design

Super Type
ServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
Allowed Property Values
Property Allowed Values Default Enforced
settingValue
  • ${module.dir}/bin/stop.bat
  • ${module.dir}/bin/stop.sh
  • ${module.dir}/bin/stop.xml
  • ${module.dir}/bin/stop.sh
false
settingType
  • ant
  • bat
  • bourne
  • bourne
false

Attributes

Exported Attributes
Name Property
service-stop-script settingValue