Scheduling Mechanism - Manual
Overview
To manually schedule the environment you can use OnteonCLI commands or HTTP API.
Get environment information
Nodes
First, you can list all nodes by executing onteoncli node list command or using the GET /api/nodes endpoint.
root@c14d89d70df8:/opt/onteon# onteoncli node list
id createdAt updatedAt ipAddress nodeApiPort zoneId status
f8de39d8d52a10dacb162971 2022-03-16T07:55:10.204Z 2022-03-16T07:57:20.537Z 172.31.0.4 8030 null available
515ae71303070e256d799a47 2022-03-16T07:55:08.948Z 2022-03-16T07:57:20.572Z 172.31.0.3 8030 null available
Then, you can get node details by
executing onteoncli node details
root@c14d89d70df8:/opt/onteon# onteoncli node details f8de39d8d52a10dacb162971
id: 62319b26eebebe2297c34981
info:
processors: 6
cores: 12
totalMemoryInBytes: 33537531904
runtime:
cpuLoad: 5.258322178938955
availableMemoryInBytes: 24509493248
cpuInterrupts:
0: 380
1: 0
2: 30
3: 5520
4: 10
5: 0
6: 10
7: 0
cpuAverageUsage:
0: 2.4
1: 1.09
2: 0.84
osProcessInfo:
processId: 497
name: java
path: /opt/jdk-15.0.1/bin/java
commandLine: /bin/java\u0000--enable-preview\u0000-Xms256M\u0000-Xmx512M\u0000-XX:-OmitStackTraceInFastThrow\u0000-Dnode-manager.root=/opt/onteon/onteon-node-manager\u0000-Dlog4j.configurationFile=/opt/onteon/onteon-node-manager/resources/log4j/log4j2.xml\u0000-Donteon.host=172.31.0.4\u0000-classpath\u0000/opt/onteon/onteon-node-manager/start/lib/*:/opt/onteon/onteon-node-manager/start/lib/ext/*:/opt/onteon/onteon-node-manager/start/lib/int/*\u0000tech.onteon.onteon.app.microloader.starter.MainStarter\u0000
currentWorkingDirectory: /home/onteon
user: onteon
userId: 1000
group: docker
groupId: 999
priority: 20
parentProcessId: 475
startedAt: 1647417304250
osProcessRuntime:
processorPercentageUsage: 1.5855093197443795
processorCumulativeUsage: 0.015855093197443795
memoryPercentageUsage: 0.9348580596135212
memoryUsageInBytes: 313528320
state: sleeping
upTimeInMillis: 845785
virtualMemorySize: 7464935424
residentSetSize: 313528320
threadCount: 76
contextSwitches: 1
bytesWritten: 57790464
bytesRead: 131072
minorFaults: 82683
majorFaults: 0
openFiles: 124
kernelTimeInMillis: 1130
userTimeInMillis: 845785
properties:
onteon-version: 1.1.0
java.specification.version: 15
node-hash: f8de39d8d52a10dacb162971
log4j.configurationFile: /opt/onteon/onteon-node-manager/resources/log4j/log4j2.xml
sun.jnu.encoding: ANSI_X3.4-1968
java.class.path: /opt/onteon/onteon-node-manager/start/lib/class-loader-manager-1.1.3.jar:/opt/onteon/onteon-node-manager/start/lib/utils-1.1.3.jar:/opt/onteon/onteon-node-manager/start/lib/starter-1.1.3.jar:/opt/onteon/onteon-node-manager/start/lib/module-manager-1.1.3.jar:/opt/onteon/onteon-node-manager/start/lib/class-loader-1.1.3.jar:/opt/onteon/onteon-node-manager/start/lib/ext/jackson-annotations-2.11.4.jar:/opt/onteon/onteon-node-manager/start/lib/ext/jna-platform-5.8.0.jar:/opt/onteon/onteon-node-manager/start/lib/ext/oshi-core-5.7.1.jar:/opt/onteon/onteon-node-manager/start/lib/ext/log4j-slf4j-impl-2.17.1.jar:/opt/onteon/onteon-node-manager/start/lib/ext/slf4j-api-1.7.32.jar:/opt/onteon/onteon-node-manager/start/lib/ext/commons-compress-1.20.jar:/opt/onteon/onteon-node-manager/start/lib/ext/jna-5.8.0.jar:/opt/onteon/onteon-node-manager/start/lib/ext/jackson-core-2.11.4.jar:/opt/onteon/onteon-node-manager/start/lib/ext/stormpot-3.1.jar:/opt/onteon/onteon-node-manager/start/lib/ext/log4j-layout-template-json-2.17.1.jar:/opt/onteon/onteon-node-manager/start/lib/ext/snakeyaml-1.29.jar:/opt/onteon/onteon-node-manager/start/lib/ext/jackson-databind-2.11.4.jar:/opt/onteon/onteon-node-manager/start/lib/ext/commons-text-1.9.jar:/opt/onteon/onteon-node-manager/start/lib/ext/commons-lang3-3.11.jar:/opt/onteon/onteon-node-manager/start/lib/ext/log4j-api-2.17.1.jar:/opt/onteon/onteon-node-manager/start/lib/ext/log4j-core-2.17.1.jar:/opt/onteon/onteon-node-manager/start/lib/int/common-1.0.0.jar
java.vm.vendor: Oracle Corporation
sun.arch.data.model: 64
java.vendor.url: https://java.oracle.com/
onteon.host: 172.31.0.4
user.timezone: Etc/UTC
node-manager.root: /opt/onteon/onteon-node-manager
java.vm.specification.version: 15
os.name: Linux
sun.java.launcher: SUN_STANDARD
user.country: US
sun.boot.library.path: /opt/jdk-15.0.1/lib
sun.java.command: tech.onteon.onteon.app.microloader.starter.MainStarter
jdk.debug: release
sun.cpu.endian: little
user.home: /home/onteon
user.language: en
java.specification.vendor: Oracle Corporation
java.version.date: 2020-10-20
java.home: /opt/jdk-15.0.1
file.separator: /
java.vm.compressedOopsMode: 32-bit
line.separator: \n
java.specification.name: Java Platform API Specification
java.vm.specification.vendor: Oracle Corporation
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
java.runtime.version: 15.0.1+9-18
user.name: onteon
path.separator: :
os.version: 5.4.0-70-generic
java.runtime.name: OpenJDK Runtime Environment
file.encoding: ANSI_X3.4-1968
jnidispatch.path: /home/onteon/.cache/JNA/temp/jna18309115076176810651.tmp
jna.platform.library.path: /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/usr/lib64:/lib64:/usr/lib:/lib:/usr/lib/x86_64-linux-gnu/libfakeroot
java.vm.name: OpenJDK 64-Bit Server VM
jna.loaded: true
java.vendor.url.bug: https://bugreport.java.com/bugreport/
jetty.git.hash: 69469432898becda3aed32a32d4b0adbb7b6daee
java.io.tmpdir: /tmp
java.version: 15.0.1
user.dir: /home/onteon
os.arch: amd64
java.vm.specification.name: Java Virtual Machine Specification
java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
java.vm.info: mixed mode, sharing
java.vendor: Oracle Corporation
java.vm.version: 15.0.1+9-18
sun.io.unicode.encoding: UnicodeLittle
java.class.version: 59.0
envs:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ONTEON_ADDITIONAL_JVM_PARAMS: -Donteon.host=172.31.0.4
SHELL: /bin/bash
MAIL: /var/mail/onteon
LOGNAME: onteon
TERM: xterm
PWD: /home/onteon
USER: onteon
SHLVL: 1
HOME: /home/onteon
_: /bin/java
Application Instances
First, you can list all application instances by executing onteoncli application-instance list command or using the GET /api/application-instance endpoint.
root@c14d89d70df8:/opt/onteon# onteoncli application-instance list
id createdAt applicationName applicationVersion applicationType applicationId nodeId status
8313d5ac9270a3362b158781 2022-03-16T08:13:00.383Z onteon-demo-app-cookbook-native 1.2.0 standard 62319bf2eebebe2297c349ff f8de39d8d52a10dacb162971 running
a1fdd1dc6f64549c7c8f1661 2022-03-16T07:55:07.96Z nginx-edge 1.1.3 embedded 0a1769f83abc3224fe6cb477 f8de39d8d52a10dacb162971 running
5a99ae30c02d2c214fff927f 2022-03-16T07:55:06.821Z nginx-inner 1.1.3 embedded 157958ad0cdf14266501ad70 f8de39d8d52a10dacb162971 running
464e2627c46c27492849690d 2022-03-16T07:55:06.48Z nginx-edge 1.1.3 embedded 0a1769f83abc3224fe6cb477 515ae71303070e256d799a47 running
d7f8d5fe54f3d6aadc269cc1 2022-03-16T07:55:05.237Z nginx-inner 1.1.3 embedded 157958ad0cdf14266501ad70 515ae71303070e256d799a47 running
Then, you can get application instance details by
executing onteoncli application-instance details
root@c14d89d70df8:/opt/onteon# onteoncli application-instance details 8313d5ac9270a3362b158781
id: 62319d10eebebe2297c34adf
configuration: null
info:
path: /opt/onteon/onteon-node-manager/app/62319bf2eebebe2297c349ff/runtime/8313d5ac9270a3362b158781
tcpPorts:
0: 10000
providerInfo:
applicationType: null
processType: null
osProcessInfo:
processId: null
name: java
path: /opt/jdk-15.0.1/bin/java
commandLine: java\u0000-jar\u0000-Dlog.dir=/opt/onteon/onteon-node-manager/log/app/onteon-demo-app-cookbook-native/1.2.0/62319bf2eebebe2297c349ff/8313d5ac9270a3362b158781\u0000-Dserver.servlet.session.cookie.path=/_by_name/onteon-demo-app-cookbook-native/cookbook\u0000-Dserver.port=10000\u0000/opt/onteon/onteon-node-manager/app/62319bf2eebebe2297c349ff/runtime/8313d5ac9270a3362b158781/bin/app.war\u0000-Xms128M\u0000-Xmx256M\u0000-XX:+HeapDumpOnOutOfMemoryError\u0000-XX:HeapDumpPath=/opt/onteon/onteon-node-manager/app/62319bf2eebebe2297c349ff/runtime/8313d5ac9270a3362b158781/bin/dump\u0000
currentWorkingDirectory: /home/onteon
user: onteon
userId: 1000
group: docker
groupId: 999
priority: 20
parentProcessId: 497
startedAt: 1647418389730
osProcessRuntime:
processorPercentageUsage: 304.21166306695466
processorCumulativeUsage: 3.0421166306695464
memoryPercentageUsage: 1.2975407291318846
memoryUsageInBytes: 435163136
state: sleeping
upTimeInMillis: 9260
virtualMemorySize: 12837040128
residentSetSize: 435163136
threadCount: 38
contextSwitches: 1
bytesWritten: 17408000
bytesRead: 2560000
minorFaults: 253864
majorFaults: 2
openFiles: 14
kernelTimeInMillis: 840
userTimeInMillis: 9260
childrenProcessIds:
Create application instance
To create an application instance, you need to choose
the application id and the target node id. Then,
you can create an application instance by
executing onteoncli application-instance create
root@c14d89d70df8:/opt/onteon# onteoncli application-instance create 62319bf2eebebe2297c349ff 515ae71303070e256d799a47
id: 1e14cee18cdae557438371a1
createdAt: 2022-03-16T08:28:18.406Z
applicationName: onteon-demo-app-cookbook-native
applicationVersion: 1.2.0
applicationType: standard
applicationId: 62319bf2eebebe2297c349ff
nodeId: 515ae71303070e256d799a47
status: created
Start application instance
To start an application instance, you need to choose
the application-instance id and then execute
onteoncli application-instance start
root@c14d89d70df8:/opt/onteon# onteoncli application-instance start 1e14cee18cdae557438371a1
start instance described by input:{instanceId=1e14cee18cdae557438371a1, appId=62319bf2eebebe2297c349ff}
start instance described by appId:62319bf2eebebe2297c349ff, instanceId:1e14cee18cdae557438371a1
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.2)
2022-03-16 08:30:30.561 INFO 756 --- [ main] o.d.m.o.OnteonDemoAppCookbookApplication : Starting OnteonDemoAppCookbookApplication v0.0.0-SNAPSHOT using Java 15.0.1 on fba1b776609f with PID 756 (/opt/onteon/onteon-node-manager/app/62319bf2eebebe2297c349ff/runtime/1e14cee18cdae557438371a1/bin/app.war started by onteon in /home/onteon)
2022-03-16 08:30:30.587 INFO 756 --- [ main] o.d.m.o.OnteonDemoAppCookbookApplication : No active profile set, falling back to default profiles: default
2022-03-16 08:30:31.396 INFO 756 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-03-16 08:30:31.470 INFO 756 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 64 ms. Found 2 JPA repository interfaces.
2022-03-16 08:30:32.299 INFO 756 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 10000 (http)
2022-03-16 08:30:32.310 INFO 756 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-03-16 08:30:32.311 INFO 756 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.56]
2022-03-16 08:30:33.432 INFO 756 --- [ main] o.a.c.c.C.[.[localhost].[/cookbook] : Initializing Spring embedded WebApplicationContext
2022-03-16 08:30:33.432 INFO 756 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2781 ms
2022-03-16 08:30:33.477 INFO 756 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-03-16 08:30:33.723 INFO 756 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-03-16 08:30:33.737 INFO 756 --- [ main] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:testdb'
2022-03-16 08:30:33.842 WARN 756 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2022-03-16 08:30:33.939 INFO 756 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-03-16 08:30:33.991 INFO 756 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.3.Final
2022-03-16 08:30:34.147 INFO 756 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-03-16 08:30:34.262 INFO 756 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2022-03-16 08:30:34.966 INFO 756 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-03-16 08:30:34.975 INFO 756 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-03-16 08:30:36.665 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Created users
2022-03-16 08:30:36.668 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: lpidcock3 Password: password Role: ROLE_USER
2022-03-16 08:30:36.669 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: ematissoffk Password: password Role: ROLE_USER
2022-03-16 08:30:36.669 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: akeig2i Password: password Role: ROLE_USER
2022-03-16 08:30:36.669 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: dshelford6 Password: password Role: ROLE_USER
2022-03-16 08:30:36.670 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: icoyett7 Password: password Role: ROLE_USER
2022-03-16 08:30:36.670 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: glambswood1q Password: password Role: ROLE_USER
2022-03-16 08:30:36.670 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: atavner1a Password: password Role: ROLE_USER
2022-03-16 08:30:36.670 INFO 756 --- [ main] t.o.d.m.o.c.DataConfiguration : Username: admin Password: password Role: ROLE_ADMIN
2022-03-16 08:30:36.851 INFO 756 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6554f841, org.springframework.security.web.context.SecurityContextPersistenceFilter@3c67b7a9, org.springframework.security.web.header.HeaderWriterFilter@7c6f91d2, org.springframework.web.filter.CorsFilter@10895b16, org.springframework.security.web.authentication.logout.LogoutFilter@1ca6323c, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@64934acd, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@47de4dce, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@19b6b7e7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1bef1304, org.springframework.security.web.session.SessionManagementFilter@67d8e214, org.springframework.security.web.access.ExceptionTranslationFilter@67bf393c, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@b24e21f]
2022-03-16 08:30:37.100 INFO 756 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: ServletContext resource [/index.html]
2022-03-16 08:30:37.251 INFO 756 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 10000 (http) with context path '/cookbook'
2022-03-16 08:30:37.261 INFO 756 --- [ main] o.d.m.o.OnteonDemoAppCookbookApplication : Started OnteonDemoAppCookbookApplication in 7.39 seconds (JVM running for 7.827)
2022-03-16 08:30:37.263 INFO 756 --- [ main] t.o.d.m.o.c.WebMvcConfiguration : Spring Boot properly started
process:onteon-demo-app-cookbook-native--1.2.0--62319bf2eebebe2297c349ff--1e14cee18cdae557438371a1 with pid:'756 was correctly started
resultType: SUCCESS
message: Command executed successfully.
Stop application instance
To stop an application instance, you need to choose
the application-instance id and then execute
onteoncli application-instance stop
root@c14d89d70df8:/opt/onteon# onteoncli application-instance stop 1e14cee18cdae557438371a1
stop instance described by input:{instanceId=1e14cee18cdae557438371a1, appId=62319bf2eebebe2297c349ff}
start wait:45000 after unregister in service repo - app name:onteon-demo-app-cookbook-native, app version:1.2.0, instance name:onteon-demo-app-cookbook-native--1.2.0--62319bf2eebebe2297c349ff--1e14cee18cdae557438371a1
stop wait after unregister in service repo - app name:onteon-demo-app-cookbook-native, app version:1.2.0, instance name:onteon-demo-app-cookbook-native--1.2.0--62319bf2eebebe2297c349ff--1e14cee18cdae557438371a1
process:onteon-demo-app-cookbook-native--1.2.0--62319bf2eebebe2297c349ff--1e14cee18cdae557438371a1 with pid:'756 was correctly terminated
resultType: SUCCESS
message: Command executed successfully.
Delete application instance
To delete an application instance, you need to choose
the application-instance id and then execute
onteoncli application-instance delete
root@c14d89d70df8:/opt/onteon# onteoncli application-instance delete 1e14cee18cdae557438371a1
id: 1e14cee18cdae557438371a1
createdAt: 2022-03-16T08:28:18.406Z
applicationName: onteon-demo-app-cookbook-native
applicationVersion: 1.2.0
applicationType: standard
applicationId: 62319bf2eebebe2297c349ff
nodeId: 515ae71303070e256d799a47
status: removed