Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 15 additions & 33 deletions ide/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ tasks:
You can then use 'ops ide devel' and 'ops ide deploy'.
You can also reopen the project with VSCode and use the command 'Reopen in Container'.
cmds:
- test {{OS}} != "windows" || die '{{.MSG}}'
- test "$(printf '%s\n' "$(bun -v)" "1.1.18" | sort -V | head -n 1)" = "1.1.18" || die "bun 1.1.18 or greater not available"
- test -d "$OPS_PWD/packages" || die "no packages in current directory"
- test -e ~/.wskprops || die "please run 'ops ide login' first"
Expand Down Expand Up @@ -125,31 +126,17 @@ tasks:
while ! test -e ~/.wskprops
do $OPS ide login
done
- |
echo "**************************************************************************************"
echo "*** Available Commands on Terminal:"
echo "*** 'deploy' (alias for 'ops ide deploy') to deploy your app to {{.API_HOST}}"
echo "*** 'devel' (alias for 'ops ide devel') to start incremental development mode"
echo "*** 'login' (alias for 'ops ide login') to login as a different user"
echo "*** 'ops ide' for more informations"
echo "*** https://openserverless.apache.org/ for online documentation"
echo "**************************************************************************************"


login:
silent: true
desc: login in you OpenServerless host
dotenv:
- "{{.OPS_PWD}}/.env.{{.__mode}}"
- "{{.OPS_PWD}}/.env"
cmds:
- echo "{{.OPS_PWD}}/.env" "{{.OPS_PWD}}/.env.{{.__mode}}"
- |
set -a
if test -e "$OPS_PWD/.env"
then source "$OPS_PWD/.env"
fi
if [ -n "{{.__mode}}" ] && [ -e "$OPS_PWD/.env.{{.__mode}}" ]
then
echo "Loading .env.{{.__mode}}"
source "$OPS_PWD/.env.{{.__mode}}"
fi
if test -n "$OPS_USERNAME"
then echo "Please use OPS_USER, OPS_USERNAME is deprecated"
fi
Expand Down Expand Up @@ -187,7 +174,10 @@ tasks:
if test -n "$OPS_PASSWORD"
then export "OPS_PASSWORD"
fi
if $OPS -login "$OPSDEV_APIHOST" "$OPSDEV_USERNAME"
# TO FIX: workaround to a problem on ops that ignores the paratemer if OPS_USER is set
export OPS_USER="$OPSDEV_USERNAME"
export OPS_APIHOST="$OPSDEV_APIHOST"
if ops -login
then
OPSDEV_HOST_PROT="$(echo "$OPSDEV_APIHOST" | awk -F '://' '{print $1}')"
OPSDEV_HOST_URL="$(echo "$OPSDEV_APIHOST" | awk -F '://' '{print $2}')"
Expand Down Expand Up @@ -234,16 +224,12 @@ tasks:
silent: true
interactive: true
desc: deploy a project or a single action (with _action_=<dir-or-file>)
dotenv:
- "{{.OPS_PWD}}/.env"
- "{{.OPS_PWD}}/packages/.env"
cmds:
- task: prereq
- |
set -a
if test -e $OPS_PWD/.env
then source $OPS_PWD/.env
fi
if test -e $OPS_PWD/packages/.env
then source $OPS_PWD/packages/.env
fi
if test -n "$AUTH_CHECK"
then if test "$AUTH_CHECK" != "$AUTH"
then echo "WARNING: wrong deploy! You are logged in a different user than your pinned one and configured in .env as AUTH_CHECK" ; exit 1
Expand Down Expand Up @@ -329,16 +315,12 @@ tasks:
interactive: true
silent: true
desc: start interactive development mode files
dotenv:
- "{{.OPS_PWD}}/.env"
- "{{.OPS_PWD}}/packages/.env"
cmds:
- task: prereq
- |
set -a
if test -e $OPS_PWD/.env
then source $OPS_PWD/.env
fi
if test -e $OPS_PWD/packages/.env
then source $OPS_PWD/packages/.env
fi
if test -n "$AUTH_CHECK"
then if test "$AUTH_CHECK" != "$AUTH"
then echo "WARNING: wrong deploy! You are logged in a different user than your configured AUTH_CHECK" ; exit 1
Expand Down
5 changes: 2 additions & 3 deletions ide/python/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ tasks:
cli:
silent: true
desc: python cli
dotenv:
- "{{.OPS_PWD}}/.env"
cmds:
- |
pip install ipython
find "$OPS_PWD" -name requirements.txt -execdir pip install -r {} \;
if test -e "$OPS_PWD/.env"
then set -a ; source "$OPS_PWD/.env"
fi
ipython -i init.ipy

