rename some installers, fix installer service startup w/ zinit
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// This file demonstrates how to configure all Horus components using heroscript
|
||||
|
||||
// Configure Coordinator
|
||||
!!herocoordinator.configure
|
||||
!!coordinator.configure
|
||||
name:'default'
|
||||
binary_path:'/hero/var/bin/coordinator'
|
||||
redis_addr:'127.0.0.1:6379'
|
||||
|
||||
@@ -13,6 +13,11 @@ import incubaid.herolib.osal.tmux
|
||||
import incubaid.herolib.installers.base
|
||||
import incubaid.herolib.installers.lang.vlang
|
||||
import incubaid.herolib.installers.lang.herolib
|
||||
import incubaid.herolib.installers.horus.coordinator
|
||||
import incubaid.herolib.installers.horus.supervisor
|
||||
import incubaid.herolib.installers.horus.herorunner
|
||||
import incubaid.herolib.installers.horus.osirisrunner
|
||||
import incubaid.herolib.installers.horus.salrunner
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// run – entry point for all HeroScript play‑commands
|
||||
@@ -69,6 +74,13 @@ pub fn run(args_ PlayArgs) ! {
|
||||
|
||||
giteaclient.play(mut plbook)!
|
||||
|
||||
// Horus
|
||||
coordinator.play(mut plbook)!
|
||||
supervisor.play(mut plbook)!
|
||||
herorunner.play(mut plbook)!
|
||||
osirisrunner.play(mut plbook)!
|
||||
salrunner.play(mut plbook)!
|
||||
|
||||
if args.emptycheck {
|
||||
// Ensure we did not leave any actions un‑processed
|
||||
plbook.empty_check()!
|
||||
|
||||
@@ -21,6 +21,11 @@ import incubaid.herolib.clients.zerodb_client
|
||||
import incubaid.herolib.clients.zinit
|
||||
import incubaid.herolib.develop.heroprompt
|
||||
import incubaid.herolib.installers.db.meilisearch_installer
|
||||
import incubaid.herolib.installers.horus.coordinator
|
||||
import incubaid.herolib.installers.horus.supervisor
|
||||
import incubaid.herolib.installers.horus.herorunner
|
||||
import incubaid.herolib.installers.horus.osirisrunner
|
||||
import incubaid.herolib.installers.horus.salrunner
|
||||
import incubaid.herolib.installers.infra.coredns
|
||||
import incubaid.herolib.installers.infra.gitea
|
||||
import incubaid.herolib.installers.infra.livekit
|
||||
@@ -38,7 +43,6 @@ import incubaid.herolib.installers.sysadmintools.garage_s3
|
||||
import incubaid.herolib.installers.threefold.griddriver
|
||||
import incubaid.herolib.installers.virt.cloudhypervisor
|
||||
import incubaid.herolib.installers.virt.docker
|
||||
import incubaid.herolib.installers.virt.herorunner
|
||||
import incubaid.herolib.installers.virt.kubernetes_installer
|
||||
import incubaid.herolib.installers.virt.lima
|
||||
import incubaid.herolib.installers.virt.pacman
|
||||
@@ -109,4 +113,9 @@ pub fn run_all(args_ PlayArgs) ! {
|
||||
zola.play(mut plbook)!
|
||||
hetznermanager.play(mut plbook)!
|
||||
kubernetes.play(mut plbook)!
|
||||
coordinator.play(mut plbook)!
|
||||
supervisor.play(mut plbook)!
|
||||
herorunner.play(mut plbook)!
|
||||
osirisrunner.play(mut plbook)!
|
||||
salrunner.play(mut plbook)!
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
!!hero_code.generate_installer
|
||||
name:''
|
||||
classname:'CoordinatorServer'
|
||||
classname:'Coordinator'
|
||||
singleton:0
|
||||
templates:1
|
||||
default:1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
!!hero_code.generate_installer
|
||||
name:''
|
||||
classname:'HerorunnerServer'
|
||||
classname:'Herorunner'
|
||||
singleton:0
|
||||
templates:1
|
||||
default:1
|
||||
|
||||
@@ -12,7 +12,7 @@ const default = true
|
||||
|
||||
// THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
|
||||
@[heap]
|
||||
pub struct HerorunnerServer {
|
||||
pub struct Herorunner {
|
||||
pub mut:
|
||||
name string = 'default'
|
||||
binary_path string = os.join_path(os.home_dir(), 'hero/bin/herorunner')
|
||||
@@ -21,7 +21,7 @@ pub mut:
|
||||
}
|
||||
|
||||
// your checking & initialization code if needed
|
||||
fn obj_init(mycfg_ HerorunnerServer) !HerorunnerServer {
|
||||
fn obj_init(mycfg_ Herorunner) !Herorunner {
|
||||
mut mycfg := mycfg_
|
||||
if mycfg.name == '' {
|
||||
mycfg.name = 'default'
|
||||
@@ -48,11 +48,11 @@ fn configure() ! {
|
||||
|
||||
/////////////NORMALLY NO NEED TO TOUCH
|
||||
|
||||
pub fn heroscript_dumps(obj HerorunnerServer) !string {
|
||||
return encoderhero.encode[HerorunnerServer](obj)!
|
||||
pub fn heroscript_dumps(obj Herorunner) !string {
|
||||
return encoderhero.encode[Herorunner](obj)!
|
||||
}
|
||||
|
||||
pub fn heroscript_loads(heroscript string) !HerorunnerServer {
|
||||
mut obj := encoderhero.decode[HerorunnerServer](heroscript)!
|
||||
pub fn heroscript_loads(heroscript string) !Herorunner {
|
||||
mut obj := encoderhero.decode[Herorunner](heroscript)!
|
||||
return obj
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
!!hero_code.generate_installer
|
||||
name:''
|
||||
classname:'OsirisrunnerServer'
|
||||
classname:'Osirisrunner'
|
||||
singleton:0
|
||||
templates:1
|
||||
default:1
|
||||
|
||||
@@ -12,7 +12,7 @@ const default = true
|
||||
|
||||
// THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
|
||||
@[heap]
|
||||
pub struct OsirisrunnerServer {
|
||||
pub struct Osirisrunner {
|
||||
pub mut:
|
||||
name string = 'default'
|
||||
binary_path string = os.join_path(os.home_dir(), 'hero/bin/runner_osiris')
|
||||
@@ -22,7 +22,7 @@ pub mut:
|
||||
}
|
||||
|
||||
// your checking & initialization code if needed
|
||||
fn obj_init(mycfg_ OsirisrunnerServer) !OsirisrunnerServer {
|
||||
fn obj_init(mycfg_ Osirisrunner) !Osirisrunner {
|
||||
mut mycfg := mycfg_
|
||||
if mycfg.name == '' {
|
||||
mycfg.name = 'default'
|
||||
@@ -52,11 +52,11 @@ fn configure() ! {
|
||||
|
||||
/////////////NORMALLY NO NEED TO TOUCH
|
||||
|
||||
pub fn heroscript_dumps(obj OsirisrunnerServer) !string {
|
||||
return encoderhero.encode[OsirisrunnerServer](obj)!
|
||||
pub fn heroscript_dumps(obj Osirisrunner) !string {
|
||||
return encoderhero.encode[Osirisrunner](obj)!
|
||||
}
|
||||
|
||||
pub fn heroscript_loads(heroscript string) !OsirisrunnerServer {
|
||||
mut obj := encoderhero.decode[OsirisrunnerServer](heroscript)!
|
||||
pub fn heroscript_loads(heroscript string) !Osirisrunner {
|
||||
mut obj := encoderhero.decode[Osirisrunner](heroscript)!
|
||||
return obj
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
!!hero_code.generate_installer
|
||||
name:''
|
||||
classname:'SalrunnerServer'
|
||||
classname:'Salrunner'
|
||||
singleton:0
|
||||
templates:1
|
||||
default:1
|
||||
|
||||
@@ -12,7 +12,7 @@ const default = true
|
||||
|
||||
// THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
|
||||
@[heap]
|
||||
pub struct SalrunnerServer {
|
||||
pub struct Salrunner {
|
||||
pub mut:
|
||||
name string = 'default'
|
||||
binary_path string = os.join_path(os.home_dir(), 'hero/bin/runner_sal')
|
||||
@@ -22,7 +22,7 @@ pub mut:
|
||||
}
|
||||
|
||||
// your checking & initialization code if needed
|
||||
fn obj_init(mycfg_ SalrunnerServer) !SalrunnerServer {
|
||||
fn obj_init(mycfg_ Salrunner) !Salrunner {
|
||||
mut mycfg := mycfg_
|
||||
if mycfg.name == '' {
|
||||
mycfg.name = 'default'
|
||||
@@ -52,11 +52,11 @@ fn configure() ! {
|
||||
|
||||
/////////////NORMALLY NO NEED TO TOUCH
|
||||
|
||||
pub fn heroscript_dumps(obj SalrunnerServer) !string {
|
||||
return encoderhero.encode[SalrunnerServer](obj)!
|
||||
pub fn heroscript_dumps(obj Salrunner) !string {
|
||||
return encoderhero.encode[Salrunner](obj)!
|
||||
}
|
||||
|
||||
pub fn heroscript_loads(heroscript string) !SalrunnerServer {
|
||||
mut obj := encoderhero.decode[SalrunnerServer](heroscript)!
|
||||
pub fn heroscript_loads(heroscript string) !Salrunner {
|
||||
mut obj := encoderhero.decode[Salrunner](heroscript)!
|
||||
return obj
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
!!hero_code.generate_installer
|
||||
name:''
|
||||
classname:'SupervisorServer'
|
||||
classname:'Supervisor'
|
||||
singleton:0
|
||||
templates:1
|
||||
default:1
|
||||
|
||||
@@ -18,7 +18,8 @@ pub fn get(cat StartupManagerType) !StartupManager {
|
||||
}
|
||||
match sm.cat {
|
||||
.zinit {
|
||||
mut zinit_client_test := zinit.get()! // 'create:true' ensures a client object is initiated even if the socket isn't active.
|
||||
mut zinit_client_test := zinit.get(create: true)! // 'create:true' ensures a client object is initiated even if the socket isn't active.
|
||||
|
||||
if _ := zinit_client_test.rpc_discover() {
|
||||
sm.cat = .zinit
|
||||
} else {
|
||||
|
||||
@@ -33,7 +33,7 @@ pub fn (mut t UnixSocketTransport) send(request string, params SendParams) !stri
|
||||
// Close the socket explicitly
|
||||
unix.shutdown(socket.sock.handle)
|
||||
socket.close() or {}
|
||||
print_backtrace()
|
||||
// print_backtrace()
|
||||
console.print_debug('The server did not close the socket, we did timeout or there was other error.')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user