...
This commit is contained in:
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&CometBFT {
|
||||
if r.hexists('context:cometbft', args.name)! {
|
||||
data := r.hget('context:cometbft', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('CometBFT with name: cometbft does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(CometBFT, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&CometBFT {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("CometBFT with name 'cometbft' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return cometbft_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for cometbft with name:cometbft')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'cometbft.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'cometbft.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
cometbft_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: cometbft' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: cometbft' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: cometbft' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: cometbft' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -208,7 +213,7 @@ pub fn (mut self CometBFT) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('cometbft start')
|
||||
console.print_header('installer: cometbft start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -221,7 +226,7 @@ pub fn (mut self CometBFT) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting cometbft with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: cometbft starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&MeilisearchInstaller {
|
||||
if r.hexists('context:meilisearch_installer', args.name)! {
|
||||
data := r.hget('context:meilisearch_installer', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('MeilisearchInstaller with name: meilisearch_installer does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(MeilisearchInstaller, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&MeilisearchInstaller {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("MeilisearchInstaller with name 'meilisearch_installer' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return meilisearch_installer_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for meilisearch_installer with name:meilisearch_installer')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'meilisearch_installer.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'meilisearch_installer.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
meilisearch_installer_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: meilisearch_installer' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: meilisearch_installer' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: meilisearch_installer' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: meilisearch_installer' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -208,7 +213,7 @@ pub fn (mut self MeilisearchInstaller) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('meilisearch_installer start')
|
||||
console.print_header('installer: meilisearch_installer start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -221,7 +226,7 @@ pub fn (mut self MeilisearchInstaller) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting meilisearch_installer with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: meilisearch_installer starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&Postgresql {
|
||||
if r.hexists('context:postgresql', args.name)! {
|
||||
data := r.hget('context:postgresql', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('Postgresql with name: postgresql does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(Postgresql, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&Postgresql {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("Postgresql with name 'postgresql' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return postgresql_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for postgresql with name:postgresql')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'postgresql.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'postgresql.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
postgresql_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: postgresql' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: postgresql' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: postgresql' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: postgresql' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -206,7 +211,7 @@ pub fn (mut self Postgresql) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('postgresql start')
|
||||
console.print_header('installer: postgresql start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -219,7 +224,7 @@ pub fn (mut self Postgresql) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting postgresql with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: postgresql starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&QDrant {
|
||||
if r.hexists('context:qdrant_installer', args.name)! {
|
||||
data := r.hget('context:qdrant_installer', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('QDrant with name: qdrant_installer does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(QDrant, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&QDrant {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("QDrant with name 'qdrant_installer' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return qdrant_installer_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for qdrant_installer with name:qdrant_installer')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'qdrant_installer.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'qdrant_installer.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
qdrant_installer_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: qdrant_installer' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: qdrant_installer' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: qdrant_installer' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: qdrant_installer' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -208,7 +213,7 @@ pub fn (mut self QDrant) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('qdrant_installer start')
|
||||
console.print_header('installer: qdrant_installer start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -221,7 +226,7 @@ pub fn (mut self QDrant) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting qdrant_installer with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: qdrant_installer starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&ZeroDB {
|
||||
if r.hexists('context:zerodb', args.name)! {
|
||||
data := r.hget('context:zerodb', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('ZeroDB with name: zerodb does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(ZeroDB, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&ZeroDB {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("ZeroDB with name 'zerodb' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return zerodb_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for zerodb with name:zerodb')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'zerodb.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'zerodb.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
zerodb_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: zerodb' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: zerodb' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: zerodb' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: zerodb' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -206,7 +211,7 @@ pub fn (mut self ZeroDB) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('zerodb start')
|
||||
console.print_header('installer: zerodb start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -219,7 +224,7 @@ pub fn (mut self ZeroDB) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting zerodb with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: zerodb starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure zerofs, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'zerofs.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
zerofs_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: zerofs' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: zerofs' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: zerofs' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: zerofs' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self ZeroFS) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('zerofs start')
|
||||
console.print_header('installer: zerofs start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self ZeroFS) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting zerofs with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: zerofs starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&CoreDNS {
|
||||
if r.hexists('context:coredns', args.name)! {
|
||||
data := r.hget('context:coredns', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('CoreDNS with name: coredns does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(CoreDNS, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&CoreDNS {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("CoreDNS with name 'coredns' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return coredns_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for coredns with name:coredns')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'coredns.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'coredns.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
coredns_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: coredns' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: coredns' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: coredns' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: coredns' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -206,7 +211,7 @@ pub fn (mut self CoreDNS) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('coredns start')
|
||||
console.print_header('installer: coredns start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -219,7 +224,7 @@ pub fn (mut self CoreDNS) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting coredns with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: coredns starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
module coredns
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.installers.infra.coredns { install }
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
if !plbook.exists(filter: 'coredns.') {
|
||||
return
|
||||
}
|
||||
|
||||
mut install_action := plbook.ensure_once(filter: 'coredns.install')!
|
||||
mut p := install_action.params
|
||||
|
||||
mut args := InstallArgs{
|
||||
reset: p.get_default_false('reset')
|
||||
}
|
||||
|
||||
console.print_header('Executing coredns.install action')
|
||||
install(args)!
|
||||
|
||||
install_action.done = true
|
||||
}
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&GiteaServer {
|
||||
if r.hexists('context:gitea', args.name)! {
|
||||
data := r.hget('context:gitea', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('GiteaServer with name: gitea does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(GiteaServer, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&GiteaServer {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("GiteaServer with name 'gitea' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return gitea_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for gitea with name:gitea')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'gitea.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'gitea.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
gitea_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: gitea' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: gitea' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: gitea' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: gitea' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -206,7 +211,7 @@ pub fn (mut self GiteaServer) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('gitea start')
|
||||
console.print_header('installer: gitea start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -219,7 +224,7 @@ pub fn (mut self GiteaServer) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting gitea with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: gitea starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -20,4 +20,4 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install(args)!
|
||||
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,19 +135,13 @@ fn install() ! {
|
||||
|
||||
fn destroy() ! {
|
||||
console.print_header('removing livekit')
|
||||
osal.process_kill_recursive(name: 'livekit') or {
|
||||
return error('Could not kill livekit due to: ${err}')
|
||||
}
|
||||
res := os.execute('sudo rm -rf /usr/local/bin/livekit-server')
|
||||
if res.exit_code != 0 {
|
||||
return error('Failed to remove LiveKit server')
|
||||
}
|
||||
|
||||
mut zinit_factory := zinit.new()!
|
||||
if zinit_factory.exists('livekit') {
|
||||
zinit_factory.stop('livekit') or {
|
||||
return error('Could not stop livekit service due to: ${err}')
|
||||
}
|
||||
zinit_factory.delete('livekit') or {
|
||||
return error('Could not delete livekit service due to: ${err}')
|
||||
}
|
||||
}
|
||||
console.print_header('livekit removed')
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&LivekitServer {
|
||||
if r.hexists('context:livekit', args.name)! {
|
||||
data := r.hget('context:livekit', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('LivekitServer with name: livekit does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(LivekitServer, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&LivekitServer {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("LivekitServer with name 'livekit' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return livekit_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for livekit with name:livekit')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'livekit.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'livekit.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
livekit_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: livekit' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: livekit' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: livekit' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: livekit' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -208,7 +213,7 @@ pub fn (mut self LivekitServer) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('livekit start')
|
||||
console.print_header('installer: livekit start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -221,7 +226,7 @@ pub fn (mut self LivekitServer) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting livekit with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: livekit starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
module livekit
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.installers.infra.livekit { install }
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
if !plbook.exists(filter: 'livekit.') {
|
||||
return
|
||||
}
|
||||
|
||||
mut install_action := plbook.ensure_once(filter: 'livekit.install')!
|
||||
mut p := install_action.params
|
||||
|
||||
mut args := InstallArgs{
|
||||
reset: p.get_default_false('reset')
|
||||
}
|
||||
|
||||
console.print_header('Executing livekit.install action')
|
||||
install(args)!
|
||||
|
||||
install_action.done = true
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
module zinit_installer
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.installers.infra.zinit_installer { install }
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
if !plbook.exists(filter: 'zinit_installer.') {
|
||||
return
|
||||
}
|
||||
|
||||
mut install_action := plbook.ensure_once(filter: 'zinit_installer.install')!
|
||||
mut p := install_action.params
|
||||
|
||||
mut args := InstallArgs{
|
||||
reset: p.get_default_false('reset')
|
||||
}
|
||||
|
||||
console.print_header('Executing zinit_installer.install action')
|
||||
install(args)!
|
||||
|
||||
install_action.done = true
|
||||
}
|
||||
@@ -16,7 +16,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
||||
if core.is_linux()! {
|
||||
res << startupmanager.ZProcessNewArgs{
|
||||
name: 'zinit'
|
||||
cmd: '/usr/local/bin/zinit init ${os.home_dir()}/hero/cfg/zinit'
|
||||
cmd: '/usr/local/bin/zinit init -c ${os.home_dir()}/hero/cfg/zinit'
|
||||
startuptype: .systemd
|
||||
start: true
|
||||
restart: true
|
||||
@@ -24,7 +24,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
||||
} else {
|
||||
res << startupmanager.ZProcessNewArgs{
|
||||
name: 'zinit'
|
||||
cmd: '${os.home_dir()}/hero/bin/zinit init --config ${os.home_dir()}/hero/cfg/zinit'
|
||||
cmd: '${os.home_dir()}/hero/bin/zinit init -c ${os.home_dir()}/hero/cfg/zinit'
|
||||
startuptype: .screen
|
||||
start: true
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure zinit_installer, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'zinit_installer.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
zinit_installer_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: zinit_installer' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: zinit_installer' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: zinit_installer' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: zinit_installer' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self ZinitInstaller) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('zinit_installer start')
|
||||
console.print_header('installer: zinit_installer start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self ZinitInstaller) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting zinit_installer with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: zinit_installer starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure golang, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'golang.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure nodejs, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'nodejs.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure python, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'python.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure rust, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'rust.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&MyceliumInstaller {
|
||||
if r.hexists('context:mycelium_installer', args.name)! {
|
||||
data := r.hget('context:mycelium_installer', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('MyceliumInstaller with name: mycelium_installer does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(MyceliumInstaller, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&MyceliumInstaller {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("MyceliumInstaller with name 'mycelium_installer' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return mycelium_installer_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for mycelium_installer with name:mycelium_installer')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'mycelium_installer.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'mycelium_installer.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
mycelium_installer_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: mycelium_installer' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: mycelium_installer' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: mycelium_installer' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: mycelium_installer' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -208,7 +213,7 @@ pub fn (mut self MyceliumInstaller) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('mycelium_installer start')
|
||||
console.print_header('installer: mycelium_installer start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -221,7 +226,7 @@ pub fn (mut self MyceliumInstaller) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting mycelium_installer with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: mycelium_installer starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure wireguard_installer, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'wireguard_installer.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure yggdrasil, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'yggdrasil.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
yggdrasil_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: yggdrasil' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: yggdrasil' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: yggdrasil' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: yggdrasil' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self YggdrasilInstaller) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('yggdrasil start')
|
||||
console.print_header('installer: yggdrasil start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self YggdrasilInstaller) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting yggdrasil with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: yggdrasil starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure actrunner, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'actrunner.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
actrunner_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: actrunner' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: actrunner' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: actrunner' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: actrunner' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self ActRunner) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('actrunner start')
|
||||
console.print_header('installer: actrunner start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self ActRunner) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting actrunner with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: actrunner starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure b2, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'b2.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure fungistor, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'fungistor.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
fungistor_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: fungistor' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: fungistor' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: fungistor' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: fungistor' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self FungiStor) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('fungistor start')
|
||||
console.print_header('installer: fungistor start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self FungiStor) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting fungistor with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: fungistor starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&GarageS3 {
|
||||
if r.hexists('context:garage_s3', args.name)! {
|
||||
data := r.hget('context:garage_s3', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('GarageS3 with name: garage_s3 does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(GarageS3, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&GarageS3 {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("GarageS3 with name 'garage_s3' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return garage_s3_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for garage_s3 with name:garage_s3')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'garage_s3.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'garage_s3.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
garage_s3_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: garage_s3' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: garage_s3' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: garage_s3' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: garage_s3' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -208,7 +213,7 @@ pub fn (mut self GarageS3) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('garage_s3 start')
|
||||
console.print_header('installer: garage_s3 start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -221,7 +226,7 @@ pub fn (mut self GarageS3) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting garage_s3 with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: garage_s3 starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure grafana, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'grafana.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
grafana_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: grafana' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: grafana' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: grafana' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: grafana' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self Grafana) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('grafana start')
|
||||
console.print_header('installer: grafana start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self Grafana) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting grafana with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: grafana starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure prometheus, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'prometheus.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
prometheus_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: prometheus' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: prometheus' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: prometheus' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: prometheus' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self Prometheus) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('prometheus start')
|
||||
console.print_header('installer: prometheus start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self Prometheus) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting prometheus with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: prometheus starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ pub fn get(args ArgsGet) !&RClone {
|
||||
if r.hexists('context:rclone', args.name)! {
|
||||
data := r.hget('context:rclone', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('RClone with name: rclone does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(RClone, data)!
|
||||
@@ -45,12 +46,14 @@ pub fn get(args ArgsGet) !&RClone {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("RClone with name 'rclone' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return rclone_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for rclone with name:rclone')
|
||||
}
|
||||
}
|
||||
@@ -123,14 +126,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'rclone.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'rclone.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -143,6 +147,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure restic, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'restic.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
restic_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: restic' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: restic' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: restic' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: restic' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self Restic) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('restic start')
|
||||
console.print_header('installer: restic start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self Restic) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting restic with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: restic starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure s3, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 's3.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
s3_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: s3' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: s3' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: s3' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: s3' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self S3Installer) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('s3 start')
|
||||
console.print_header('installer: s3 start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self S3Installer) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting s3 with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: s3 starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure griddriver, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'griddriver.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure cloudhypervisor, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'cloudhypervisor.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure docker, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'docker.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
docker_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: docker' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: docker' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: docker' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: docker' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -107,7 +108,7 @@ pub fn (mut self DockerInstaller) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('docker start')
|
||||
console.print_header('installer: docker start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -120,7 +121,7 @@ pub fn (mut self DockerInstaller) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting docker with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: docker starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&LimaInstaller {
|
||||
if r.hexists('context:lima', args.name)! {
|
||||
data := r.hget('context:lima', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('LimaInstaller with name: lima does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(LimaInstaller, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&LimaInstaller {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("LimaInstaller with name 'lima' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return lima_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for lima with name:lima')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'lima.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'lima.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
lima_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: lima' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: lima' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: lima' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: lima' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -206,7 +211,7 @@ pub fn (mut self LimaInstaller) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('lima start')
|
||||
console.print_header('installer: lima start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -219,7 +224,7 @@ pub fn (mut self LimaInstaller) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting lima with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: lima starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure pacman, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'pacman.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure podman, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'podman.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure youki, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'youki.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure bun, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'bun.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure imagemagick, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'imagemagick.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
imagemagick_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: imagemagick' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: imagemagick' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: imagemagick' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: imagemagick' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self ImageMagick) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('imagemagick start')
|
||||
console.print_header('installer: imagemagick start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self ImageMagick) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting imagemagick with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: imagemagick starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure lighttpd, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'lighttpd.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -68,6 +68,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
lighttpd_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,19 +84,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: lighttpd' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: lighttpd' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: lighttpd' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: lighttpd' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ pub fn (mut self LightHttpdInstaller) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('lighttpd start')
|
||||
console.print_header('installer: lighttpd start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -119,7 +120,7 @@ pub fn (mut self LightHttpdInstaller) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting lighttpd with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: lighttpd starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure tailwind, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'tailwind.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure tailwind4, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'tailwind4.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn get(args ArgsGet) !&TraefikServer {
|
||||
if r.hexists('context:traefik', args.name)! {
|
||||
data := r.hget('context:traefik', args.name)!
|
||||
if data.len == 0 {
|
||||
print_backtrace()
|
||||
return error('TraefikServer with name: traefik does not exist, prob bug.')
|
||||
}
|
||||
mut obj := json.decode(TraefikServer, data)!
|
||||
@@ -46,12 +47,14 @@ pub fn get(args ArgsGet) !&TraefikServer {
|
||||
if args.create {
|
||||
new(args)!
|
||||
} else {
|
||||
print_backtrace()
|
||||
return error("TraefikServer with name 'traefik' does not exist")
|
||||
}
|
||||
}
|
||||
return get(name: args.name)! // no longer from db nor create
|
||||
}
|
||||
return traefik_global[args.name] or {
|
||||
print_backtrace()
|
||||
return error('could not get config for traefik with name:traefik')
|
||||
}
|
||||
}
|
||||
@@ -124,14 +127,15 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
}
|
||||
mut install_actions := plbook.find(filter: 'traefik.configure')!
|
||||
if install_actions.len > 0 {
|
||||
for install_action in install_actions {
|
||||
for mut install_action in install_actions {
|
||||
heroscript := install_action.heroscript()
|
||||
mut obj2 := heroscript_loads(heroscript)!
|
||||
set(obj2)!
|
||||
install_action.done = true
|
||||
}
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'traefik.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -163,6 +167,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
traefik_obj.restart()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +183,19 @@ fn startupmanager_get(cat startupmanager.StartupManagerType) !startupmanager.Sta
|
||||
// systemd
|
||||
match cat {
|
||||
.screen {
|
||||
console.print_debug('startupmanager: screen')
|
||||
console.print_debug("installer: traefik' startupmanager get screen")
|
||||
return startupmanager.get(.screen)!
|
||||
}
|
||||
.zinit {
|
||||
console.print_debug('startupmanager: zinit')
|
||||
console.print_debug("installer: traefik' startupmanager get zinit")
|
||||
return startupmanager.get(.zinit)!
|
||||
}
|
||||
.systemd {
|
||||
console.print_debug('startupmanager: systemd')
|
||||
console.print_debug("installer: traefik' startupmanager get systemd")
|
||||
return startupmanager.get(.systemd)!
|
||||
}
|
||||
else {
|
||||
console.print_debug('startupmanager: auto')
|
||||
console.print_debug("installer: traefik' startupmanager get auto")
|
||||
return startupmanager.get(.auto)!
|
||||
}
|
||||
}
|
||||
@@ -206,7 +211,7 @@ pub fn (mut self TraefikServer) start() ! {
|
||||
return
|
||||
}
|
||||
|
||||
console.print_header('traefik start')
|
||||
console.print_header('installer: traefik start')
|
||||
|
||||
if !installed()! {
|
||||
install()!
|
||||
@@ -219,7 +224,7 @@ pub fn (mut self TraefikServer) start() ! {
|
||||
for zprocess in startupcmd()! {
|
||||
mut sm := startupmanager_get(zprocess.startuptype)!
|
||||
|
||||
console.print_debug('starting traefik with ${zprocess.startuptype}...')
|
||||
console.print_debug('installer: traefik starting with ${zprocess.startuptype}...')
|
||||
|
||||
sm.new(zprocess)!
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
return error("can't configure zola, because no configuration allowed for this installer.")
|
||||
}
|
||||
mut other_actions := plbook.find(filter: 'zola.')!
|
||||
for other_action in other_actions {
|
||||
for mut other_action in other_actions {
|
||||
if other_action.name in ['destroy', 'install', 'build'] {
|
||||
mut p := other_action.params
|
||||
reset := p.get_default_false('reset')
|
||||
@@ -48,6 +48,7 @@ pub fn play(mut plbook PlayBook) ! {
|
||||
install()!
|
||||
}
|
||||
}
|
||||
other_action.done = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user