Skip to content

Application Type - Generic

Generic type means that you can run any process in operating system you want. You just need to provide command that can be executed. Additionally it is required to provide commands to stop and terminate the process. It can be a script, command or any other option in operating system. It is possible also to add aditional commands that you can execute over API remotly.

Example configuration

app:
  name: 'python-app'
  version: '1.0.0'
  appType: 'standard'
  procType: 'native'
  processProvider:
    name: 'GenericOsProcessProviderImpl'
    version: '1.0.0'
    executable:
      start:
        command: 'python3 ${ont_app_path}/bin/main.py --port ${ont_port_1} --log_dir ${ont_app_logs_path}'
        cpus: null
        memory: null
        successLine: 'Application started.'
        before: []
        after: []
        path: null
        getPid: null
        pidFilePath: null
      stop:
        command: "pkill -SIGTERM -F ${ont_log_path}/ONTEON_PID"
      terminate:
        command: "pkill -SIGKILL -F ${ont_log_path}/ONTEON_PID"
      custom_command_name:
        command: "./run_my_custom_command"
  placeHolder:
    name: 'PlaceHolderManagerImpl'
    version: '1.0.0'
    filesToReplace: []
    variables: {}
  serviceRepository:
    healthCheckUrl: 'http://${address}:${ont_port_1}'
    entities:
      - entity:
          priority: 1
          port: ${ont_port_1}
          protocol:
            type: 'HTTP'
            version: '1.1'
          isExternal: true
          isInternal: true

Configuration keys

app.name

Name of application.

app:
  name: 'application-name'

app.version

Version of application.

app:
  version: '1.0.0'

app.type

Application type. It should be set to standard.

Possible values:

  • standard - Standard application.
  • embedded - Application used for internal purposes, such as edge balancer.
  • unknown - Unknown application.
app:
  appType: 'standard'

app.procType

Process type. It should be set to native.

Possible values:

  • native - Native application.
  • docker - Docker application.
  • unknown - Unknown application.
app:
  procType: 'native'

app.processProvider.name

Name of process provider. It should be set to GenericOsProcessProviderImpl.

Possible values:

  • GenericOsProcessProviderImpl - for native processes.
  • JVMOsProcessProviderImpl - for native JVM processes.
  • DockerOsProcessProviderImpl - for docker processes.
app:
  processProvider:
    name: 'GenericOsProcessProviderImpl'

app.processProvider.version

Version of process provider. It should be set to 1.0.0.

app:
  processProvider:
    version: '1.0.0'

app.processProvider.version.executable.(action).command

Command that executes specific action.

app:
  processProvider:
    executable:
      start:
        command: '${ont_app_path}/bin/bin/start.sh --port ${ont_port_1}'

app.processProvider.version.executable.start.successLine

Log line that will determine that the application has started. If you do not specify success line, Onteon node will wait 90 seconds. Wait time can be changed here.

app:
  processProvider:
    executable:
      start:
        successLine: 'Application started...'

app.processProvider.version.executable.start.cpus

CPUs limit for process.

app:
  processProvider:
    executable:
      start:
        cpus: null

app.processProvider.version.executable.start.memory

Memory limit for process.

app:
  processProvider:
    executable:
      start:
        memory: null

app.processProvider.version.executable.start.before

List of actions (defined on executable list) to run before running start command.

app:
  processProvider:
    executable:
      start:
        before: []

app.processProvider.version.executable.start.after

List of actions (defined on executable list) to run after running start command.

app:
  processProvider:
    executable:
      start:
        after: []

app.processProvider.version.executable.start.path

Path to directory with executable.

app:
  processProvider:
    executable:
      start:
        memory: null
        path: null

app.processProvider.version.executable.start.getPid

Command to retrieve application's process ID.

app:
  processProvider:
    executable:
      start:
        getPid: null

app.processProvider.version.executable.start.pidFilePath

Path to file that contains application's process ID.

app:
  processProvider:
    executable:
      start:
        pidFilePath: null

app.placeHolder.name

Placeholder name.

app:
  placeHolder:
    name: 'PlaceHolderManagerImpl'

app.placeHolder.version

Placeholder version.

app:
  placeHolder:
    version: '1.0.0'

app.placeHolder.filesToReplace

List of files that will have placeholder replaced.

app:
  placeHolder:
    filesToReplace: []

app.placeHolder.variables

Placeholders variables in key-value format.

app:
  placeHolder:
    variables: {}

app.serviceRepository.healthCheckUrl

Url that will determine if application is alive.

app:
  serviceRepository:
    healthCheckUrl: 'http://${address}:${ont_port_1}/isAlive/'

app.serviceRepository.entities

List of service repository entities.

app:
  serviceRepository:
    entities:
      - entity:
          priority: 1
          port: ${ont_port_1} # entity port
          protocol:
            type: 'HTTP'      # entity protocol
            version: '1.1'    # entity protocol version
          isExternal: true    # if true, application will be available in edge balancer
          isInternal: true    # if true, application will be available in inner balancer