This commit is contained in:
2025-08-29 06:27:37 +02:00
parent 0f6d6f731a
commit 8d1656c679
8 changed files with 136 additions and 94 deletions

View File

@@ -0,0 +1,23 @@
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
}

View File

@@ -1,43 +1,19 @@
# coredns
# Installer - CoreDNS Module
coredns
This module provides heroscript actions for installing and managing CoreDNS.
To get started
## Actions
```v
### `coredns.install`
Installs the CoreDNS server.
import freeflowuniverse.herolib.installers.infra.coredns as coredns_installer
**Parameters:**
heroscript:="
!!coredns.configure name:'test'
config_path: '/etc/coredns/Corefile'
dnszones_path: '/etc/coredns/zones'
plugins: 'forward,cache'
example: true
- `reset` (bool): If true, force a reinstall even if CoreDNS is already detected. Default: `false`.
!!coredns.start name:'test' reset:1
"
**Example:**
coredns_installer.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= coredns_installer.get()!
//installer.start(reset:true)!
```
## example heroscript
```hero
!!coredns.configure
name: 'custom'
config_path: '/etc/coredns/Corefile'
config_url: 'https://github.com/example/coredns-config'
dnszones_path: '/etc/coredns/zones'
dnszones_url: 'https://github.com/example/dns-zones'
plugins: 'forward,cache'
example: false
```
```heroscript
!!coredns.install
reset: true

View File

@@ -0,0 +1,23 @@
module gitea
import freeflowuniverse.herolib.core.playbook { PlayBook }
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.installers.infra.gitea { install }
pub fn play(mut plbook PlayBook) ! {
if !plbook.exists(filter: 'gitea.') {
return
}
mut install_action := plbook.ensure_once(filter: 'gitea.install')!
mut p := install_action.params
mut args := InstallArgs{
reset: p.get_default_false('reset')
}
console.print_header('Executing gitea.install action')
install(args)!
install_action.done = true
}

View File

@@ -1,29 +1,19 @@
# gitea
# Installer - Gitea Module
This module provides heroscript actions for installing and managing Gitea.
## Actions
To get started
### `gitea.install`
```v
Installs the Gitea Git service.
import freeflowuniverse.herolib.installers.infra.gitea as gitea_installer
**Parameters:**
- `reset` (bool): If true, force a reinstall even if Gitea is already detected. Default: `false`.
//if you want to configure using heroscript
gitea_installer.play(heroscript:'
!!gitea.configure name:test
passwd:'something'
domain: 'docs.info.com'
')!
**Example:**
mut installer:= gitea_installer.get(name:'test')!
installer.start()!
```
this will look for a configured mail & postgresql client both on instance name: "default", change in heroscript if needed
- postgresql_client_name = "default"
- mail_client_name = "default"
```heroscript
!!gitea.install
reset: true

View File

@@ -0,0 +1,23 @@
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
}

View File

@@ -1,20 +1,19 @@
# livekit
# Installer - Livekit Module
This module provides heroscript actions for installing and managing Livekit.
## Actions
To get started
### `livekit.install`
```v
Installs the Livekit server.
**Parameters:**
- `reset` (bool): If true, force a reinstall even if Livekit is already detected. Default: `false`.
import freeflowuniverse.herolib.installers.infra.livekit
**Example:**
mut installer:= livekit.get()!
installer.start()!
```
livekit once installed will have generated the secret keys
```heroscript
!!livekit.install
reset: true

View File

@@ -0,0 +1,23 @@
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
}

View File

@@ -1,34 +1,19 @@
# zinit
# Installer - Zinit Installer Module
This module provides heroscript actions for installing and managing Zinit.
## Actions
To get started
### `zinit_installer.install`
```v
Installs the Zinit process manager.
**Parameters:**
import freeflowuniverse.herolib.installers.something. zinit
mut installer:= zinit.get()!
installer.start()!
```
## example heroscript
```hero
!!zinit.install
homedir: '/home/user/zinit'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
```
- `reset` (bool): If true, force a reinstall even if Zinit is already detected. Default: `false`.
**Example:**
```heroscript
!!zinit_installer.install
reset: true