Application Type - Docker¶
Docker Application is a application that runs Docker containers. You need to specify Docker image and ports.
Example configuration¶
app:
name: 'fridge-app'
version: '1.1.0'
appType: 'standard'
procType: 'docker'
processProvider:
name: 'DockerOsProcessProviderImpl'
version: '1.0.0'
executable:
start:
imageName: 'onteon/demo-app-fridge:1.1.0'
exposedPort: '${application-instance-port-1}'
innerPort: '3000'
pullNewerImage: false
successLine: 'Listening at port 3000'
runtimeOptions: null
readStreamsWaitTimeInMillis: 90000
placeHolder:
name: 'PlaceHolderManagerImpl'
version: '1.0.0'
filesToReplace: []
variables: {}
serviceRepository:
healthCheckUrl: 'http://${address}:${application-instance-port-1}/isAlive'
entities:
- entity:
priority: 1
port: ${application-instance-port-1}
protocol:
type: 'HTTP'
version: '1.1'
isExternal: true
isInternal: true
Configuration keys¶
app.name¶
Name of application.
app.version¶
Version of application.
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.procType¶
Process type. It should be set to docker.
Possible values:
- native - Native application.
- docker - Docker application.
- unknown - Unknown application.
app.processProvider.name¶
Name of process provider. It should be set to DockerOsProcessProviderImpl.
Possible values:
- GenericOsProcessProviderImpl - for native processes.
- JVMOsProcessProviderImpl - for native JVM processes.
- DockerOsProcessProviderImpl - for docker processes.
app.processProvider.version¶
Version of process provider. It should be set to 1.0.0.
app.processProvider.executable.start.imageName¶
Docker image name.
app.processProvider.executable.start.exposedPort¶
Exposed docker container port.
app.processProvider.executable.start.innerPort¶
Inner docker container port, that will be exposed.
app.processProvider.executable.start.pullNewerImage¶
If true, it will not pull newer images.
app.processProvider.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.runtimeOptions¶
Additional runtime options for docker command.
app.processProvider.executable.start.readStreamsWaitTimeInMillis¶
Time in milliseconds that Onteon Node Manager will wait for the application's success line to occur. If success line it not defined, then it is a time in milliseconds, after which Onteon Node Manager will assume that the application is started and check if it's running using application's PID.
app.placeHolder.name¶
Placeholder name.
app.placeHolder.version¶
Placeholder version.
app.placeHolder.filesToReplace¶
List of files that will have placeholder replaced.
app.placeHolder.variables¶
Placeholders variables in key-value format.
app.serviceRepository.healthCheckUrl¶
Url that will determine if application is alive.
app.serviceRepository.entities¶
List of service repository entities.
app:
serviceRepository:
entities:
- entity:
priority: 1
port: ${application-instance-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
Additional embedded application configuration keys¶
Besides base configuration keys listed above, applications with appType: 'embedded'
have additional keys.
app:
name: 'python-app'
version: '1.0.0'
appType: 'embedded'
procType: 'native'
itShouldBeStartedOnNodeManagerStartup: true
startupIndex: 1
isItRequiredForSystemConsistency: true
processProvider:
name: 'GenericOsProcessProviderImpl'
version: '1.0.0'
executable:
start:
command: 'python3 ${application-instance-path}/bin/main.py --port ${application-instance-port-1} --log_dir ${application-instance-logs-path}'
cpus: null
memory: null
successLine: 'Application started.'
before: []
after: []
path: null
getPid: null
pidFilePath: null
readStreamsWaitTimeInMillis: 90000
stop:
command: "pkill -SIGTERM -F ${application-instance-logs-path}/ONTEON_PID"
terminate:
command: "pkill -SIGKILL -F ${application-instance-logs-path}/ONTEON_PID"
custom_command_name:
command: "./run_my_custom_command"
placeHolder:
name: 'PlaceHolderManagerImpl'
version: '1.0.0'
filesToReplace: []
variables: {}
serviceRepository:
healthCheckUrl: 'http://${address}:${application-instance-port-1}'
entities:
- entity:
priority: 1
port: ${application-instance-port-1}
protocol:
type: 'HTTP'
version: '1.1'
isExternal: true
isInternal: true
app.itShouldBeStartedOnNodeManagerStartup¶
Defines if application should be started on Node Manager startup.
Possible values:
- true
- false
app.startupIndex¶
Specifies the order in which the application should start during startup sequence.
app.isItRequiredForSystemConsistency¶
Defines if node manager requires this application to start (if the application start fails, then node manager does not start) to work properly.
Possible values:
- true
- false