ControlTier > controltier-elements
 

FireDaemonService

Service integration of FireDaemon Technologie's Windows Service wrapper

Overview

Open in Workbench FireDaemonService: Service integration of FireDaemon Technologie's Windows Service wrapper

Intent

Provide windows service lifecycle management for a windows application using the FireDaemon Service Manager.

  • Override standard Service commands and integrate them with the FireDaemon command line UI.
  • The following Service commands are overridden:
    • Stop: Stops Windows Service if the exe exists as a running service.
    • Configure: Configures the exe as a FireDamon/Windows Service via FireDaemon UI.
    • Start: Starts the Windows Serevice if the exe exists as a running service.
  • The following Service commands are added to the Deploy sequence:
    • Remove: Removes the exe integrated Windows Service if it exists via FireDaemon UI
    • Add: Adds the exe as a Windows Service if it does not exist via FireDaemon UI

Problem

FireDaemon provides the ability to run any windows exe as a windows service in the case where an application may have been built without windows service support. This module simplifies the requirement of integrating the exe into FireDaemon by abstracting and automating the windows service lifecycle operations with respect to the ControlTier Service layer. Thus the burden of this integration is then reduced to the command line requirements to run the exe and FireDaemon and ControlTier do the rest.

Discussion

Since FireDaemon is a commercial product, the licensing of FireDaemon is required on the windows machine(s) where this automation will occur. This module is agnostic to this licensing and is left as a platform responsibility.

Example

Check List

  1. See FireDaemon regarding licensing.

Design

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

Constraints

Allowed Child Dependencies

1: These types have a Singleton constraint. Only one instance may be added as a resource.

these dependenciesa are all FireDaemon related types.

Allowed Parent Dependencies

  • Node
  • Site

typical service which will allow Node and Site referrers.

Attributes

Exported Attributes

Name Property Description
installRoot deployment-install-root Installation root of the FireDaemon Service Manager, typically "C:\Program Files\FireDaemon".
workingDir deployment-basedir Working directory for the integrated FireDaemon service. This is typically the directory where the application exe resides.

Defaults for Imported Attributes

Name Default Description
fireDaemonExecutable C:\Program Files\FireDaemon\FireDaemon.exe full path to the FireDaemon commandline exe, see installRoot regarding containing directory.
fireDaemonServiceExecutable full path name the exe file to execute as a windows service (required).
fireDaemonServiceParameters command line parameters to the fireDaemonServiceExecutable (optional).

Commands

Note
Commandline options displayed in square brackets "[]" are optional. If an option expects arguments, then angle brackets are shown after the option "<>". Any default value is shown within the brackets.

Deploy

Run the service deployment cycle, stopping, unconfiguring, installing package dependencies, configuring and the starting the service.

Override the standard Service Deploy command in order to include service removal/add commands. Deploy will always delete and readd the windows service to ensure consistency.

Usage
Deploy

Workflow

  1. Stop
  2. Remove
  3. Packages-Install
  4. Configure
  5. Add
  6. Start

Update

Run the service deployment cycle, same as Deploy

Effectively alias Update to the Deploy command.

Usage
Update

Workflow

  1. Deploy

Add

Add the FireDaemon Windows service if it is not already installed.

In idempotent fashion, add the service if it does not exist.

Usage
Add

Workflow

  1. assertServiceIsInstalled

Error Handler

Command

addService

Remove

Remove the FireDaemon Windows service if it is installed.

In idempotent fashion, remove the service if it exists.

Usage
Remove

Workflow

  1. assertServiceIsNotInstalled

Error Handler

Command

removeService

addService

Add the FireDaemon Windows service to the system

unconditionally add the windows service via FireDaemon

