fixed installers
This commit is contained in:
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of actrunner
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} actrunner version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 'actrunner'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/actrunner'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install actrunner')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/actrunner'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of b2
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} b2 version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 'b2'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/b2'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install b2')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/b2'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of fungistor
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} fungistor version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 'fungistor'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/fungistor'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install fungistor')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/fungistor'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of garage_s3
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} garage_s3 version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 'garage_s3'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/garage_s3'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install garage_s3')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/garage_s3'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of grafana
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} grafana version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 'grafana'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/grafana'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install grafana')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/grafana'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of prometheus
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} prometheus version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 'prometheus'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/prometheus'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install prometheus')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/prometheus'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import time
|
||||
// // port int = 8888
|
||||
// }
|
||||
|
||||
// pub fn install(args_ InstallArgs) ! {
|
||||
// pub fn install_(args_ InstallArgs) ! {
|
||||
// install_prometheus(args_)!
|
||||
// install_alertmanager(args_)!
|
||||
// install_node_exporter(args_)!
|
||||
|
||||
@@ -7,7 +7,7 @@ import freeflowuniverse.herolib.core.httpconnection
|
||||
import os
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
res := os.execute('${osal.profile_path_source_and()} rclone version')
|
||||
if res.exit_code != 0 {
|
||||
return false
|
||||
@@ -23,7 +23,7 @@ fn installed() !bool {
|
||||
return true
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install rclone')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
mut url := ''
|
||||
@@ -64,7 +64,7 @@ fn configure() ! {
|
||||
// implement if steps need to be done for configuration
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
}
|
||||
|
||||
fn start_pre() ! {
|
||||
|
||||
@@ -16,7 +16,7 @@ pub mut:
|
||||
}
|
||||
|
||||
// install restic will return true if it was already installed
|
||||
pub fn build(args BuildArgs) ! {
|
||||
pub fn build_(args BuildArgs) ! {
|
||||
// make sure we install base on the node
|
||||
if osal.platform() != .ubuntu {
|
||||
return error('only support ubuntu for now')
|
||||
|
||||
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of restic
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} restic version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 'restic'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/restic'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install restic')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/restic'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ pub mut:
|
||||
}
|
||||
|
||||
// install s3cas will return true if it was already installed
|
||||
pub fn build(args BuildArgs) ! {
|
||||
pub fn build_(args BuildArgs) ! {
|
||||
// make sure we install base on the node
|
||||
if osal.platform() != .ubuntu {
|
||||
return error('only support ubuntu for now')
|
||||
|
||||
@@ -7,7 +7,7 @@ import freeflowuniverse.herolib.installers.rclone
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
|
||||
// install s3 will return true if it was already installed
|
||||
pub fn install() ! {
|
||||
pub fn install_() ! {
|
||||
base.install()!
|
||||
zinitinstaller.install()!
|
||||
rclone.install()!
|
||||
|
||||
@@ -27,7 +27,7 @@ fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
mut installer := get()!
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// this checks health of s3
|
||||
@@ -64,7 +64,7 @@ fn stop_post() ! {
|
||||
//////////////////// following actions are not specific to instance of the object
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// res := os.execute('${osal.profile_path_source_and()} s3 version')
|
||||
// if res.exit_code != 0 {
|
||||
@@ -87,14 +87,14 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
// installers.upload(
|
||||
// cmdname: 's3'
|
||||
// source: '${gitpath}/target/x86_64-unknown-linux-musl/release/s3'
|
||||
// )!
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install s3')
|
||||
// THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED
|
||||
// mut url := ''
|
||||
@@ -125,7 +125,7 @@ fn install() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
// url := 'https://github.com/threefoldtech/s3'
|
||||
|
||||
// make sure we install base on the node
|
||||
@@ -154,7 +154,7 @@ fn build() ! {
|
||||
// )!
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
// mut systemdfactory := systemd.new()!
|
||||
// systemdfactory.destroy("zinit")!
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import freeflowuniverse.herolib.osal.systemd
|
||||
import os
|
||||
|
||||
// checks if a certain version or above is installed
|
||||
fn installed() !bool {
|
||||
fn installed_() !bool {
|
||||
cmd := 'zinit --version'
|
||||
// console.print_debug(cmd)
|
||||
res := os.execute(cmd)
|
||||
@@ -28,7 +28,7 @@ fn installed() !bool {
|
||||
return false
|
||||
}
|
||||
|
||||
fn install() ! {
|
||||
fn install_() ! {
|
||||
console.print_header('install zinit')
|
||||
if !osal.is_linux() {
|
||||
return error('only support linux for now')
|
||||
@@ -52,7 +52,7 @@ fn install() ! {
|
||||
console.print_header('install zinit done')
|
||||
}
|
||||
|
||||
fn build() ! {
|
||||
fn build_() ! {
|
||||
if !osal.is_linux() {
|
||||
return error('only support linux for now')
|
||||
}
|
||||
@@ -91,7 +91,7 @@ fn ulist_get() !ulist.UList {
|
||||
}
|
||||
|
||||
// uploads to S3 server if configured
|
||||
fn upload() ! {
|
||||
fn upload_() ! {
|
||||
}
|
||||
|
||||
fn startupcmd() ![]ZProcessNewArgs {
|
||||
@@ -106,7 +106,7 @@ fn startupcmd() ![]ZProcessNewArgs {
|
||||
return res
|
||||
}
|
||||
|
||||
fn running() !bool {
|
||||
fn running_() !bool {
|
||||
cmd := 'zinit list'
|
||||
return osal.execute_ok(cmd)
|
||||
}
|
||||
@@ -123,7 +123,7 @@ fn stop_pre() ! {
|
||||
fn stop_post() ! {
|
||||
}
|
||||
|
||||
fn destroy() ! {
|
||||
fn destroy_() ! {
|
||||
mut systemdfactory := systemd.new()!
|
||||
systemdfactory.destroy('zinit')!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user