2 changes: 1 addition & 1 deletion opsroot.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"images": {
"standalone": "ghcr.io/nuvolaris/openwhisk-controller:3.1.0-mastrogpt.2402101445",
"operator": "ghcr.io/nuvolaris/openserverless-operator:0.1.0-incubating.2603192226",
"operator": "docker.io/apache/openserverless-operator:0.1.0-incubating.2604091352",
"controller": "ghcr.io/nuvolaris/openwhisk-controller:3.1.0-mastrogpt.2402101445",
"invoker": "ghcr.io/nuvolaris/openwhisk-invoker:3.1.0-mastrogpt.2402101445",
"streamer": "registry.hub.docker.com/apache/openserverless-streamer:0.1.0-incubating.2505031325",
Expand Down
2 changes: 1 addition & 1 deletion prereq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ tasks:
k3sup:
desc: download k3sup
vars:
VERSION: 0.13.6
VERSION: 0.13.12
BASE: "https://github.com/alexellis/k3sup/releases/download/{{.VERSION}}"
FILE:
sh: |
Expand Down
16 changes: 8 additions & 8 deletions setup/docker/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ tasks:
check-space:
silent: true
env:
REQUIRED_CPU: 4
REQUIRED_MEM: 14
REQUIRED_DISK: 60
REQUIRED_CPU: '{{ or .REQUIRED_CPU "4" }}'
REQUIRED_MEM: '{{ or .REQUIRED_MEM "14" }}'
REQUIRED_DISK: '{{or .REQUIRED_DISK "60" }}'
desc: check if the user has the minimum required disk space
cmds:
- bun run space.ts
Expand All @@ -140,11 +140,11 @@ tasks:
if kind get clusters | rg {{.CLUSTER}}
then kind export kubeconfig --name {{.CLUSTER}} --kubeconfig "$OPS_TMP/kubeconfig"
else
ops util freeze docker-load
ops util freeze kind-preload
ops setup docker cluster
ops util freeze kind-load
ops setup docker ingress
ops util freeze docker-load
test -n "{{.NO_KIND_PRELOAD}}" || ops util freeze kind-preload
ops setup docker cluster
ops util freeze kind-load
ops setup docker ingress
fi
- cp "$OPS_TMP/kubeconfig" "$OPS_TMP/kind-{{.CLUSTER}}.kubeconfig"

Expand Down
4 changes: 2 additions & 2 deletions setup/kubernetes/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ tasks:
cmds:
- |
if test -z "$SECRET_OPENWHISK_NUVOLARIS"
then ops util secret
then ops -task -t "$OPS_ROOT/util/opsfile.yml" secrets
else echo Reusing current secrets.
fi

Expand Down Expand Up @@ -442,4 +442,4 @@ tasks:
kubectl apply -f _whisk.yaml
- task: wait
vars:
OBJECT: pod/controller-0
OBJECT: pod/controller-0
4 changes: 4 additions & 0 deletions setup/kubernetes/roles/operator-roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ rules:
resources: ["middlewares"]
verbs: ["get","patch","list","update","watch","create","delete"]

- apiGroups: ["traefik.io"]
resources: ["middlewares"]
verbs: ["get","patch","list","update","watch","create","delete"]

# required for kubegres
- apiGroups: ["kubegres.reactive-tech.io"]
resources: ["kubegres","kubegres/finalizers","kubegres/status"]
Expand Down
6 changes: 4 additions & 2 deletions setup/nuvolaris/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ tasks:
echo Checking connection...
retry -t 100 -m 600 ops -wsk {{.ETC}} --apihost "$OPSDEV_APIHOST" --auth "$AUTH" namespace list
export OPS_PASSWORD=$(kubectl -n nuvolaris get wsk/controller -ojsonpath -ojsonpath='{.spec.nuvolaris.password}')
ops -login "$OPSDEV_APIHOST" "$OPSDEV_USERNAME"
export OPS_USER="$OPSDEV_USERNAME"
export OPS_APIHOST="$OPSDEV_APIHOST"
ops -login
OPSDEV_HOST_PROT="$(echo "$OPSDEV_APIHOST" | awk -F '://' '{print $1}')"
OPSDEV_HOST_URL="$(echo "$OPSDEV_APIHOST" | awk -F '://' '{print $2}')"
config OPSDEV_APIHOST="$OPSDEV_APIHOST"
Expand Down Expand Up @@ -281,6 +283,6 @@ tasks:
retry ops ide login {{.USR}} "$APIHOST"
- echo "{{.PSW}}" > ~/.ops/{{.USR}}.password
- ops util upload "$(realpath web)"
- echo "Login with:" ops ide login {{.USR}} https://miniops.me
- echo "Login with:" ops ide login {{.USR}} "$APIHOST"
- echo "Password is saved in:" ~/.ops/{{.USR}}.password
- echo "Web URL is:" "$HOST"
9 changes: 5 additions & 4 deletions setup/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ tasks:
echo "*** You can can uninstall and restart with: ops setup docker delete"
exit 1
else
if ! kind get clusters | rg nuvolaris
then echo "*** Something is already running as a local webserver, please remove it before installing miniops."
exit 1
fi
# in WSL something answer in localhost to it is not an error
#if ! kind get clusters | rg nuvolaris
#then echo "*** Something is already running as a local webserver, please remove it before installing miniops."
# exit 1
#fi
fi
fi
fi
Expand Down