Usage
addService [-firedaemon <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

removeService

Remove the FireDaemon Windows service from the system

unconditionally remove the windows service via FireDaemon

Usage
removeService [-firedaemon <>] [-servicename <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

servicename FireDaemon Windows service name

see servicename attribute via FireDaemonServiceName type.

assertServiceIsUp

Check whether the FireDaemon Windows service is up

query windows service layer via FireDaemon to assert if service is in up state.

Usage
assertServiceIsUp [-firedaemon <>] [-servicename <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

servicename FireDaemon Windows service name

see servicename attribute via FireDaemonServiceName type.

assertServiceIsDown

Check whether the FireDaemon Windows service is down

query windows service layer via FireDaemon to assert if service is in down state.

Usage
assertServiceIsDown [-firedaemon <>] [-servicename <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

servicename FireDaemon Windows service name

see servicename attribute via FireDaemonServiceName type.

assertServiceIsInstalled

Check whether the FireDaemon Windows service is installed

query windows service layer via FireDaemon to assert if service exists.

Usage
assertServiceIsInstalled [-firedaemon <>] [-servicename <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

servicename FireDaemon Windows service name

see servicename attribute via FireDaemonServiceName type.

assertServiceIsNotInstalled

Check whether the FireDaemon Windows service is not installed

query windows service layer via FireDaemon to assert if service does not exist.

Usage
assertServiceIsNotInstalled [-firedaemon <>] [-servicename <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

servicename FireDaemon Windows service name

see servicename attribute via FireDaemonServiceName type.

startService

Start the FireDaemon Windows service

unconditionally start the service via FireDaemon

Usage
startService [-firedaemon <>] [-servicename <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

servicename FireDaemon Windows service name

see servicename attribute via FireDaemonServiceName type.

stopService

Stop the FireDaemon Windows service

unconditionally stop the service via FireDaemon

Usage
stopService [-firedaemon <>] [-servicename <>]

Options

Option Description
firedaemon Location of the FireDaemon executable

see fireDaemonExecutable attribute via FireDaemonExecutable type.

servicename FireDaemon Windows service name

see servicename attribute via FireDaemonServiceName type.

Related Types

The following types are defined for use with FireDaemonService.

FireDaemonServiceSetting

Overview

Open in Workbench FireDaemonServiceSetting: FireDaemon configuration setting

Intent

Supertype to encapsulate related subtypes to the support of FireDaemon.

Design

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

FireDaemonExecutable

Overview

Open in Workbench FireDaemonExecutable: Location of the FireDaemon command-line executable

Intent

FireDaemonServiceSetting subtype to represent the fully qualified windows path to the FireDaemon.exe executable. When FireDaemon is installed, the default installation places the FireDaemon.exe in "C:\Program Files\FireDaemon"

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonExecutable settingValue attribute to represent the full path to the FireDaemon.exe program.

FireDaemonServiceName

Overview

Open in Workbench FireDaemonServiceName: Name of the FireDaemon Windows service

Intent

FireDaemonServiceSetting subtype to represent the name of the FireDaemon service that will show in the windows services management console.

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonServiceName settingValue attribute to represent the name of the integrated FireDaemon service.

FireDaemonServiceDisplayName

Overview

Open in Workbench FireDaemonServiceDisplayName: Displayed name of the FireDaemon Windows service

Intent

FireDaemonServiceSetting subtype to represent the display name of the FireDaemon service that will show in the windows services management console.

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonServiceDisplayName settingValue attribute to represent the display name of the integrated FireDaemon service.

FireDaemonServiceDescription

Overview

Open in Workbench FireDaemonServiceDescription: Description of the FireDaemon Windows service

Intent

FireDaemonServiceSetting subtype to represent the description of the FireDaemon service that will show in the windows services management console.

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonServiceDescription settingValue attribute to represent the description of the integrated FireDaemon service.

FireDaemonServiceExecutable

Overview

Open in Workbench FireDaemonServiceExecutable: Executable for FireDaemon to run as a Windows service

Intent

FireDaemonServiceSetting subtype to represent the fully qualified path to the FireDaemon command line executable (FireDaemon.exe). Typically, this would be in "\Program Files\FireDaemon" directory.

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonServiceExecutable settingValue attribute to represent the fully qualified path to the integrated FireDaemon service (exe file).

FireDaemonServiceParameters

Overview

Open in Workbench FireDaemonServiceParameters: Parameters for the windows service via FireDaemon

Intent

FireDaemonServiceSetting subtype to represent optional parameters passed to the service executable.

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonServiceParameters settingValue attribute to represent the parameters passed to the service executable.

FireDaemonServiceAccountName

Overview

Open in Workbench FireDaemonServiceAccountName: Account name to use with the FireDaemon Windows service.

Intent

FireDaemonServiceSetting subtype to represent the windows account to run the service as.

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonServiceAccountName settingValue attribute to represent the effective windows user to run the service as.

FireDaemonServiceAccountPassword

Overview

Open in Workbench FireDaemonServiceAccountPassword: Account password to use with the FireDaemon Windows service.

Intent

FireDaemonServiceSetting subtype to represent the password of the windows account to run the service as.

Design

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

Constraints

Allowed Parent Dependencies

Restrict setting objects of this type to be referred to by a FireDaemonService object.

Attributes

Exported Attributes
Name Property Description
fireDaemonServiceAccountPassword settingValue attribute to represent the password of the effective windows user to run the service.