mirror of
https://github.com/coderofsalvation/podi.git
synced 2025-12-16 11:57:45 +01:00
work in progress [might break]
This commit is contained in:
26
README.md
26
README.md
@@ -18,12 +18,23 @@ $ chmod 755 podi
|
|||||||
|
|
||||||
* fully hackable PaaS & Gitops-designer (embedded in your repo)
|
* fully hackable PaaS & Gitops-designer (embedded in your repo)
|
||||||
* multitenant: multi-branch and multi-sshuser deployments
|
* multitenant: multi-branch and multi-sshuser deployments
|
||||||
* `podi ls`: gitops templates for containerizing, autosuspending services on baremetal etc
|
* `podi ls`: gitops templates for containerizing, autosuspending services on baremetal/podman/docker etc
|
||||||
* hookable (`on build callmyfunction arg1`)
|
* hookable (`on build callmyfunction arg1`)
|
||||||
* podi weighs ~7k, just needs ssh+git installed
|
* podi weighs ~7k, just needs ssh+git installed
|
||||||
* works on raspberry pi zero but also on kubernetes
|
* works on raspberry pi zero but also on kubernetes
|
||||||
|
|
||||||
## Extend deployments
|
## Install
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ wget "https://raw.githubusercontent.com/coderofsalvation/podi/master/podi"
|
||||||
|
$ chmod 755 podi
|
||||||
|
$ ./podi
|
||||||
|
usage:
|
||||||
|
init git@server:/dir/to/deploy [branch] [port] [name] initializes a deployment
|
||||||
|
recipe <name_or_url> installs a recipe from podi repo or url
|
||||||
|
```
|
||||||
|
|
||||||
|
## Hooks / extend deployments
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -48,17 +59,6 @@ $ ./podi init git@yourserver:/home/git/myapp master
|
|||||||
|
|
||||||
> IDEA: create your own! (see [adding your own recipes](doc/recipes.md) )
|
> IDEA: create your own! (see [adding your own recipes](doc/recipes.md) )
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ wget "https://raw.githubusercontent.com/coderofsalvation/podi/master/podi"
|
|
||||||
$ chmod 755 podi
|
|
||||||
$ ./podi
|
|
||||||
usage:
|
|
||||||
init git@server:/dir/to/deploy [branch] [port] [name] initializes a deployment
|
|
||||||
recipe <name_or_url> installs a recipe from podi repo or url
|
|
||||||
```
|
|
||||||
|
|
||||||
## Docs
|
## Docs
|
||||||
|
|
||||||
* [adding your own recipes](doc/recipes.md)
|
* [adding your own recipes](doc/recipes.md)
|
||||||
|
|||||||
5
podi
5
podi
@@ -22,11 +22,14 @@ print() { printf " $C_PURPLE│ $C_NORMAL %s\n" "$*"; return 0; }
|
|||||||
soften() { cat | while IFS='' read line; do printf " $C_PURPLE| $C_GREY%s$C_NORMAL\n" "$line"; done; }
|
soften() { cat | while IFS='' read line; do printf " $C_PURPLE| $C_GREY%s$C_NORMAL\n" "$line"; done; }
|
||||||
header() { h=$1; shift; printf " $C_PURPLE├─ $C_CYAN""%s""$C_PURPLE $C_NORMAL%s\n" "$h" "$*"; }
|
header() { h=$1; shift; printf " $C_PURPLE├─ $C_CYAN""%s""$C_PURPLE $C_NORMAL%s\n" "$h" "$*"; }
|
||||||
evalfunc() { type $1 | awk 'NR>2 && /^[^{][^}]/ { print $0 }'; }
|
evalfunc() { type $1 | awk 'NR>2 && /^[^{][^}]/ { print $0 }'; }
|
||||||
|
on() { export on_$1="$2 $(eval echo \$on_$1)"; }
|
||||||
|
init_dirs() { test -d .git || git init; test -d .pod || mkdir .pod; }
|
||||||
foreach() { local err=0; local args="$1";
|
foreach() { local err=0; local args="$1";
|
||||||
shift;
|
shift;
|
||||||
for j in $args; do "$@" "$j" || err=1; done
|
for j in $args; do "$@" "$j" || err=1; done
|
||||||
test $err = 1 && return 1 || return 0
|
test $err = 1 && return 1 || return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger() { printf "$C_NORMAL [$C_CYAN✓$C_NORMAL] $C_BOLD%s$C_NORMAL\n" "$1"
|
trigger() { printf "$C_NORMAL [$C_CYAN✓$C_NORMAL] $C_BOLD%s$C_NORMAL\n" "$1"
|
||||||
local cmd=$1; shift
|
local cmd=$1; shift
|
||||||
local actions="$(eval echo \$on_$cmd)"
|
local actions="$(eval echo \$on_$cmd)"
|
||||||
@@ -41,8 +44,6 @@ trigger() { printf "$C_NORMAL [$C_CYAN✓$C_NORMAL] $C_BOLD%s$C_NORMAL\n" "$1
|
|||||||
set -e
|
set -e
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
on() { export on_$1="$2 $(eval echo \$on_$1)"; }
|
|
||||||
init_dirs() { test -d .git || git init; test -d .pod || mkdir .pod; }
|
|
||||||
|
|
||||||
init_post_receive(){
|
init_post_receive(){
|
||||||
echo "#!/bin/sh
|
echo "#!/bin/sh
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ build(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop(){
|
stop(){
|
||||||
test -z $POD || verbose $POD down
|
test -z $POD || verbose $POD down -t 2
|
||||||
}
|
}
|
||||||
|
|
||||||
start(){
|
start(){
|
||||||
|
|||||||
Reference in New Issue
Block a user