Merge branch 'development_nile_installers' into development_fix_zinit

This commit is contained in:
Timur Gordon
2025-11-20 07:56:48 +01:00
committed by GitHub
13 changed files with 103 additions and 129 deletions

View File

@@ -154,13 +154,13 @@ pub fn play(mut plbook PlayBook) ! {
}
mut other_actions := plbook.find(filter: 'coordinator.')!
for mut other_action in other_actions {
if other_action.name in ['destroy', 'install', 'build'] {
if other_action.name in ['destroy', 'install', 'build', 'start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get_default('name', 'default')!
reset := p.get_default_false('reset')
mut coordinator_obj := get(name: name)!
console.print_debug('action object:\n${coordinator_obj}')
if other_action.name == 'destroy' || reset {
console.print_debug('install action coordinator.destroy')
coordinator_obj.destroy()!
@@ -173,12 +173,6 @@ pub fn play(mut plbook PlayBook) ! {
console.print_debug('install action coordinator.build')
coordinator_obj.build()!
}
}
if other_action.name in ['start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get('name')!
mut coordinator_obj := get(name: name)!
console.print_debug('action object:\n${coordinator_obj}')
if other_action.name == 'start' {
console.print_debug('install action coordinator.${other_action.name}')
coordinator_obj.start()!

View File

@@ -14,7 +14,7 @@ const default = true
@[heap]
pub struct Coordinator {
pub mut:
name string = 'coordinator'
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/coordinator')
redis_addr string = '127.0.0.1:6379'
http_port int = 8081

View File

@@ -142,7 +142,7 @@ pub fn play(mut plbook PlayBook) ! {
}
mut other_actions := plbook.find(filter: 'herorunner.')!
for mut other_action in other_actions {
if other_action.name in ['destroy', 'install', 'build'] {
if other_action.name in ['destroy', 'install', 'build', 'start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get_default('name', 'default')!
reset := p.get_default_false('reset')
@@ -161,12 +161,6 @@ pub fn play(mut plbook PlayBook) ! {
console.print_debug('install action herorunner.build')
herorunner_obj.build()!
}
}
if other_action.name in ['start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get('name')!
mut herorunner_obj := get(name: name)!
console.print_debug('action object:\n${herorunner_obj}')
if other_action.name == 'start' {
console.print_debug('install action herorunner.${other_action.name}')
herorunner_obj.start()!

View File

@@ -14,10 +14,10 @@ const default = true
@[heap]
pub struct Herorunner {
pub mut:
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/herorunner')
redis_addr string = '127.0.0.1:6379'
log_level string = 'info'
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/herorunner')
redis_addr string = '127.0.0.1:6379'
log_level string = 'info'
}
// your checking & initialization code if needed

View File

@@ -144,7 +144,7 @@ pub fn play(mut plbook PlayBook) ! {
}
mut other_actions := plbook.find(filter: 'osirisrunner.')!
for mut other_action in other_actions {
if other_action.name in ['destroy', 'install', 'build'] {
if other_action.name in ['destroy', 'install', 'build', 'start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get_default('name', 'default')!
reset := p.get_default_false('reset')
@@ -163,12 +163,6 @@ pub fn play(mut plbook PlayBook) ! {
console.print_debug('install action osirisrunner.build')
osirisrunner_obj.build()!
}
}
if other_action.name in ['start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get('name')!
mut osirisrunner_obj := get(name: name)!
console.print_debug('action object:\n${osirisrunner_obj}')
if other_action.name == 'start' {
console.print_debug('install action osirisrunner.${other_action.name}')
osirisrunner_obj.start()!

View File

@@ -14,11 +14,11 @@ const default = true
@[heap]
pub struct Osirisrunner {
pub mut:
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/runner_osiris')
redis_addr string = '127.0.0.1:6379'
log_level string = 'info'
repo_path string = '/root/code/git.ourworld.tf/herocode/horus'
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/runner_osiris')
redis_addr string = '127.0.0.1:6379'
log_level string = 'info'
repo_path string = '/root/code/git.ourworld.tf/herocode/horus'
}
// your checking & initialization code if needed

View File

@@ -144,7 +144,7 @@ pub fn play(mut plbook PlayBook) ! {
}
mut other_actions := plbook.find(filter: 'salrunner.')!
for mut other_action in other_actions {
if other_action.name in ['destroy', 'install', 'build'] {
if other_action.name in ['destroy', 'install', 'build', 'start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get_default('name', 'default')!
reset := p.get_default_false('reset')
@@ -163,12 +163,6 @@ pub fn play(mut plbook PlayBook) ! {
console.print_debug('install action salrunner.build')
salrunner_obj.build()!
}
}
if other_action.name in ['start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get('name')!
mut salrunner_obj := get(name: name)!
console.print_debug('action object:\n${salrunner_obj}')
if other_action.name == 'start' {
console.print_debug('install action salrunner.${other_action.name}')
salrunner_obj.start()!

View File

@@ -14,11 +14,11 @@ const default = true
@[heap]
pub struct Salrunner {
pub mut:
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/runner_sal')
redis_addr string = '127.0.0.1:6379'
log_level string = 'info'
repo_path string = '/root/code/git.ourworld.tf/herocode/horus'
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/runner_sal')
redis_addr string = '127.0.0.1:6379'
log_level string = 'info'
repo_path string = '/root/code/git.ourworld.tf/herocode/horus'
}
// your checking & initialization code if needed

View File

@@ -153,7 +153,7 @@ pub fn play(mut plbook PlayBook) ! {
}
mut other_actions := plbook.find(filter: 'supervisor.')!
for mut other_action in other_actions {
if other_action.name in ['destroy', 'install', 'build'] {
if other_action.name in ['destroy', 'install', 'build', 'start', 'stop', 'restart', 'start_pre', 'start_post', 'stop_pre', 'stop_post'] {
mut p := other_action.params
name := p.get_default('name', 'default')!
reset := p.get_default_false('reset')

View File

@@ -14,13 +14,13 @@ const default = true
@[heap]
pub struct Supervisor {
pub mut:
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/supervisor')
redis_addr string = '127.0.0.1:6379'
http_port int = 8082
ws_port int = 9654
log_level string = 'info'
repo_path string = '/root/code/git.ourworld.tf/herocode/horus'
name string = 'default'
binary_path string = os.join_path(os.home_dir(), 'hero/bin/supervisor')
redis_addr string = '127.0.0.1:6379'
http_port int = 8082
ws_port int = 9654
log_level string = 'info'
repo_path string = '/root/code/git.ourworld.tf/herocode/horus'
}
// your checking & initialization code if needed