Skip to content

Application Configuration

Application configuration describes how application instance should look like. Contains information such as name and version of application, health check url or commands that starts and stops application instance.

Configuration

Configuration types:

  • Native - Runs native process.
  • Docker - Runs docker container.

Native configuration

Example configuration with generic process

app:
  name: 'native-application'
  version: '1.0.0'
  appType: 'standard'
  procType: 'native'
  processProvider:
    name: 'GenericOsProcessProviderImpl'
    version: '1.0.0'
    executable:
      start:
        command: '${ont_app_path}/bin/bin/start.sh --port ${ont_port_1}'
        successLine: 'Application started...'
      stop:
        command: '${ont_app_path}/bin/bin/stop.sh'
      terminate:
        command: '${ont_app_path}/bin/bin/terminate.sh'
  placeHolder:
    name: 'PlaceHolderManagerImpl'
    version: '1.0.0'
  serviceRepository:
    healthCheckUrl: 'http://${address}:${ont_port_1}/isAlive/'
    entities:
      - entity:
          priority: 1
          port: ${ont_port_1}
          protocol:
            type: 'HTTP'
            version: '1.1'
          isExternal: true
          isInternal: true

Example configuration with java

app:
  name: 'native-application'
  version: '1.0.0'
  appType: 'standard'
  procType: 'native'
  processProvider:
    name: 'JVMOsProcessProviderImpl'
    version: '1.0.0'
    executable:
      start:
        path: '${ont_app_path}/bin'
        startJvmCommand: 'java -jar -Dserver.port=${ont_port_1}'
        successLine: 'Spring Boot properly started'
        executableFileName: 'app.jar'
  placeHolder:
    name: 'PlaceHolderManagerImpl'
    version: '1.0.0'
    filesToReplace:
    variables:
  serviceRepository:
    healthCheckUrl: 'http://${address}:${ont_port_1}/isAlive/'
    entities:
      - entity:
          priority: 1
          port: ${ont_port_1}
          protocol:
            type: 'HTTP'
            version: '1.1'
          isExternal: true
          isInternal: true

Docker configuration

Example configuration

app:
  name: 'docker-application'
  version: '1.0.0'
  appType: 'standard'
  procType: 'docker'
  processProvider:
    name: 'DockerOsProcessProviderImpl'
    version: '1.0.0'
    executable:
      start:
        imageName: 'docker-application-image:1.0.0'
        exposedPort: '${ont_port_1}'
        innerPort: '3000'
        pullNewerImage: false
        successLine: 'Listening at port 3000'
  placeHolder:
    name: 'PlaceHolderManagerImpl'
    version: '1.0.0'
    filesToReplace:
    variables:
  serviceRepository:
    healthCheckUrl: 'http://${address}:${ont_port_1}/isAlive/'
    entities:
      - entity:
          priority: 1
          port: ${ont_port_1}
          protocol:
            type: 'HTTP'
            version: '1.1'
          isExternal: false
          isInternal: true

Configuration keys

app.name

Name of application.

Configuration type: all

app:
  name: 'application-name'

app.version

Version of application.

Configuration type: all

app:
  version: '1.0.0'

app.type

Application type.

Configuration type: all

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.

Configuration type: all

Possible values:

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

app.processProvider.name

Name of process provider.

Configuration type: all

Possible values:

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

app.processProvider.version

Version of process provider.

Configuration type: all

app:
  processProvider:
    version: '1.0.0'

app.processProvider.version.executable.start.path

Path to directory with application files.

Configuration type: all

app:
  processProvider:
    executable:
      start:
        path: '${ont_app_path}/bin'

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

Command that executes specific action.

Configuration type: native generic

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.

Configuration type: all

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

app.processProvider.version.executable.start.startJvmCommand

Command that runs Java application. Command should not contain binary file. Binary file can be specified here.

Configuration type: native JVM

app:
  processProvider:
    executable:
      start:
        startJvmCommand: 'java -jar -Dserver.port=${ont_port_1}'

app.processProvider.version.executable.start.executableFileName

Java executable file.

Configuration type: native JVM

app:
  processProvider:
    executable:
      start:
        executableFileName: 'app.jar'

app.processProvider.version.executable.start.imageName

Docker image name.

Configuration type: docker

app:
  processProvider:
    executable:
      start:
        imageName: 'docker-application-image:1.0.0'

app.processProvider.version.executable.start.exposedPort

Exposed docker container port.

Configuration type: docker

app:
  processProvider:
    executable:
      start:
        exposedPort: '${ont_port_1}'

app.processProvider.version.executable.start.innerPort

Inner docker container port, that will be exposed.

Configuration type: docker

app:
  processProvider:
    executable:
      start:
        exposedPort: '3000'

app.processProvider.version.executable.start.pullNewerImage

If true, it will not pull newer images.

Configuration type: docker

app:
  processProvider:
    executable:
      start:
        pullNewerImage: false

app.placeHolder.name

Placeholder name.

Configuration type: all

app:
  placeHolder:
    name: 'PlaceHolderManagerImpl'

app.placeHolder.version

Placeholder version.

Configuration type: all

app:
  placeHolder:
    version: '1.0.0'

app.placeHolder.filesToReplace

List of files that will have placeholder replaced.

Configuration type: all

app:
  placeHolder:
    filesToReplace:

app.placeHolder.variables

Placeholders variables in key-value format.

Configuration type: all

app:
  placeHolder:
    variables:

app.serviceRepository.healthCheckUrl

Url that will determine if application is alive.

Configuration type: all

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

app.serviceRepository.entities

List of service repository entities.

Configuration type: all

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