This commit is contained in:
2025-10-13 10:43:37 +04:00
parent bd50ace19e
commit bcfc525bee
6 changed files with 25 additions and 25 deletions

View File

@@ -4,4 +4,4 @@
classname:'LivekitClient'
singleton:0
default:1
reset:0
active:0

View File

@@ -147,7 +147,7 @@ fn build() ! {
//url := 'https://github.com/threefoldtech/${args.name}'
// make sure we install base on the node
// if osal.platform() != .ubuntu {
// if core.platform() != .ubuntu {
// return error('only support ubuntu for now')
// }
// golang.install()!

View File

@@ -126,7 +126,7 @@ fn build() ! {
// url := 'https://github.com/threefoldtech/cometbft'
// make sure we install base on the node
// if osal.platform() != .ubuntu {
// if core.platform() != .ubuntu {
// return error('only support ubuntu for now')
// }
// golang.install()!

View File

@@ -6,6 +6,7 @@ import incubaid.herolib.osal.startupmanager
import incubaid.herolib.installers.ulist
import incubaid.herolib.core.httpconnection
import incubaid.herolib.core.texttools
import incubaid.herolib.clients.zinit
import os
import rand
import json
@@ -164,14 +165,10 @@ fn destroy() ! {
osal.execute_silent('sudo rm -rf /usr/local/bin/meilisearch')!
}
mut zinit_factory := zinit.new()!
if zinit_factory.exists('meilisearch') {
zinit_factory.stop('meilisearch') or {
return error('Could not stop meilisearch service due to: ${err}')
}
zinit_factory.delete('meilisearch') or {
return error('Could not delete meilisearch service due to: ${err}')
}
mut zinit_factory := zinit.ZinitRPC{}
if zinit_factory.service_list()!.keys().contains('meilisearch') {
zinit_factory.service_stop('meilisearch')!
zinit_factory.service_delete('meilisearch')!
}
console.print_header('meilisearch is destroyed')

View File

@@ -2,7 +2,10 @@ module qdrant_installer
import incubaid.herolib.ui.console
import incubaid.herolib.osal.startupmanager
import incubaid.herolib.core
import incubaid.herolib.installers.ulist
import incubaid.herolib.core.texttools
import incubaid.herolib.clients.zinit
import os
fn startupcmd() ![]startupmanager.ZProcessNewArgs {
@@ -78,13 +81,17 @@ fn upload() ! {
fn install() ! {
console.print_header('install qdrant')
mut url := ''
if core.is_linux_arm()! {
if (core.platform() == core.PlatformType.ubuntu || core.platform() == core.PlatformType.arch)
&& core.cputype() == core.CPUType.arm {
url = 'https://github.com/qdrant/qdrant/releases/download/v${version}/qdrant-aarch64-unknown-linux-musl.tar.gz'
} else if core.is_linux_intel()! {
} else if
(core.platform() == core.PlatformType.ubuntu || core.platform() == core.PlatformType.arch)
&& core.cputype() == core.CPUType.intel {
url = 'https://github.com/qdrant/qdrant/releases/download/v${version}/qdrant-x86_64-unknown-linux-musl.tar.gz'
} else if core.is_osx_arm()! {
} else if core.platform() == core.PlatformType.osx && core.cputype() == core.CPUType.arm {
url = 'https://github.com/qdrant/qdrant/releases/download/v${version}/qdrant-aarch64-apple-darwin.tar.gz'
} else if core.is_osx_intel()! {
} else if core.platform() == core.PlatformType.osx && core.cputype() == core.CPUType.intel {
url = 'https://github.com/qdrant/qdrant/releases/download/v${version}/qdrant-x86_64-apple-darwin.tar.gz'
} else {
return error('unsported platform')
@@ -93,7 +100,7 @@ fn install() ! {
url: url
minsize_kb: 18000
expand_dir: '/tmp/qdrant'
)!
)
mut binpath := dest.file_get('qdrant')!
osal.cmd_add(
@@ -110,14 +117,10 @@ fn destroy() ! {
osal.rm('${os.home_dir()}/hero/bin/qdrant')!
osal.rm('/usr/local/bin/qdrant')!
mut zinit_factory := zinit.new()!
if zinit_factory.exists('qdrant') {
zinit_factory.stop('qdrant') or {
return error('Could not stop qdrant service due to: ${err}')
}
zinit_factory.delete('qdrant') or {
return error('Could not delete qdrant service due to: ${err}')
}
mut zinit_factory := zinit.ZinitRPC{}
if zinit_factory.service_list()!.keys().contains('qdrant') {
zinit_factory.service_stop('qdrant')!
zinit_factory.service_delete('qdrant')!
}
console.print_header('qdrant removed')
}

View File

@@ -4,7 +4,7 @@ import incubaid.herolib.installers.base
import incubaid.herolib.osal.core as osal
import incubaid.herolib.core.pathlib
import incubaid.herolib.core.texttools
import incubaid.herolib.installers.infra.zinit
import incubaid.herolib.clients.zinit
import incubaid.herolib.osal.startupmanager as zinitmgmt
import incubaid.herolib.ui.console
import incubaid.herolib.osal.screen