devzone 7.4.1 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/devzone +6 -47
- package/.devcontainer/devzone-modules.sh +8 -3
- package/.devcontainer/devzone-repair.sh +7 -7
- package/.devcontainer/devzone-services.sh +20 -20
- package/.devcontainer/devzone-status.sh +11 -8
- package/.devcontainer/help.sh +2 -0
- package/.devcontainer/versions.env +5 -0
- package/README.md +2 -2
- package/bin/SHA256SUMS +6 -6
- package/bin/devzone-darwin-amd64 +0 -0
- package/bin/devzone-darwin-arm64 +0 -0
- package/bin/devzone-linux-amd64 +0 -0
- package/bin/devzone-linux-arm64 +0 -0
- package/bin/devzone-windows-amd64.exe +0 -0
- package/bin/devzone-windows-arm64.exe +0 -0
- package/manage/devzone +4 -1
- package/manage/scripts/create-mode.sh +3 -3
- package/manage/scripts/uninstall.sh +3 -4
- package/manage/workspace.sh +1 -1
- package/package.json +1 -1
- package/.devcontainer/ai/host-check.sh +0 -173
- package/.devcontainer/ai/host-models.sh +0 -200
- package/.devcontainer/devzone-ai-guard.sh +0 -98
- package/.devcontainer/devzone-ai.sh +0 -201
- package/.devcontainer/devzone-skill.sh +0 -97
- package/manage/scripts/create-cluster.sh +0 -107
- package/manage/scripts/docker.sh +0 -43
package/.devcontainer/devzone
CHANGED
|
@@ -57,14 +57,7 @@ if [ -f "$ICI/argocd/conf.sh" ]; then
|
|
|
57
57
|
. "$ICI/argocd/conf.sh"
|
|
58
58
|
fi
|
|
59
59
|
# GitOps repository line in the Kubernetes workspace pod (#639)
|
|
60
|
-
#
|
|
61
|
-
# shellcheck source=SCRIPTDIR/ai/host-models.sh
|
|
62
|
-
# shellcheck disable=SC1091
|
|
63
|
-
. "$ICI/ai/host-models.sh"
|
|
64
|
-
# Update check and report for the host (Ollama) models (#668).
|
|
65
|
-
# shellcheck source=SCRIPTDIR/ai/host-check.sh
|
|
66
|
-
# shellcheck disable=SC1091
|
|
67
|
-
. "$ICI/ai/host-check.sh"
|
|
60
|
+
# Host models and assistants are handled by the Go command of the pod (#882).
|
|
68
61
|
|
|
69
62
|
# AI assistants, pinned versions: update here, then devzone apply (or Rebuild
|
|
70
63
|
# Container). One line per package, separated by a line that does not change:
|
|
@@ -93,15 +86,7 @@ GITLAB_URL_MODULE=http://gitlab.localhost:8929
|
|
|
93
86
|
# shellcheck source=SCRIPTDIR/devzone-modules.sh
|
|
94
87
|
# shellcheck disable=SC1091
|
|
95
88
|
. "$ICI/devzone-modules.sh"
|
|
96
|
-
#
|
|
97
|
-
# shellcheck disable=SC1091
|
|
98
|
-
. "$ICI/devzone-ai.sh"
|
|
99
|
-
# shellcheck source=SCRIPTDIR/devzone-ai-guard.sh
|
|
100
|
-
# shellcheck disable=SC1091
|
|
101
|
-
. "$ICI/devzone-ai-guard.sh"
|
|
102
|
-
# shellcheck source=SCRIPTDIR/devzone-skill.sh
|
|
103
|
-
# shellcheck disable=SC1091
|
|
104
|
-
. "$ICI/devzone-skill.sh"
|
|
89
|
+
# The AI module and its guard are handled by the Go command of the pod (#882).
|
|
105
90
|
# shellcheck source=SCRIPTDIR/devzone-services.sh
|
|
106
91
|
# shellcheck disable=SC1091
|
|
107
92
|
. "$ICI/devzone-services.sh"
|
|
@@ -124,11 +109,11 @@ case "${1:-}" in
|
|
|
124
109
|
state)
|
|
125
110
|
export DEVZONE_STATE="$ETAT"
|
|
126
111
|
case "${2:-}" in
|
|
127
|
-
write|remove|replace|init|recovery-mark|recovery-wait|recovery-pending|recovery-confirm|catalog-sync|gitops-line|json)
|
|
112
|
+
write|remove|replace|init|recovery-mark|recovery-wait|recovery-pending|recovery-confirm|catalog-sync|gitops-line|held|json)
|
|
128
113
|
# shellcheck disable=SC2034 # DEVZONE_STATE used by state helpers
|
|
129
114
|
ETAT="$DEVZONE_STATE"
|
|
130
115
|
;;
|
|
131
|
-
*) echo "devzone state: write|remove|replace|init|recovery-mark|recovery-wait|recovery-pending|recovery-confirm|catalog-sync|gitops-line|json" >&2; exit 1 ;;
|
|
116
|
+
*) echo "devzone state: write|remove|replace|init|recovery-mark|recovery-wait|recovery-pending|recovery-confirm|catalog-sync|gitops-line|held|json" >&2; exit 1 ;;
|
|
132
117
|
esac
|
|
133
118
|
ici_state="$ICI"
|
|
134
119
|
pod_state=""
|
|
@@ -151,7 +136,7 @@ case "${1:-}" in
|
|
|
151
136
|
# may uninstall again
|
|
152
137
|
DEVZONE_STATE="$ETAT" bash "$ICI/devzone" state recovery-confirm
|
|
153
138
|
apply_repowarden
|
|
154
|
-
[ "$(value_of ai)" = off ] ||
|
|
139
|
+
[ "$(value_of ai)" = off ] || DEVZONE_STATE="$ETAT" "$ICI/devzone" ai apply on
|
|
155
140
|
# gitlab, postgres, argocd: installed from the workstation in the
|
|
156
141
|
# Kubernetes workspace pod (#528), by their installer elsewhere
|
|
157
142
|
[ "$(value_of gitlab)" = off ] || apply_service gitlab
|
|
@@ -165,39 +150,13 @@ case "${1:-}" in
|
|
|
165
150
|
# writing anything
|
|
166
151
|
[ "$(value_of "$2")" = on ]
|
|
167
152
|
;;
|
|
168
|
-
ai)
|
|
169
|
-
case "${2:-}" in
|
|
170
|
-
check)
|
|
171
|
-
# Read-only: update state of each detected host model (#668).
|
|
172
|
-
check
|
|
173
|
-
;;
|
|
174
|
-
rapport)
|
|
175
|
-
# Read-only: sizes, update state, measurements, chosen model (#668).
|
|
176
|
-
rapport
|
|
177
|
-
;;
|
|
178
|
-
*)
|
|
179
|
-
# Read-only: lists the host (Ollama) models detected and the default model.
|
|
180
|
-
models_list="$(modeles)"
|
|
181
|
-
default_model="$(premier)"
|
|
182
|
-
if [ -z "$models_list" ]; then
|
|
183
|
-
echo "devzone : no Ollama model detected on ${URL} (answer on /api/tags)"
|
|
184
|
-
else
|
|
185
|
-
echo "devzone : models detected on the host (Ollama):"
|
|
186
|
-
while IFS= read -r m; do
|
|
187
|
-
[ -n "$m" ] && printf ' %s\n' "$m"
|
|
188
|
-
done <<<"$models_list"
|
|
189
|
-
echo "default model: ${default_model:-none}"
|
|
190
|
-
fi
|
|
191
|
-
;;
|
|
192
|
-
esac
|
|
193
|
-
;;
|
|
194
153
|
build)
|
|
195
154
|
bash "$ICI/workspace-build.sh" "${@:2}"
|
|
196
155
|
;;
|
|
197
156
|
repair) repair_workstation ;;
|
|
198
157
|
# Go only: reached when the binary did not take the call. Never call
|
|
199
158
|
# "devzone" again from here, it would loop forever, see #864
|
|
200
|
-
cluster | clusters | metrics | use | kube | agent | postgres | mysql | gitlab | test-gitlab | catalog | catalog-watcher)
|
|
159
|
+
cluster | clusters | metrics | use | kube | ai | agent | postgres | mysql | gitlab | test-gitlab | catalog | catalog-watcher)
|
|
201
160
|
echo "devzone $1: Go binary of the pod unavailable (.devcontainer/bin)" >&2
|
|
202
161
|
exit 1
|
|
203
162
|
;;
|
|
@@ -88,7 +88,7 @@ change_module() {
|
|
|
88
88
|
# An application of the catalog: the line is written, then applied
|
|
89
89
|
if [ -f "$ICI/catalog/$m/app.conf" ]; then
|
|
90
90
|
write_value "$m" "$1"
|
|
91
|
-
DEVZONE_STATE="$ETAT" devzone catalog apply
|
|
91
|
+
DEVZONE_STATE="$ETAT" "$ICI/devzone" catalog apply
|
|
92
92
|
return
|
|
93
93
|
fi
|
|
94
94
|
echo "devzone : unknown module : $m ; modules : ${MODULES[*]}" >&2
|
|
@@ -114,7 +114,12 @@ change_module() {
|
|
|
114
114
|
# the other modules go straight to their installer (hook exit 3).
|
|
115
115
|
if [ "$m" = postgres ] || [ "$m" = mysql ] || { [ "$m" = argocd ] && [ "$1" = off ]; }; then
|
|
116
116
|
# 0 done by Argo CD, 3 helm direct as before, else failed
|
|
117
|
-
if DEVZONE_STATE="$ETAT" devzone argocd services-hook "$m" "$1" "${@:3}"; then return 0; elif [ $? -ne 3 ]; then return 1; fi
|
|
117
|
+
if DEVZONE_STATE="$ETAT" "$ICI/devzone" argocd services-hook "$m" "$1" "${@:3}"; then return 0; elif [ $? -ne 3 ]; then return 1; fi
|
|
118
|
+
fi
|
|
119
|
+
# The assistant part of enable/disable ai runs in the Go command (#882).
|
|
120
|
+
if [ "$m" = ai ]; then
|
|
121
|
+
DEVZONE_STATE="$ETAT" "$ICI/devzone" ai apply "$1" "${@:3}"
|
|
122
|
+
else
|
|
123
|
+
"apply_$m" "$1" "${@:3}"
|
|
118
124
|
fi
|
|
119
|
-
"apply_$m" "$1" "${@:3}"
|
|
120
125
|
}
|
|
@@ -66,20 +66,20 @@ repair_item() {
|
|
|
66
66
|
repair_workstation() {
|
|
67
67
|
repair_failed=0
|
|
68
68
|
if [ "$(value_of gitlab)" = on ]; then
|
|
69
|
-
repair_item "gitlab name" devzone gitlab host-set
|
|
70
|
-
repair_item "gitlab relay" devzone gitlab relay-start
|
|
69
|
+
repair_item "gitlab name" "$ICI/devzone" gitlab host-set
|
|
70
|
+
repair_item "gitlab relay" "$ICI/devzone" gitlab relay-start
|
|
71
71
|
fi
|
|
72
72
|
if [ "$(value_of postgres)" = on ]; then
|
|
73
|
-
repair_item "postgres relay" devzone postgres relay-start
|
|
73
|
+
repair_item "postgres relay" "$ICI/devzone" postgres relay-start
|
|
74
74
|
fi
|
|
75
75
|
if [ "$(value_of argocd)" = on ]; then
|
|
76
76
|
repair_item "argocd relay" "$ICI/devzone" argocd relay-start
|
|
77
77
|
fi
|
|
78
78
|
if [ "$(value_of mysql)" = on ]; then
|
|
79
|
-
repair_item "mysql relay" devzone mysql relay-start
|
|
79
|
+
repair_item "mysql relay" "$ICI/devzone" mysql relay-start
|
|
80
80
|
fi
|
|
81
|
-
repair_item "catalog watcher" env DEVZONE_STATE="$ETAT" DEVZONE_CATALOG_REAL=yes devzone catalog-watcher start
|
|
82
|
-
repair_item "credentials" devzone passwords regenerate
|
|
83
|
-
devzone cluster clean || true
|
|
81
|
+
repair_item "catalog watcher" env DEVZONE_STATE="$ETAT" DEVZONE_CATALOG_REAL=yes "$ICI/devzone" catalog-watcher start
|
|
82
|
+
repair_item "credentials" "$ICI/devzone" passwords regenerate
|
|
83
|
+
"$ICI/devzone" cluster clean || true
|
|
84
84
|
return "$repair_failed"
|
|
85
85
|
}
|
|
@@ -88,7 +88,7 @@ apply_kubernetes() {
|
|
|
88
88
|
rm -f "$HOME/.kube/hote.config"
|
|
89
89
|
# metrics-server removed from the clusters where devzone installed it
|
|
90
90
|
# (devzone=installe marker set by the Go command); via its subcommand
|
|
91
|
-
devzone metrics remove || true
|
|
91
|
+
"$ICI/devzone" metrics remove || true
|
|
92
92
|
echo "devzone : kubernetes disabled"
|
|
93
93
|
fi
|
|
94
94
|
}
|
|
@@ -97,16 +97,16 @@ apply_gitlab() {
|
|
|
97
97
|
local current_state
|
|
98
98
|
if [ "$1" = on ]; then
|
|
99
99
|
# Skip if the state is ready and the runner online; otherwise install resumes
|
|
100
|
-
current_state="$(devzone gitlab status)"
|
|
100
|
+
current_state="$("$ICI/devzone" gitlab status)"
|
|
101
101
|
if [[ "$current_state" == *"ready"* && "$current_state" == *"runner online"* ]]; then
|
|
102
102
|
echo "devzone : gitlab already active, nothing to do."
|
|
103
103
|
# /etc/hosts regenerated by Docker: gitlab.localhost is set again here too
|
|
104
|
-
devzone gitlab host-set
|
|
104
|
+
"$ICI/devzone" gitlab host-set
|
|
105
105
|
# Failure of an old run cleared: gitlab is ready (#366)
|
|
106
106
|
rm -f "$(failure_marker_file gitlab)"
|
|
107
107
|
else
|
|
108
108
|
echo "devzone : activating gitlab via its installer…"
|
|
109
|
-
if ! devzone gitlab install; then
|
|
109
|
+
if ! "$ICI/devzone" gitlab install; then
|
|
110
110
|
echo "gitlab" > "$(failure_marker_file gitlab)"
|
|
111
111
|
return 1
|
|
112
112
|
fi
|
|
@@ -114,12 +114,12 @@ apply_gitlab() {
|
|
|
114
114
|
fi
|
|
115
115
|
else
|
|
116
116
|
# Disable gitlab only if its namespace still exists
|
|
117
|
-
if devzone gitlab installed; then
|
|
117
|
+
if "$ICI/devzone" gitlab installed; then
|
|
118
118
|
echo "devzone : deactivating gitlab…"
|
|
119
119
|
if [ -n "${DELETE_DATA:-}" ]; then
|
|
120
|
-
devzone gitlab uninstall --yes
|
|
120
|
+
"$ICI/devzone" gitlab uninstall --yes
|
|
121
121
|
else
|
|
122
|
-
devzone gitlab uninstall
|
|
122
|
+
"$ICI/devzone" gitlab uninstall
|
|
123
123
|
fi
|
|
124
124
|
else
|
|
125
125
|
echo "devzone : gitlab already deactivated (no devzone-gitlab namespace)."
|
|
@@ -152,33 +152,33 @@ apply_postgres() {
|
|
|
152
152
|
write_value postgres off
|
|
153
153
|
return 2
|
|
154
154
|
fi
|
|
155
|
-
actual="$(devzone kube saved)"
|
|
155
|
+
actual="$("$ICI/devzone" kube saved)"
|
|
156
156
|
if [ -n "$wanted" ] && [ -n "$actual" ] && [ "$wanted" != "$actual" ]; then
|
|
157
157
|
echo "devzone : devzone services are on $actual; to change: devzone cluster $wanted" >&2
|
|
158
158
|
write_value postgres off
|
|
159
159
|
return 2
|
|
160
160
|
fi
|
|
161
161
|
if [ -n "$confirm_ctx" ]; then
|
|
162
|
-
ctx="$(devzone kube choose "$wanted" --confirm "$confirm_ctx")" || { write_value postgres off; return 2; }
|
|
162
|
+
ctx="$("$ICI/devzone" kube choose "$wanted" --confirm "$confirm_ctx")" || { write_value postgres off; return 2; }
|
|
163
163
|
else
|
|
164
|
-
ctx="$(devzone kube choose "$wanted")" || { write_value postgres off; return 2; }
|
|
164
|
+
ctx="$("$ICI/devzone" kube choose "$wanted")" || { write_value postgres off; return 2; }
|
|
165
165
|
fi
|
|
166
166
|
# Choice kept before the installation: a resume targets the same cluster
|
|
167
|
-
devzone kube save "$ctx"
|
|
168
|
-
current_state="$(devzone postgres status)"
|
|
167
|
+
"$ICI/devzone" kube save "$ctx"
|
|
168
|
+
current_state="$("$ICI/devzone" postgres status)"
|
|
169
169
|
# "relay stopped" first: this line also starts with "ready on"
|
|
170
170
|
if [[ "$current_state" == *"relay stopped"* ]]; then
|
|
171
|
-
devzone postgres relay-start
|
|
171
|
+
"$ICI/devzone" postgres relay-start
|
|
172
172
|
echo "devzone : postgres : relay restarted"
|
|
173
173
|
elif [[ "$current_state" == "ready on"* ]]; then
|
|
174
174
|
echo "devzone : postgres already active, nothing to do."
|
|
175
|
-
elif ! devzone postgres install; then
|
|
175
|
+
elif ! "$ICI/devzone" postgres install; then
|
|
176
176
|
echo "postgres" >"$(failure_marker_file postgres)"
|
|
177
177
|
return 1
|
|
178
178
|
fi
|
|
179
179
|
rm -f "$(failure_marker_file postgres)"
|
|
180
180
|
else
|
|
181
|
-
devzone postgres uninstall
|
|
181
|
+
"$ICI/devzone" postgres uninstall
|
|
182
182
|
rm -f "$(failure_marker_file postgres)"
|
|
183
183
|
fi
|
|
184
184
|
}
|
|
@@ -218,14 +218,14 @@ apply_mysql() {
|
|
|
218
218
|
echo mysql >"$(failure_marker_file mysql)"
|
|
219
219
|
return 2
|
|
220
220
|
fi
|
|
221
|
-
current_state="$(devzone mysql status)"
|
|
221
|
+
current_state="$("$ICI/devzone" mysql status)"
|
|
222
222
|
# "relay stopped" first: this line also starts with "ready on"
|
|
223
223
|
if [[ "$current_state" == *"relay stopped"* ]]; then
|
|
224
|
-
devzone mysql relay-start
|
|
224
|
+
"$ICI/devzone" mysql relay-start
|
|
225
225
|
echo "devzone : mysql: relay restarted"
|
|
226
226
|
elif [[ "$current_state" == "ready on"* ]]; then
|
|
227
227
|
echo "devzone : mysql already active, nothing to do."
|
|
228
|
-
elif ! devzone mysql install; then
|
|
228
|
+
elif ! "$ICI/devzone" mysql install; then
|
|
229
229
|
echo mysql >"$(failure_marker_file mysql)"
|
|
230
230
|
return 1
|
|
231
231
|
fi
|
|
@@ -233,9 +233,9 @@ apply_mysql() {
|
|
|
233
233
|
else
|
|
234
234
|
# Removal without deleting the data: volume kept (#441); the databases
|
|
235
235
|
# only leave with a yes (confirm_removal)
|
|
236
|
-
DEVZONE_STATE="$ETAT" devzone catalog remove mysql
|
|
236
|
+
DEVZONE_STATE="$ETAT" "$ICI/devzone" catalog remove mysql
|
|
237
237
|
if [ -n "${DELETE_DATA:-}" ]; then
|
|
238
|
-
devzone mysql delete-data --yes
|
|
238
|
+
"$ICI/devzone" mysql delete-data --yes
|
|
239
239
|
fi
|
|
240
240
|
rm -f "$(failure_marker_file mysql)"
|
|
241
241
|
fi
|
|
@@ -63,18 +63,21 @@ show_state() {
|
|
|
63
63
|
printf ' ✖ module %-10s failed: incomplete install (%s): devzone apply\n' "$m" "$(cat "$(failure_marker_file "$m")")"
|
|
64
64
|
elif [ "$(value_of "$m")" = on ] && [ "$m" = gitlab ]; then
|
|
65
65
|
# gitlab active: its real state (ready, runner, failed)
|
|
66
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(devzone gitlab status)"
|
|
66
|
+
printf ' ✔ module %-10s %s\n' "$m" "$("$ICI/devzone" gitlab status)"
|
|
67
67
|
elif [ "$(value_of "$m")" = on ] && [ "$m" = postgres ]; then
|
|
68
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(devzone postgres status)"
|
|
68
|
+
printf ' ✔ module %-10s %s\n' "$m" "$("$ICI/devzone" postgres status)"
|
|
69
69
|
elif [ "$(value_of "$m")" = on ] && [ "$m" = argocd ]; then
|
|
70
70
|
printf ' ✔ module %-10s %s\n' "$m" "$("$ICI/devzone" argocd status)"
|
|
71
71
|
elif [ "$(value_of "$m")" = on ] && [ "$m" = mysql ]; then
|
|
72
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(devzone mysql status)"
|
|
72
|
+
printf ' ✔ module %-10s %s\n' "$m" "$("$ICI/devzone" mysql status)"
|
|
73
73
|
elif [ "$(value_of "$m")" = on ]; then
|
|
74
74
|
printf ' ✔ module %-10s active: %s\n' "$m" "$(description "$m")"
|
|
75
75
|
else
|
|
76
76
|
printf ' ○ module %-10s optional, %s: devzone enable %s\n' "$m" "$(description "$m")" "$m"
|
|
77
77
|
fi
|
|
78
|
+
# Service held by an Argo CD Application (#916): the line is printed by devzone state held
|
|
79
|
+
held="$(DEVZONE_STATE="$ETAT" bash "$ICI/devzone" state held "$m" 2>/dev/null || true)"
|
|
80
|
+
[ -z "$held" ] || printf ' %s\n' "$held"
|
|
78
81
|
done
|
|
79
82
|
# GitOps repository of the instance (#539): the designation of .argocd.conf
|
|
80
83
|
argocd_repo="$(conf_get argocd repo)"
|
|
@@ -87,18 +90,18 @@ show_state() {
|
|
|
87
90
|
fi
|
|
88
91
|
# Catalog applications (#414)
|
|
89
92
|
if [ -d "$ICI/catalog" ]; then
|
|
90
|
-
DEVZONE_STATE="$ETAT" devzone catalog resume
|
|
93
|
+
DEVZONE_STATE="$ETAT" "$ICI/devzone" catalog resume
|
|
91
94
|
fi
|
|
92
95
|
# GitLab Rails secret (#347): warning if the secrets were lost
|
|
93
96
|
if [ "$(value_of gitlab)" = on ] && [ ! -f "$RACINE/workspace/.gitlab/rails-secret.yaml" ]; then
|
|
94
97
|
echo " ⚠ gitlab GitLab reinstalled: if the browser shows 422, delete the site data of gitlab.localhost"
|
|
95
98
|
fi
|
|
96
99
|
# Remote devzone cluster: warning in the summary
|
|
97
|
-
current_cluster="$(devzone kube saved)"
|
|
98
|
-
if [ -n "$current_cluster" ] && ! devzone kube local "$current_cluster"; then
|
|
100
|
+
current_cluster="$("$ICI/devzone" kube saved)"
|
|
101
|
+
if [ -n "$current_cluster" ] && ! "$ICI/devzone" kube local "$current_cluster"; then
|
|
99
102
|
printf ' ⚠ cluster remote: %s — services on a remote cluster\n' "$current_cluster"
|
|
100
103
|
fi
|
|
101
|
-
devzone cluster clean --quiet || true
|
|
104
|
+
"$ICI/devzone" cluster clean --quiet || true
|
|
102
105
|
# Old kind-gitlab cluster still present: invite to migrate (#396)
|
|
103
106
|
if kind get clusters 2>/dev/null | grep -qx "gitlab${INSTANCE_SUFFIX}"; then
|
|
104
107
|
printf ' ⚠ old kind-gitlab cluster%s: devzone gitlab migrate\n' "$INSTANCE_SUFFIX"
|
|
@@ -108,7 +111,7 @@ show_state() {
|
|
|
108
111
|
case "$ctx_work" in
|
|
109
112
|
kind-gitlab* | kind-devzone*)
|
|
110
113
|
ctx_host="$(KUBECONFIG="${DEVZONE_KUBE_HOST:-$HOME/.kube/hote.config}" kubectl config current-context 2>/dev/null || true)"
|
|
111
|
-
if [ -n "$ctx_host" ] && devzone kube reachable "$ctx_host"; then
|
|
114
|
+
if [ -n "$ctx_host" ] && "$ICI/devzone" kube reachable "$ctx_host"; then
|
|
112
115
|
printf ' ⚠ working cluster: %s (devzone internal cluster); go back: devzone use %s\n' "$ctx_work" "$ctx_host"
|
|
113
116
|
fi
|
|
114
117
|
;;
|
package/.devcontainer/help.sh
CHANGED
|
@@ -24,6 +24,8 @@ devzone_aide() {
|
|
|
24
24
|
devzone test-gitlab end-to-end test of the GitLab module and platform
|
|
25
25
|
devzone agent <folder> <instructions> drive opencode with the instructions file
|
|
26
26
|
devzone ai list the host (Ollama) models detected and the default model
|
|
27
|
+
devzone ai check|rapport update state of each model | sizes, choices and reasons
|
|
28
|
+
devzone ai guard [--format claude] check one tool call on standard input (agent guard)
|
|
27
29
|
devzone ticket <n> [--repo devzone|repowarden] ticket worktree (ticket done <n> removes it)
|
|
28
30
|
devzone build <folder> [--tag <name>] build an image in the Kubernetes workspace (BuildKit)
|
|
29
31
|
devzone enable postgres [--context CTX] [--confirm CTX] shared PostgreSQL, cluster of choice
|
|
@@ -7,3 +7,8 @@ METRICS_SERVER_VERSION=v0.9.0
|
|
|
7
7
|
# BuildKit client version installed in the workspace image (#514). Must match
|
|
8
8
|
# buildkit.image in charts/devzone-workspace/values.yaml.
|
|
9
9
|
BUILDKIT_VERSION=0.34.2
|
|
10
|
+
|
|
11
|
+
# metrics-server, dependency of Argo CD: the official chart pinned here (3.14.0
|
|
12
|
+
# ships the application METRICS_SERVER_VERSION above). Read by internal/domain/argocd;
|
|
13
|
+
# the chart and the application move together.
|
|
14
|
+
METRICS_SERVER_CHART_VERSION=3.14.0
|
package/README.md
CHANGED
|
@@ -246,7 +246,7 @@ In the workspace pod, the `devzone` summary reports a more recent published vers
|
|
|
246
246
|
|
|
247
247
|
**`postgres` module**: a shared PostgreSQL, one database per project (see [Connecting to PostgreSQL](#connecting-to-postgresql)). To enable it: `devzone enable postgres`.
|
|
248
248
|
|
|
249
|
-
**`argocd` module**: Argo CD on the devzone cluster, interface at https://127.0.0.1:8443 in the container (see [Argo CD](manage/docs/reference.md#argo-cd)). To enable it: `devzone enable argocd`.
|
|
249
|
+
**`argocd` module**: Argo CD on the devzone cluster, interface at https://127.0.0.1:8443 in the container (see [Argo CD](manage/docs/reference.md#argo-cd)). To enable it: `devzone enable argocd`. With the module on, GitLab, PostgreSQL, MySQL, the workspace and the catalogue applications are Applications, development clones included; an existing installation is adopted without losing data, and without a usable revision the command fails instead of installing directly. Argo CD itself is the only exception.
|
|
250
250
|
|
|
251
251
|
**`devzone agent --pod` option**: launches an agent session in an isolated disposable pod (ticket #222). The pod is created with limited resources (2 CPU, 4 Gi memory), restricted mounts of the workspace and the state, and a mandatory affinity to the workspace pod. It isolates: the ticket's worktree at the same path as in the workspace, the repository's `.git`, and state subfolders (.config/opencode, .local/share/opencode, .local/state/oc-lancer, .local/npm read-only). It does NOT isolate: the network (unfiltered, that is #220), the host kubeconfig, `~/.config/gh`, `~/.claude`, the other worktrees, and, since the repository's `.git` is mounted, the git references of the other branches remain readable and writable there. Without `--pod`, the current `devzone agent` behavior is strictly unchanged.
|
|
252
252
|
|
|
@@ -357,7 +357,7 @@ A project's user owns **its** database (it creates tables, indexes, data in it)
|
|
|
357
357
|
|
|
358
358
|
## See my application in the browser
|
|
359
359
|
|
|
360
|
-
On the Kubernetes workstation, `devzone workspace start` starts a port watcher: each TCP port ≥ 1024 that listens in the pod is relayed to `127.0.0.1` of the workstation, at the same number, by `kubectl port-forward`. A server started in the pod (`npm run dev`, port 5173) therefore answers at `http://localhost:5173`, without a command. The enabled services (PostgreSQL, MySQL, Argo CD) are relayed too, on their usual port. The Services of applications deployed in the cluster are relayed the same way, each on a local port (80 → 8080; a port already taken elsewhere becomes another port): `devzone workspace ports status` shows their URL `http://127.0.0.1:<port>`. A Service can be excluded with the annotation `devzone.io/relay: "false"`. The watcher is driven with `devzone workspace ports start|stop|status`; details in the [reference](manage/docs/reference.md#applications-and-services-on-the-workstations-localhost). Its automatic start needs no command: the Go program installs or repairs it after a folder creation, an update or any successful devzone command from a devzone folder, silently once it is current. `devzone workspace ports disable` and `devzone uninstall` remember the refusal in `.devzone.ports-disabled` in that folder; `devzone workspace ports enable` removes the marker.
|
|
360
|
+
On the Kubernetes workstation, `devzone workspace start` starts a port watcher: each TCP port ≥ 1024 that listens in the pod is relayed to `127.0.0.1` of the workstation, at the same number, by `kubectl port-forward`. A server started in the pod (`npm run dev`, port 5173) therefore answers at `http://localhost:5173`, without a command. The enabled services (PostgreSQL, MySQL, Argo CD) are relayed too, on their usual port. The Services of applications deployed in the cluster are relayed the same way, each on a local port (80 → 8080; a port already taken elsewhere becomes another port): `devzone workspace ports status` shows their URL `http://127.0.0.1:<port>`. A Service can be excluded with the annotation `devzone.io/relay: "false"`. The watcher is driven with `devzone workspace ports start|stop|status`; details in the [reference](manage/docs/reference.md#applications-and-services-on-the-workstations-localhost). Its automatic start needs no command: the Go program installs or repairs it after a folder creation, an update or any successful devzone command from a devzone folder, silently once it is current. `devzone workspace ports disable` and `devzone uninstall` remember the refusal in `.devzone.ports-disabled` in that folder; `devzone workspace ports enable` removes the marker. On Windows, the automatic start is a scheduled task of the user (#903); it has not yet been tried on a real Windows workstation, only with Go tests.
|
|
361
361
|
|
|
362
362
|
The relays kept in the state of a workstation instance are listed and closed with `devzone port`:
|
|
363
363
|
|
package/bin/SHA256SUMS
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
a6d69bbf0722bb5d9f68cadf1e4840c0e10049930c32116bc2b85884928b1653 devzone-linux-amd64
|
|
2
|
+
df0b379983c3ec6aa816beddd2ea92e5c08cc8f7fc4f963f5e96f4e691e455b7 devzone-linux-arm64
|
|
3
|
+
f71e26ac6ca27d75c3577fb373729edf6544cbdb12e9228c621d6480a2502c95 devzone-darwin-amd64
|
|
4
|
+
e047de3b934eb6fa76f683b49e2ce061923eae7d9a9b9cecbb73eda61a8078d8 devzone-darwin-arm64
|
|
5
|
+
6441bdd505cacb674ec91aa5c971eede8a9e13addc90f6a4d99664b5eae20903 devzone-windows-amd64.exe
|
|
6
|
+
4574d4d451ee11f97297273bb035f3eb8339bf046f53d95393ab4747556847d4 devzone-windows-arm64.exe
|
package/bin/devzone-darwin-amd64
CHANGED
|
Binary file
|
package/bin/devzone-darwin-arm64
CHANGED
|
Binary file
|
package/bin/devzone-linux-amd64
CHANGED
|
Binary file
|
package/bin/devzone-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/manage/devzone
CHANGED
|
@@ -138,6 +138,8 @@ go_launch() {
|
|
|
138
138
|
fi
|
|
139
139
|
# The Go binary finds the bash command (and the package.json) from here, even
|
|
140
140
|
# copied into the cache; Git Bash gives it a Windows path
|
|
141
|
+
# The shell scripts still run here call the Go program for their checks (#884)
|
|
142
|
+
export DEVZONE_HOST_BIN="$target"
|
|
141
143
|
DEVZONE_BASH_ENTRY="$PAQUET/manage/devzone"
|
|
142
144
|
case "$platform" in
|
|
143
145
|
windows-*) DEVZONE_BASH_ENTRY="$(cygpath -m "$DEVZONE_BASH_ENTRY" 2>/dev/null || echo "$DEVZONE_BASH_ENTRY")" ;;
|
|
@@ -165,7 +167,8 @@ devzone $(version): development workspace in a Kubernetes cluster
|
|
|
165
167
|
in a devzone folder: removes Kubernetes objects of this devzone
|
|
166
168
|
instance (namespaces, Argo CD Applications, temporary accounts,
|
|
167
169
|
.devzone.* files); workspace/ is kept; asks for confirmation
|
|
168
|
-
devzone
|
|
170
|
+
devzone ai [check|rapport|guard] host models, update report or tool-call guard
|
|
171
|
+
devzone workspace start|stop|status|shell|update|deploy
|
|
169
172
|
devzone workspace vscode|copy-to|copy-from|clone
|
|
170
173
|
Kubernetes workspace: drives the devzone-workspace chart
|
|
171
174
|
(start installs it, stop removes it from the cluster)
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
# shellcheck disable=SC2034 # CREATE_MODE is read by manage/devzone (creer)
|
|
10
10
|
# shellcheck source=manage/scripts/kube-ready.sh
|
|
11
11
|
. "$(dirname "${BASH_SOURCE[0]}")/kube-ready.sh"
|
|
12
|
-
# shellcheck source=manage/scripts/create-cluster.sh
|
|
13
|
-
. "$(dirname "${BASH_SOURCE[0]}")/create-cluster.sh"
|
|
14
12
|
|
|
15
13
|
# Context shown to the user: devzone if declared, otherwise the current one.
|
|
16
14
|
kube_context() {
|
|
@@ -50,7 +48,9 @@ create_mode_choose() {
|
|
|
50
48
|
fi
|
|
51
49
|
# No option, in a terminal: a menu (remote cluster, minikube) instead of a
|
|
52
50
|
# failure (#653); the choice is accepted only if the cluster then answers.
|
|
53
|
-
|
|
51
|
+
# The menu is the Go program's (#884), found through DEVZONE_HOST_BIN; without
|
|
52
|
+
# it no menu is offered (false), and the failure below lists the ways to get a cluster
|
|
53
|
+
if [ -z "$option" ] && "${DEVZONE_HOST_BIN:-false}" cluster-offer && reason="$(kube_ready_reason)"; then
|
|
54
54
|
CREATE_MODE=kubernetes
|
|
55
55
|
echo "✔ Kubernetes ready ($(kube_context)): workspace in the cluster"
|
|
56
56
|
create_mode_existing
|
|
@@ -26,10 +26,9 @@ case "$KEEP" in "" | logins | connexions) ;; *)
|
|
|
26
26
|
;;
|
|
27
27
|
esac
|
|
28
28
|
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
|
|
32
|
-
docker_ready "${DEVZONE_COMMAND:-make desinstaller}" || exit 1
|
|
29
|
+
# Host engine first: without it every call would show its raw error. The check
|
|
30
|
+
# is the Go program's (#884), found through DEVZONE_HOST_BIN, exported by manage/devzone
|
|
31
|
+
"${DEVZONE_HOST_BIN:?devzone: Go program not found (DEVZONE_HOST_BIN), run it through manage/devzone}" host-check "${DEVZONE_COMMAND:-make desinstaller}" || exit 1
|
|
33
32
|
|
|
34
33
|
# .argocd.conf of the devzone folder: the GitOps repository is never removed
|
|
35
34
|
# with the devzone, only its designation can be changed later
|
package/manage/workspace.sh
CHANGED
|
@@ -85,7 +85,7 @@ start_workspace() {
|
|
|
85
85
|
image="$repo:$tag"
|
|
86
86
|
# Argo CD first when wanted (#516): the workspace is then an Application
|
|
87
87
|
argocd_ensure
|
|
88
|
-
workspace_deploy "$repo" "$tag" "$with_image"
|
|
88
|
+
if [ -n "${DEVZONE_FROM_GO:-}" ] && argocd_active; then devzone workspace deploy "$repo" "$tag" "$with_image"; else workspace_deploy "$repo" "$tag" "$with_image"; fi
|
|
89
89
|
# Projects of .argocd.conf held too (#516)
|
|
90
90
|
argocd_reconcile || true
|
|
91
91
|
wait_for_pod "$image" || return 1
|