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.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 native
.
Possible values:
- native - Native application.
- docker - Docker application.
- unknown - Unknown application.
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.version¶
Version of process provider. It should be set to 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.version.executable.start.cpus¶
CPUs limit for process.
app.processProvider.version.executable.start.memory¶
Memory limit for process.
app.processProvider.version.executable.start.before¶
List of actions (defined on executable list) to run before running start command.
app.processProvider.version.executable.start.after¶
List of actions (defined on executable list) to run after running start command.
app.processProvider.version.executable.start.path¶
Path to directory with executable.
app.processProvider.version.executable.start.getPid¶
Command to retrieve application's process ID.
app.processProvider.version.executable.start.pidFilePath¶
Path to file that contains application's process ID.
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: ${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