This is an automated email from the ASF dual-hosted git repository.
sciabarracom pushed a commit to branch 0.1.0
in repository https://gitbox.apache.org/repos/asf/openserverless-task.git
The following commit(s) were added to refs/heads/0.1.0 by this push:
new 035284d update to main
035284d is described below
commit 035284d027c827daea3430f05286cf5da5ee0dcd
Author: Trustable User <[email protected]>
AuthorDate: Mon Jun 8 07:56:18 2026 +0200
update to main
---
.gitignore | 3 +-
cloud/k3s/opsfile.yml | 18 +++++++++
ide/docopts.md | 2 +-
ide/opsfile.yml | 49 ++++++++-----------------
ide/python/opsfile.yml | 5 +--
opsroot.json | 6 +--
prereq.yml | 2 +-
setup/docker/opsfile.yml | 16 ++++----
setup/kubernetes/opsfile.yml | 4 +-
setup/kubernetes/roles/operator-roles.yaml | 4 ++
setup/nuvolaris/opsfile.yml | 6 ++-
setup/nuvolaris/streamer/streamer-template.yaml | 8 ++--
setup/nuvolaris/system-api/api-template.yaml | 12 +++---
13 files changed, 71 insertions(+), 64 deletions(-)
diff --git a/.gitignore b/.gitignore
index 462060d..7818058 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,4 +28,5 @@ attic.txt
**/venv/
node_modules/
.DS_Store
-ide/deploy/hash.lock
\ No newline at end of file
+ide/deploy/hash.lock
+opsroot.orig
diff --git a/cloud/k3s/opsfile.yml b/cloud/k3s/opsfile.yml
index d06c6fd..efcaa89 100644
--- a/cloud/k3s/opsfile.yml
+++ b/cloud/k3s/opsfile.yml
@@ -43,6 +43,24 @@ tasks:
INSTALL_USER: '{{._user_ | default "root"}}'
cmds:
- test -n "{{._server_}}" || die "required <server> ip or hostname"
+ - |
+
traefik_http_nodeport="${K3S_TRAEFIK_HTTP_NODEPORT:-${TRAEFIK_HTTP_NODEPORT:-30080}}"
+
traefik_https_nodeport="${K3S_TRAEFIK_HTTPS_NODEPORT:-${TRAEFIK_HTTPS_NODEPORT:-30081}}"
+ {{.SSH}} '{{.INSTALL_USER}}@{{._server_}}' "sudo mkdir -p
/var/lib/rancher/k3s/server/manifests"
+ cat <<EOF | {{.SSH}} '{{.INSTALL_USER}}@{{._server_}}' "sudo tee
/var/lib/rancher/k3s/server/manifests/traefik-config.yaml >/dev/null"
+ apiVersion: helm.cattle.io/v1
+ kind: HelmChartConfig
+ metadata:
+ name: traefik
+ namespace: kube-system
+ spec:
+ valuesContent: |-
+ ports:
+ web:
+ nodePort: ${traefik_http_nodeport}
+ websecure:
+ nodePort: ${traefik_https_nodeport}
+ EOF
- >
k3sup install --k3s-version="{{.K3S_VERSION}}"
--host="{{._server_}}" --user="{{.INSTALL_USER}}"
diff --git a/ide/docopts.md b/ide/docopts.md
index fa9126c..85821b6 100644
--- a/ide/docopts.md
+++ b/ide/docopts.md
@@ -25,8 +25,8 @@ OpenServerless Ide Development Utilities.
```text
Usage:
ide login [<username>] [<apihost>] [--pin] [--mode=<mode>]
+ ide deploy [<action>|--packages|--web] [--dry-run] [--mode=<mode>]
ide devel [--fast] [--dry-run]
- ide deploy [<action>|--packages|--web] [--dry-run]
ide undeploy [<action>] [--dry-run]
ide clean
ide setup
diff --git a/ide/opsfile.yml b/ide/opsfile.yml
index e48c20c..b820459 100644
--- a/ide/opsfile.yml
+++ b/ide/opsfile.yml
@@ -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"
@@ -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
@@ -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}')"
@@ -234,16 +224,13 @@ tasks:
silent: true
interactive: true
desc: deploy a project or a single action (with _action_=<dir-or-file>)
+ dotenv:
+ - "{{.OPS_PWD}}/.env.{{.__mode}}"
+ - "{{.OPS_PWD}}/packages/.env"
+ - "{{.OPS_PWD}}/.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
@@ -329,16 +316,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
diff --git a/ide/python/opsfile.yml b/ide/python/opsfile.yml
index 0617ed9..f400fe6 100644
--- a/ide/python/opsfile.yml
+++ b/ide/python/opsfile.yml
@@ -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
diff --git a/opsroot.json b/opsroot.json
index fdf25f9..701ea04 100644
--- a/opsroot.json
+++ b/opsroot.json
@@ -6,11 +6,11 @@
},
"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",
- "systemapi":
"registry.hub.docker.com/apache/openserverless-admin-api:0.1.0-incubating.2512101357",
+ "streamer":
"docker.io/apache/openserverless-streamer:0.1.0-incubating.2505031325",
+ "systemapi":
"docker.io/apache/openserverless-admin-api:0.1.0-incubating.2512101357",
"devcontainer":
"apache/openserverless-devcontainer:0.1.0-incubating.2603111653",
"ingress": "registry.k8s.io/ingress-nginx/controller:v1.7.0",
"couchdb": "docker.io/apache/couchdb:2.3",
diff --git a/prereq.yml b/prereq.yml
index 177006c..7fe931b 100644
--- a/prereq.yml
+++ b/prereq.yml
@@ -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: |
diff --git a/setup/docker/opsfile.yml b/setup/docker/opsfile.yml
index 8c0a4c0..557468e 100644
--- a/setup/docker/opsfile.yml
+++ b/setup/docker/opsfile.yml
@@ -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
@@ -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"
diff --git a/setup/kubernetes/opsfile.yml b/setup/kubernetes/opsfile.yml
index a09d817..65c7699 100644
--- a/setup/kubernetes/opsfile.yml
+++ b/setup/kubernetes/opsfile.yml
@@ -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
@@ -442,4 +442,4 @@ tasks:
kubectl apply -f _whisk.yaml
- task: wait
vars:
- OBJECT: pod/controller-0
\ No newline at end of file
+ OBJECT: pod/controller-0
diff --git a/setup/kubernetes/roles/operator-roles.yaml
b/setup/kubernetes/roles/operator-roles.yaml
index 2dcb904..4d8803b 100644
--- a/setup/kubernetes/roles/operator-roles.yaml
+++ b/setup/kubernetes/roles/operator-roles.yaml
@@ -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"]
diff --git a/setup/nuvolaris/opsfile.yml b/setup/nuvolaris/opsfile.yml
index b03be40..10ddfd4 100644
--- a/setup/nuvolaris/opsfile.yml
+++ b/setup/nuvolaris/opsfile.yml
@@ -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"
@@ -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"
diff --git a/setup/nuvolaris/streamer/streamer-template.yaml
b/setup/nuvolaris/streamer/streamer-template.yaml
index 8b4e646..45a1af8 100644
--- a/setup/nuvolaris/streamer/streamer-template.yaml
+++ b/setup/nuvolaris/streamer/streamer-template.yaml
@@ -21,7 +21,7 @@ metadata:
namespace: nuvolaris
labels:
app: nuvolaris-streamer-api
-spec:
+spec:
replicas: 1
selector:
matchLabels:
@@ -36,7 +36,7 @@ spec:
containers:
- name: nuvolaris-streamer-api
image: ${IMAGES_STREAMER}
- imagePullPolicy: Always
+ imagePullPolicy: IfNotPresent
command: ["/streamer"]
ports:
- containerPort: 8080
@@ -51,7 +51,7 @@ spec:
fieldRef:
fieldPath: status.podIP
- name: "CORS_ENABLED"
- value: "1"
+ value: "1"
---
apiVersion: v1
kind: Service
@@ -63,4 +63,4 @@ spec:
- name: streamer
port: 8080
selector:
- app: nuvolaris-streamer-api
\ No newline at end of file
+ app: nuvolaris-streamer-api
diff --git a/setup/nuvolaris/system-api/api-template.yaml
b/setup/nuvolaris/system-api/api-template.yaml
index ced1468..47d98b1 100644
--- a/setup/nuvolaris/system-api/api-template.yaml
+++ b/setup/nuvolaris/system-api/api-template.yaml
@@ -21,7 +21,7 @@ metadata:
namespace: nuvolaris
labels:
app: nuvolaris-system-api
-spec:
+spec:
replicas: 1
selector:
matchLabels:
@@ -36,7 +36,7 @@ spec:
containers:
- name: nuvolaris-system-api
image: ${IMAGES_SYSTEMAPI}
- imagePullPolicy: Always
+ imagePullPolicy: IfNotPresent
command: ["./run.sh"]
ports:
- containerPort: 5000
@@ -45,11 +45,11 @@ spec:
- name: "APIHOST"
value: "${SYS_API_HOSTNAME:-localhost}"
- name: "COUCHDB_SERVICE_PORT"
- value: "5984"
+ value: "5984"
- name: "COUCHDB_SERVICE_HOST"
- value: "couchdb"
+ value: "couchdb"
- name: "COUCHDB_ADMIN_USER"
- value: "${SYS_API_CDB_USER}"
+ value: "${SYS_API_CDB_USER}"
- name: "COUCHDB_ADMIN_PASSWORD"
value: "${SYS_API_CDB_PASSWORD}"
---
@@ -63,4 +63,4 @@ spec:
- name: api
port: 5000
selector:
- app: nuvolaris-system-api
\ No newline at end of file
+ app: nuvolaris-system-api