devzone 1.1.0 → 2.0.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/Dockerfile +4 -4
- package/.devcontainer/agent-local.sh +2 -2
- package/.devcontainer/{agent-modele.messages → agent-model.messages} +1 -1
- package/.devcontainer/{agent-modele.sh → agent-model.sh} +5 -5
- package/.devcontainer/{agent-droits.sh → agent-rights.sh} +2 -2
- package/.devcontainer/agent-session.sh +1 -1
- package/.devcontainer/{agent-etat-json.sh → agent-state-json.sh} +4 -4
- package/.devcontainer/agent.sh +7 -7
- package/.devcontainer/{ia/docker-garde.sh → ai/docker-guard.sh} +1 -1
- package/.devcontainer/{ia/plugins/devzone-garde-v2.js → ai/plugins/devzone-guard-v2.js} +4 -4
- package/.devcontainer/{ia/plugins/devzone-garde.js → ai/plugins/devzone-guard.js} +3 -3
- package/.devcontainer/argocd/argocd.sh +4 -4
- package/.devcontainer/argocd/{catalogue-argocd.sh → catalog-argocd.sh} +1 -1
- package/.devcontainer/argocd/services-hook.sh +5 -5
- package/.devcontainer/{catalogue → catalog}/app.sh +3 -3
- package/.devcontainer/{catalogue/catalogue-veilleur.sh → catalog/catalog-watcher.sh} +5 -5
- package/.devcontainer/{catalogue → catalog}/mysql/mysql.sh +6 -6
- package/.devcontainer/{catalogue.sh → catalog.sh} +10 -10
- package/.devcontainer/cluster.sh +7 -7
- package/.devcontainer/devcontainer.json +1 -1
- package/.devcontainer/devzone +41 -41
- package/.devcontainer/{docker-relais.sh → docker-relay.sh} +2 -2
- package/.devcontainer/gitlab/argocd.sh +2 -2
- package/.devcontainer/gitlab/gitlab.sh +3 -3
- package/.devcontainer/gitlab/installation.sh +2 -2
- package/.devcontainer/{kind-enveloppe.sh → kind-wrapper.sh} +5 -5
- package/.devcontainer/{kube-compte.sh → kube-account.sh} +3 -3
- package/.devcontainer/{kube-joignable.sh → kube-reachable.sh} +1 -1
- package/.devcontainer/{paquets.sh → packages.sh} +4 -4
- package/.devcontainer/ports-auto.sh +1 -1
- package/.devcontainer/ports.sh +3 -3
- package/.devcontainer/post-create.sh +2 -2
- package/.devcontainer/postgres/postgres.sh +2 -2
- package/.devcontainer/services-admin.sh +2 -2
- package/.devcontainer/skills/devzone/SKILL.md +1 -1
- package/.devcontainer/{demarrage.sh → startup.sh} +5 -5
- package/.devcontainer/{etat-json.sh → state-json.sh} +4 -4
- package/.devcontainer/{etat-verrou.sh → state-lock.sh} +1 -1
- package/.devcontainer/{etat.sh → state.sh} +2 -2
- package/.devcontainer/workspace-init.sh +1 -1
- package/Makefile +7 -7
- package/manage/devzone +3 -3
- package/manage/scripts/check-go-layout.sh +40 -0
- package/manage/scripts/check-names.sh +60 -0
- package/manage/scripts/devzone-create.sh +2 -2
- package/manage/scripts/devzone-manifest.sh +2 -2
- package/manage/scripts/docker-workstation.sh +2 -2
- package/manage/scripts/docker.sh +2 -2
- package/manage/scripts/{lancer.sh → launch.sh} +3 -3
- package/manage/scripts/{migrer-retour.sh → migrate-revert.sh} +1 -1
- package/manage/scripts/{migrer.sh → migrate.sh} +1 -1
- package/manage/workspace.sh +4 -4
- package/package.json +1 -1
- /package/.devcontainer/{agent-erreurs.sh → agent-errors.sh} +0 -0
- /package/.devcontainer/{ia/docker-garde.message → ai/docker-guard.message} +0 -0
- /package/.devcontainer/{ia → ai}/host-check.message +0 -0
- /package/.devcontainer/{ia → ai}/host-check.sh +0 -0
- /package/.devcontainer/{ia → ai}/host-models.sh +0 -0
- /package/.devcontainer/{catalogue → catalog}/mysql/app.conf +0 -0
- /package/.devcontainer/{catalogue/mysql/installer.sh → catalog/mysql/install.sh} +0 -0
- /package/.devcontainer/{catalogue → catalog}/mysql/volume.sh +0 -0
- /package/.devcontainer/{docker-sans-hote.sh → docker-without-host.sh} +0 -0
- /package/.devcontainer/{isolement.sh → isolation.sh} +0 -0
- /package/.devcontainer/{memoire.sh → memory.sh} +0 -0
- /package/.devcontainer/{etat-gitops.sh → state-gitops.sh} +0 -0
- /package/manage/scripts/{desinstaller.sh → uninstall.sh} +0 -0
package/.devcontainer/devzone
CHANGED
|
@@ -47,17 +47,17 @@ if [ -f "$ICI/argocd/conf.sh" ]; then
|
|
|
47
47
|
. "$ICI/argocd/conf.sh"
|
|
48
48
|
fi
|
|
49
49
|
# GitOps repository line in the Kubernetes workspace pod (#639)
|
|
50
|
-
# shellcheck source=SCRIPTDIR/
|
|
50
|
+
# shellcheck source=SCRIPTDIR/state-gitops.sh
|
|
51
51
|
# shellcheck disable=SC1091
|
|
52
|
-
. "$ICI/
|
|
52
|
+
. "$ICI/state-gitops.sh"
|
|
53
53
|
# Detection of the host (Ollama) models and the devzone-host opencode provider (#665).
|
|
54
|
-
# shellcheck source=SCRIPTDIR/
|
|
54
|
+
# shellcheck source=SCRIPTDIR/ai/host-models.sh
|
|
55
55
|
# shellcheck disable=SC1091
|
|
56
|
-
. "$ICI/
|
|
56
|
+
. "$ICI/ai/host-models.sh"
|
|
57
57
|
# Update check and report for the host (Ollama) models (#668).
|
|
58
|
-
# shellcheck source=SCRIPTDIR/
|
|
58
|
+
# shellcheck source=SCRIPTDIR/ai/host-check.sh
|
|
59
59
|
# shellcheck disable=SC1091
|
|
60
|
-
. "$ICI/
|
|
60
|
+
. "$ICI/ai/host-check.sh"
|
|
61
61
|
|
|
62
62
|
# Assistants IA, versions figées : mettre à jour ici, puis devzone apply
|
|
63
63
|
# (ou Rebuild Container). Une ligne par paquet, séparées par une ligne qui ne
|
|
@@ -99,7 +99,7 @@ connu() {
|
|
|
99
99
|
return 1
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
# Premier démarrage (aucun état) : l'état est créé par
|
|
102
|
+
# Premier démarrage (aucun état) : l'état est créé par state.sh (#417) :
|
|
103
103
|
# ancien état global repris, copie de secours restaurée, état reconstruit
|
|
104
104
|
# depuis le cluster des services, sinon première installation
|
|
105
105
|
initialiser() {
|
|
@@ -406,8 +406,8 @@ installer_ia() {
|
|
|
406
406
|
# PreToolUse hook in the global settings and the two opencode plugins in the
|
|
407
407
|
# global plugins folder. Idempotent, other user settings and hooks preserved.
|
|
408
408
|
poser_garde_docker() {
|
|
409
|
-
local script="$ICI/
|
|
410
|
-
local src="$ICI/
|
|
409
|
+
local script="$ICI/ai/docker-guard.sh" config="$HOME/.claude/settings.json"
|
|
410
|
+
local src="$ICI/ai/plugins" dst="$HOME/.config/opencode/plugins"
|
|
411
411
|
local tmp f
|
|
412
412
|
if ! command -v jq >/dev/null 2>&1; then
|
|
413
413
|
echo "devzone : jq absent : garde-fou docker non posé pour Claude Code" >&2
|
|
@@ -420,7 +420,7 @@ poser_garde_docker() {
|
|
|
420
420
|
if jq --arg cmd "bash \"$script\" --format claude" '
|
|
421
421
|
.hooks = (.hooks // {}) |
|
|
422
422
|
.hooks.PreToolUse = (.hooks.PreToolUse // []) |
|
|
423
|
-
if ([.hooks.PreToolUse[]? | .hooks[]? | (.command // "")] | any(contains("docker-
|
|
423
|
+
if ([.hooks.PreToolUse[]? | .hooks[]? | (.command // "")] | any(contains("docker-guard.sh")))
|
|
424
424
|
then .
|
|
425
425
|
else .hooks.PreToolUse += [{"matcher": "Bash", "hooks": [{"type": "command", "command": $cmd}]}]
|
|
426
426
|
end
|
|
@@ -432,14 +432,14 @@ poser_garde_docker() {
|
|
|
432
432
|
fi
|
|
433
433
|
fi
|
|
434
434
|
mkdir -p "$dst"
|
|
435
|
-
for f in devzone-
|
|
435
|
+
for f in devzone-guard.js devzone-guard-v2.js; do
|
|
436
436
|
[ -f "$src/$f" ] || continue
|
|
437
437
|
sed "s|__DEVZONE_DOCKER_GARDE__|$script|g" "$src/$f" >"$dst/$f"
|
|
438
438
|
done
|
|
439
439
|
echo "devzone : garde-fou docker actif pour Claude Code et opencode"
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
# Removes only the Docker guard entries (commands containing docker-
|
|
442
|
+
# Removes only the Docker guard entries (commands containing docker-guard.sh)
|
|
443
443
|
# and the two plugins; the rest of settings.json and of the plugins is kept.
|
|
444
444
|
retirer_garde_docker() {
|
|
445
445
|
local config="$HOME/.claude/settings.json" tmp
|
|
@@ -450,10 +450,10 @@ retirer_garde_docker() {
|
|
|
450
450
|
.hooks.PreToolUse = [
|
|
451
451
|
.hooks.PreToolUse[] |
|
|
452
452
|
if (.hooks // null) != null then
|
|
453
|
-
.hooks = [ .hooks[] | select(((.command // "") | contains("docker-
|
|
453
|
+
.hooks = [ .hooks[] | select(((.command // "") | contains("docker-guard.sh")) | not) ] |
|
|
454
454
|
select((.hooks | length) > 0)
|
|
455
455
|
else
|
|
456
|
-
select(((.command // "") | contains("docker-
|
|
456
|
+
select(((.command // "") | contains("docker-guard.sh")) | not)
|
|
457
457
|
end
|
|
458
458
|
] |
|
|
459
459
|
if (.hooks.PreToolUse | length) == 0 then del(.hooks.PreToolUse) else . end |
|
|
@@ -469,8 +469,8 @@ retirer_garde_docker() {
|
|
|
469
469
|
rm -f "$tmp"
|
|
470
470
|
fi
|
|
471
471
|
fi
|
|
472
|
-
rm -f "$HOME/.config/opencode/plugins/devzone-
|
|
473
|
-
"$HOME/.config/opencode/plugins/devzone-
|
|
472
|
+
rm -f "$HOME/.config/opencode/plugins/devzone-guard.js" \
|
|
473
|
+
"$HOME/.config/opencode/plugins/devzone-guard-v2.js"
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
appliquer_ia() {
|
|
@@ -712,14 +712,14 @@ appliquer_mysql() {
|
|
|
712
712
|
echo mysql >"$(fichier_echec mysql)"
|
|
713
713
|
return 2
|
|
714
714
|
fi
|
|
715
|
-
etat_courant="$(bash "$ICI/
|
|
715
|
+
etat_courant="$(bash "$ICI/catalog/mysql/mysql.sh" status)"
|
|
716
716
|
# « relais arrêté » d'abord : cette ligne commence aussi par « prêt sur »
|
|
717
717
|
if [[ "$etat_courant" == *"relais arrêté"* ]]; then
|
|
718
|
-
bash "$ICI/
|
|
718
|
+
bash "$ICI/catalog/mysql/mysql.sh" relay-start
|
|
719
719
|
echo "devzone : mysql : relais relancé"
|
|
720
720
|
elif [[ "$etat_courant" == "prêt sur"* ]]; then
|
|
721
721
|
echo "devzone : mysql déjà actif, rien à faire."
|
|
722
|
-
elif ! bash "$ICI/
|
|
722
|
+
elif ! bash "$ICI/catalog/mysql/mysql.sh" install; then
|
|
723
723
|
echo mysql >"$(fichier_echec mysql)"
|
|
724
724
|
return 1
|
|
725
725
|
fi
|
|
@@ -727,9 +727,9 @@ appliquer_mysql() {
|
|
|
727
727
|
else
|
|
728
728
|
# Retrait sans suppression des données : volume gardé (#441) ; les
|
|
729
729
|
# bases ne partent qu'avec un oui (confirmer_suppression)
|
|
730
|
-
bash "$ICI/
|
|
730
|
+
bash "$ICI/catalog.sh" remove mysql
|
|
731
731
|
if [ -n "${SUPPRIMER_DONNEES:-}" ]; then
|
|
732
|
-
bash "$ICI/
|
|
732
|
+
bash "$ICI/catalog/mysql/mysql.sh" delete-data --yes
|
|
733
733
|
fi
|
|
734
734
|
rm -f "$(fichier_echec mysql)"
|
|
735
735
|
fi
|
|
@@ -1153,7 +1153,7 @@ ligne_version_disponible() {
|
|
|
1153
1153
|
fi
|
|
1154
1154
|
}
|
|
1155
1155
|
|
|
1156
|
-
# Réparation (#341) : reprend la suite de
|
|
1156
|
+
# Réparation (#341) : reprend la suite de startup.sh sans l'identité git ni
|
|
1157
1157
|
# les clusters. Chaque élément est réparé pour de vrai ; ✔ ou ✖ avec la raison.
|
|
1158
1158
|
reparer_element() {
|
|
1159
1159
|
local nom="$1" sortie code raison
|
|
@@ -1173,11 +1173,11 @@ reparer_element() {
|
|
|
1173
1173
|
# et identifiants ; un échec n'empêche pas les suivants.
|
|
1174
1174
|
reparer() {
|
|
1175
1175
|
reparer_echec=0
|
|
1176
|
-
reparer_element "relais Docker" env DEVZONE_RELAIS_REEL=oui bash "$ICI/docker-
|
|
1176
|
+
reparer_element "relais Docker" env DEVZONE_RELAIS_REEL=oui bash "$ICI/docker-relay.sh"
|
|
1177
1177
|
# Jeton du compte Kubernetes limité (#430) : 24 h, renouvelé ici ; sans
|
|
1178
1178
|
# module kubernetes et sans cluster des services, rien à faire
|
|
1179
1179
|
if [ "$(valeur kubernetes)" = on ] || [ -n "$(cluster_lu)" ]; then
|
|
1180
|
-
reparer_element "compte kubernetes" bash "$ICI/kube-
|
|
1180
|
+
reparer_element "compte kubernetes" bash "$ICI/kube-account.sh" jeton
|
|
1181
1181
|
fi
|
|
1182
1182
|
if [ "$(valeur gitlab)" = on ]; then
|
|
1183
1183
|
reparer_element "nom gitlab" bash "$ICI/gitlab/gitlab.sh" hote-poser
|
|
@@ -1190,14 +1190,14 @@ reparer() {
|
|
|
1190
1190
|
reparer_element "relais argocd" bash "$ICI/argocd/argocd.sh" relay-start
|
|
1191
1191
|
fi
|
|
1192
1192
|
if [ "$(valeur mysql)" = on ]; then
|
|
1193
|
-
reparer_element "relais mysql" bash "$ICI/
|
|
1193
|
+
reparer_element "relais mysql" bash "$ICI/catalog/mysql/mysql.sh" relay-start
|
|
1194
1194
|
fi
|
|
1195
1195
|
reparer_element "relais de ports" bash "$ICI/ports.sh" restart
|
|
1196
1196
|
# Kubernetes workspace (#517): no automatic port watcher
|
|
1197
1197
|
if ! dans_pod; then
|
|
1198
1198
|
reparer_element "veilleur ports auto" env DEVZONE_PORTS_AUTO_REEL=oui bash "$ICI/ports-auto.sh" demarrer
|
|
1199
1199
|
fi
|
|
1200
|
-
reparer_element "veilleur catalogue" env DEVZONE_CATALOGUE_REEL=oui bash "$ICI/
|
|
1200
|
+
reparer_element "veilleur catalogue" env DEVZONE_CATALOGUE_REEL=oui bash "$ICI/catalog/catalog-watcher.sh" demarrer
|
|
1201
1201
|
reparer_element "identifiants" bash "$ICI/password.sh" regenerer
|
|
1202
1202
|
return "$reparer_echec"
|
|
1203
1203
|
}
|
|
@@ -1352,7 +1352,7 @@ etat() {
|
|
|
1352
1352
|
elif [ "$(valeur "$m")" = on ] && [ "$m" = argocd ]; then
|
|
1353
1353
|
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/argocd/argocd.sh" status)"
|
|
1354
1354
|
elif [ "$(valeur "$m")" = on ] && [ "$m" = mysql ]; then
|
|
1355
|
-
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/
|
|
1355
|
+
printf ' ✔ module %-10s %s\n' "$m" "$(bash "$ICI/catalog/mysql/mysql.sh" status)"
|
|
1356
1356
|
elif [ "$(valeur "$m")" = on ]; then
|
|
1357
1357
|
printf ' ✔ module %-10s active: %s\n' "$m" "$(description "$m")"
|
|
1358
1358
|
else
|
|
@@ -1369,7 +1369,7 @@ etat() {
|
|
|
1369
1369
|
printf ' ○ argocd no GitOps repository: devzone argocd init\n'
|
|
1370
1370
|
fi
|
|
1371
1371
|
# Socket Docker de l'hôte (#432) : l'avertissement montre l'état réel,
|
|
1372
|
-
# le socket monté (même variable que docker-
|
|
1372
|
+
# le socket monté (même variable que docker-relay.sh), pas l'option :
|
|
1373
1373
|
# le montage ne change qu'au make rebuild (faux rassurant en attendant)
|
|
1374
1374
|
# In the Kubernetes workspace (DEVZONE_WORKSPACE=kubernetes), the pod has
|
|
1375
1375
|
# no Docker host socket: no alert, the service account is the cluster access
|
|
@@ -1386,8 +1386,8 @@ etat() {
|
|
|
1386
1386
|
fi
|
|
1387
1387
|
fi
|
|
1388
1388
|
# Applications du catalogue (#414)
|
|
1389
|
-
if [ -d "$ICI/
|
|
1390
|
-
bash "$ICI/
|
|
1389
|
+
if [ -d "$ICI/catalog" ]; then
|
|
1390
|
+
bash "$ICI/catalog.sh" resume
|
|
1391
1391
|
fi
|
|
1392
1392
|
# Secret Rails GitLab (#347) : avertissement si les secrets ont été perdus
|
|
1393
1393
|
if [ "$(valeur gitlab)" = on ] && [ ! -f "$RACINE/workspace/.gitlab/rails-secret.yaml" ]; then
|
|
@@ -1426,13 +1426,13 @@ etat() {
|
|
|
1426
1426
|
if [ -f "$RACINE/.password" ]; then
|
|
1427
1427
|
printf ' ○ credentials: %s\n' "$RACINE/.password"
|
|
1428
1428
|
fi
|
|
1429
|
-
# Marque posée par docker-
|
|
1429
|
+
# Marque posée par docker-relay.sh au démarrage (#293) : docker exec
|
|
1430
1430
|
# longs coupés, kind et modules en échec
|
|
1431
1431
|
relais_marque="${DEVZONE_RELAIS_MARQUE:-/tmp/devzone-relais-docker.echec}"
|
|
1432
1432
|
if [ -f "$relais_marque" ]; then
|
|
1433
1433
|
printf ' ⚠ Docker relay %s: devzone repair\n' "$(head -1 "$relais_marque")"
|
|
1434
1434
|
fi
|
|
1435
|
-
# Marque posee par
|
|
1435
|
+
# Marque posee par packages.sh a l echec de reapplication (351) : noms des paquets non installes
|
|
1436
1436
|
paquets_marque="${DEVZONE_PAQUETS_MARQUE:-/tmp/devzone-paquets.echec}"
|
|
1437
1437
|
if [ -f "$paquets_marque" ]; then
|
|
1438
1438
|
paquets_noms=""
|
|
@@ -1489,9 +1489,9 @@ changer() {
|
|
|
1489
1489
|
fi
|
|
1490
1490
|
if ! connu "$m"; then
|
|
1491
1491
|
# Une application du catalogue : on écrit la ligne, on applique
|
|
1492
|
-
if [ -f "$ICI/
|
|
1492
|
+
if [ -f "$ICI/catalog/$m/app.conf" ]; then
|
|
1493
1493
|
ecrire "$m" "$1"
|
|
1494
|
-
bash "$ICI/
|
|
1494
|
+
bash "$ICI/catalog.sh" apply
|
|
1495
1495
|
return
|
|
1496
1496
|
fi
|
|
1497
1497
|
echo "devzone : module inconnu : $m ; modules : ${MODULES[*]}" >&2
|
|
@@ -1517,10 +1517,10 @@ changer() {
|
|
|
1517
1517
|
"appliquer_$m" "$1" "${@:3}"
|
|
1518
1518
|
}
|
|
1519
1519
|
|
|
1520
|
-
# shellcheck source=
|
|
1520
|
+
# shellcheck source=state-json.sh
|
|
1521
1521
|
# shellcheck disable=SC1091
|
|
1522
|
-
if [ -f "$ICI/
|
|
1523
|
-
. "$ICI/
|
|
1522
|
+
if [ -f "$ICI/state-json.sh" ]; then
|
|
1523
|
+
. "$ICI/state-json.sh"
|
|
1524
1524
|
fi
|
|
1525
1525
|
|
|
1526
1526
|
# Renamed names (#695): an old French name is refused with its new name, before
|
|
@@ -1587,18 +1587,18 @@ case "${1:-}" in
|
|
|
1587
1587
|
bash "$ICI/workspace-build.sh" "${@:2}"
|
|
1588
1588
|
;;
|
|
1589
1589
|
repair) reparer ;;
|
|
1590
|
-
start) bash "$ICI/
|
|
1590
|
+
start) bash "$ICI/startup.sh" ;;
|
|
1591
1591
|
metrics) bash "$ICI/metrics-server.sh" "${@:2}" ;;
|
|
1592
1592
|
use) utiliser "${@:2}" ;;
|
|
1593
1593
|
clusters) DEVZONE_ETAT="$ETAT" bash "$ICI/clusters.sh" "${@:2}" ;;
|
|
1594
1594
|
cluster) changer_cluster "${@:2}" ;;
|
|
1595
1595
|
postgres) DEVZONE_ETAT="$ETAT" bash "$ICI/postgres/postgres.sh" "${@:2}" ;;
|
|
1596
|
-
mysql) DEVZONE_ETAT="$ETAT" bash "$ICI/
|
|
1596
|
+
mysql) DEVZONE_ETAT="$ETAT" bash "$ICI/catalog/mysql/mysql.sh" "${@:2}" ;;
|
|
1597
1597
|
gitlab) DEVZONE_ETAT="$ETAT" bash "$ICI/gitlab/gitlab.sh" "${@:2}" ;;
|
|
1598
|
-
catalog) DEVZONE_ETAT="$ETAT" bash "$ICI/
|
|
1598
|
+
catalog) DEVZONE_ETAT="$ETAT" bash "$ICI/catalog.sh" list ;;
|
|
1599
1599
|
argocd) DEVZONE_ETAT="$ETAT" bash "$ICI/argocd/argocd.sh" "${@:2}" ;;
|
|
1600
1600
|
port) DEVZONE_ETAT="$ETAT" bash "$ICI/ports.sh" "${@:2}" ;;
|
|
1601
|
-
packages) bash "$ICI/
|
|
1601
|
+
packages) bash "$ICI/packages.sh" "${@:2}" ;;
|
|
1602
1602
|
passwords)
|
|
1603
1603
|
bash "$ICI/password.sh" regenerer ||
|
|
1604
1604
|
echo "devzone : identifiants regroupés non mis à jour" >&2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Relais du socket Docker (#293), lancé en premier par
|
|
2
|
+
# Relais du socket Docker (#293), lancé en premier par startup.sh.
|
|
3
3
|
#
|
|
4
4
|
# Pourquoi : la feature docker-outside-of-docker relaie le socket de l'hôte
|
|
5
5
|
# par « socat UNIX-LISTEN:/var/run/docker.sock,… UNIX-CONNECT:… » sans
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
#
|
|
19
19
|
# Sûr par construction : chemins et commandes réglables (tests : tout sous un
|
|
20
20
|
# dossier temporaire), et refus de toucher au vrai socket sans
|
|
21
|
-
# DEVZONE_RELAIS_REEL=oui, que seuls
|
|
21
|
+
# DEVZONE_RELAIS_REEL=oui, que seuls startup.sh et devzone repair posent.
|
|
22
22
|
# Code : 0 contrôle réussi, 1 contrôle en échec (marque écrite pour le
|
|
23
23
|
# récapitulatif devzone), 2 refus de la garde. Compatible bash 3.2.
|
|
24
24
|
set -euo pipefail
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
# gitlab_application_retirer the Application removed (namespace kept)
|
|
14
14
|
|
|
15
15
|
# The catalogue side of Argo CD (module on, chart, revision, Application)
|
|
16
|
-
# shellcheck source=SCRIPTDIR/../argocd/
|
|
16
|
+
# shellcheck source=SCRIPTDIR/../argocd/catalog-argocd.sh
|
|
17
17
|
# shellcheck disable=SC1091
|
|
18
|
-
. "$ICI/../argocd/
|
|
18
|
+
. "$ICI/../argocd/catalog-argocd.sh"
|
|
19
19
|
|
|
20
20
|
# The module argocd is on, the namespace devzone-argocd is installed, the chart
|
|
21
21
|
# is in the repository and the revision is known: a development clone (version
|
|
@@ -14,9 +14,9 @@ RACINE="${DEVZONE_RACINE:-$(dirname "$(dirname "$ICI")")}"
|
|
|
14
14
|
# shellcheck disable=SC1091
|
|
15
15
|
. "$ICI/../password.sh"
|
|
16
16
|
# Isolation réseau : namespace_isoler, posée avec le namespace devzone-gitlab
|
|
17
|
-
# shellcheck source=SCRIPTDIR/../
|
|
17
|
+
# shellcheck source=SCRIPTDIR/../isolation.sh
|
|
18
18
|
# shellcheck disable=SC1091
|
|
19
|
-
. "$ICI/../
|
|
19
|
+
. "$ICI/../isolation.sh"
|
|
20
20
|
|
|
21
21
|
# ---- Variables de délai (secondes) ----
|
|
22
22
|
# GITLAB_ATTENTE : attente globale d'installation (défaut 1200)
|
|
@@ -67,7 +67,7 @@ GITLAB_HOTE_MARQUE="# devzone:gitlab"
|
|
|
67
67
|
# qui écoute sur 127.0.0.1. Le nom pointe donc vers 127.0.0.1 pour que ssh et
|
|
68
68
|
# glab empruntent le même chemin. /etc/hosts est un montage Docker que Docker
|
|
69
69
|
# régénère au démarrage du conteneur, d'où le re-pose à chaque démarrage
|
|
70
|
-
# (
|
|
70
|
+
# (startup.sh) et à chaque activation. Jamais de sed -i ni de mv : le
|
|
71
71
|
# montage ne peut pas être renommé (écriture en place seulement) ; directe si
|
|
72
72
|
# le fichier est inscriptible, sinon sudo -n. Un échec n'échoue jamais :
|
|
73
73
|
# avertissement sur stderr et code 0, pour ne pas faire échouer l'installation
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
# Shared memory check of the services cluster (#608): quantity_ki,
|
|
10
10
|
# memory_cluster_ki and check_module_memory.
|
|
11
|
-
# shellcheck source=SCRIPTDIR/../
|
|
11
|
+
# shellcheck source=SCRIPTDIR/../memory.sh
|
|
12
12
|
# shellcheck disable=SC1091
|
|
13
|
-
. "$ICI/../
|
|
13
|
+
. "$ICI/../memory.sh"
|
|
14
14
|
|
|
15
15
|
# Namespace isolé du module : un par instance, comme postgres
|
|
16
16
|
GITLAB_NS="devzone-gitlab${INSTANCE_SUFFIX}"
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
# binaire est kind-reel. Avec le Docker de l'hôte, un cluster créé par
|
|
4
4
|
# « kind create cluster » écrit server: https://127.0.0.1:<port> : injoignable
|
|
5
5
|
# depuis le conteneur. Après une création ou un export de kubeconfig réussis,
|
|
6
|
-
# l'adresse est rendue joignable (kube-
|
|
6
|
+
# l'adresse est rendue joignable (kube-reachable.sh). Tout le reste passe tel quel.
|
|
7
7
|
set -uo pipefail
|
|
8
8
|
|
|
9
9
|
KIND_REEL="${DEVZONE_KIND_REEL:-/usr/local/bin/kind-reel}"
|
|
10
10
|
ICI="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
|
-
if [ -f "$ICI/kube-
|
|
12
|
-
# shellcheck source=SCRIPTDIR/kube-
|
|
13
|
-
. "$ICI/kube-
|
|
11
|
+
if [ -f "$ICI/kube-reachable.sh" ]; then
|
|
12
|
+
# shellcheck source=SCRIPTDIR/kube-reachable.sh
|
|
13
|
+
. "$ICI/kube-reachable.sh"
|
|
14
14
|
else
|
|
15
15
|
# shellcheck source=/dev/null
|
|
16
|
-
. /usr/local/lib/devzone/kube-
|
|
16
|
+
. /usr/local/lib/devzone/kube-reachable.sh
|
|
17
17
|
fi
|
|
18
18
|
|
|
19
19
|
"$KIND_REEL" "$@"
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
# agents) ne peut agir que dans les namespaces devzone-*. Le compte est le
|
|
4
4
|
# ServiceAccount devzone-agent du namespace devzone-system, lié au ClusterRole
|
|
5
5
|
# edit (ni RBAC ni quotas) dans chaque namespace de devzone par un RoleBinding,
|
|
6
|
-
# avec un jeton TokenRequest de 24 h renouvelé au démarrage (
|
|
6
|
+
# avec un jeton TokenRequest de 24 h renouvelé au démarrage (startup.sh) et
|
|
7
7
|
# par « devzone repair ». Les installeurs utilisent seuls le contexte
|
|
8
8
|
# administrateur (contexte de l hôte dans ~/.kube/hote.config, cluster kind
|
|
9
9
|
# dans ~/.kube/config) ; les shells et les agents n'ont que ~/.kube/config.
|
|
10
10
|
# Bibliothèque sourcée par cluster.sh ; exécutable pour le jeton :
|
|
11
|
-
# kube-
|
|
11
|
+
# kube-account.sh jeton
|
|
12
12
|
|
|
13
13
|
COMPTES_NS=devzone-system
|
|
14
14
|
COMPTES_SA=devzone-agent
|
|
@@ -179,7 +179,7 @@ compte_jeton() {
|
|
|
179
179
|
--cluster="$cluster" --user="$COMPTES_SA" >/dev/null
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
# Exécution directe : jeton du compte renouvelé au démarrage (
|
|
182
|
+
# Exécution directe : jeton du compte renouvelé au démarrage (startup.sh) et
|
|
183
183
|
# par « devzone repair ». Sans cluster des services choisi : rien à faire.
|
|
184
184
|
# Quand le fichier est sourcé, $0 diffère de BASH_SOURCE : rien ne s'exécute.
|
|
185
185
|
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# la vérification TLS (--tls-server-name) ; suffit avec Docker Desktop, où
|
|
12
12
|
# host.docker.internal mène au 127.0.0.1 du poste.
|
|
13
13
|
# Bibliothèque sourcée (cluster.sh, enveloppe kind) ; exécutée directement :
|
|
14
|
-
# kube-
|
|
14
|
+
# kube-reachable.sh FICHIER
|
|
15
15
|
# kube_joignable_depuis_conteneur FICHIER réécrit 127.0.0.1/localhost, idempotent
|
|
16
16
|
|
|
17
17
|
# Nœud kind de plan de contrôle qui publie ce port sur le poste (vide sinon)
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
# par ligne, triés, sans doublon), réinstallée à chaque création du conteneur
|
|
5
5
|
# (post-create.sh). Un paquet installé à la main est perdu par un rebuild, sauf
|
|
6
6
|
# s'il est dans cette liste.
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
7
|
+
# packages.sh ou packages.sh list liste avec l'état de chaque paquet
|
|
8
|
+
# packages.sh add <nom>… valide, installe, ajoute à la liste
|
|
9
|
+
# packages.sh remove <nom>… retire de la liste et désinstalle (sauf paquet de l'image)
|
|
10
|
+
# packages.sh apply installe tout ce qui manque (post-create.sh)
|
|
11
11
|
# L'état d'un paquet vient de dpkg-query -W -f='${Status}' ; les commandes
|
|
12
12
|
# système passent par des variables surchargeables pour les tests (sudo, apt-get,
|
|
13
13
|
# apt-cache, dpkg-query, marque, horodatage). Compatible bash 3.2 (macOS).
|
|
@@ -28,7 +28,7 @@ relais_auto_actif() { local nom; nom="$(nom_relais_auto "$1")"; command -v docke
|
|
|
28
28
|
# Délai après disparition d'un port avant de retirer le pont et le relais.
|
|
29
29
|
delai_disparition() { local v; for v in DEVZONE_PORTS_AUTO_DELAI_DISPARITION DEVZONE_PORTS_AUTO_DELAI DEVZONE_PORTS_AUTO_RETARD PORTS_AUTO_DELAI PORTS_AUTO_RETARD; do [ -n "${!v:-}" ] && { echo "${!v}"; return 0; }; done; echo 10; }
|
|
30
30
|
|
|
31
|
-
# Garde-fou (règle docker-
|
|
31
|
+
# Garde-fou (règle docker-relay.sh #293) : la boucle et demarrer ne tournent
|
|
32
32
|
# jamais sous bats, et hors du conteneur que si le contexte réel est posé.
|
|
33
33
|
garde_veilleur() {
|
|
34
34
|
if [ -n "${BATS_TEST_TMPDIR:-}" ]; then
|
package/.devcontainer/ports.sh
CHANGED
|
@@ -18,9 +18,9 @@ ETAT="${DEVZONE_ETAT:-$RACINE/.devzone.modules}"
|
|
|
18
18
|
INSTANCE="${DEVZONE_INSTANCE:-devzone}"
|
|
19
19
|
|
|
20
20
|
# Écriture sûre de l'état (#417) : verrou, temporaire dans l'état, .prec
|
|
21
|
-
# shellcheck source=SCRIPTDIR/
|
|
21
|
+
# shellcheck source=SCRIPTDIR/state.sh
|
|
22
22
|
# shellcheck disable=SC1091
|
|
23
|
-
. "$ICI/
|
|
23
|
+
. "$ICI/state.sh"
|
|
24
24
|
|
|
25
25
|
refuse() { echo "devzone : port : $*" >&2; exit 1; }
|
|
26
26
|
|
|
@@ -41,7 +41,7 @@ trier_ports() {
|
|
|
41
41
|
printf '%s\n' "${1:-}" | tr ',' '\n' | awk 'NF && $0 ~ /^[0-9]+$/ { print }' | sort -n -u | paste -sd, -
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
# Écrit la ligne ports= de l'état (#417 : jamais de mv hors de
|
|
44
|
+
# Écrit la ligne ports= de l'état (#417 : jamais de mv hors de state.sh)
|
|
45
45
|
ecrire_ports() {
|
|
46
46
|
state_write ports "${1:-}" || { echo "devzone : port : état non enregistré : $ETAT" >&2; exit 1; }
|
|
47
47
|
}
|
|
@@ -63,7 +63,7 @@ bash /workspaces/devzone/.devcontainer/kube-config.sh || echo "devzone : configu
|
|
|
63
63
|
# Sans la feature docker-outside-of-docker (option docker-hote=off, #432),
|
|
64
64
|
# docker n'est pas installé : un message clair renvoie au workspace Kubernetes
|
|
65
65
|
if ! command -v docker >/dev/null 2>&1; then
|
|
66
|
-
sudo install -m 0755 /workspaces/devzone/.devcontainer/docker-
|
|
66
|
+
sudo install -m 0755 /workspaces/devzone/.devcontainer/docker-without-host.sh /usr/local/bin/docker
|
|
67
67
|
fi
|
|
68
68
|
devzone apply || echo "devzone : modules incomplets (détail ci-dessus), réessayer : devzone apply" >&2
|
|
69
69
|
# Paquets systeme gardes (#351) : reinstallees a chaque creation ; un echec n arrete pas la creation
|
|
@@ -81,7 +81,7 @@ INVITE
|
|
|
81
81
|
fi
|
|
82
82
|
|
|
83
83
|
# Ce qui reste à faire (identité git, GitHub, modules) : récapitulatif de
|
|
84
|
-
# devzone, affiché à chaque démarrage (
|
|
84
|
+
# devzone, affiché à chaque démarrage (startup.sh)
|
|
85
85
|
|
|
86
86
|
recap="java $(java -version 2>&1 | head -1 | cut -d'"' -f2), node $(node -v), python $(python3 --version | cut -d' ' -f2), repowarden $(repowarden --version)"
|
|
87
87
|
! command -v claude >/dev/null || recap+=", claude $(claude --version | cut -d' ' -f1)"
|
|
@@ -22,9 +22,9 @@ ETAT="${DEVZONE_ETAT:-$RACINE/.devzone.modules}"
|
|
|
22
22
|
# shellcheck disable=SC1091
|
|
23
23
|
. "$ICI/../chart-direct.sh"
|
|
24
24
|
# Isolation réseau : namespace_isoler, d'où viennent les NetworkPolicies
|
|
25
|
-
# shellcheck source=SCRIPTDIR/../
|
|
25
|
+
# shellcheck source=SCRIPTDIR/../isolation.sh
|
|
26
26
|
# shellcheck disable=SC1091
|
|
27
|
-
. "$ICI/../
|
|
27
|
+
. "$ICI/../isolation.sh"
|
|
28
28
|
|
|
29
29
|
NS=devzone-postgres
|
|
30
30
|
SECRETS="$RACINE/workspace/.postgres"
|
|
@@ -52,7 +52,7 @@ Le journal est `workspace/.agents/<dossier>.log`. `--auto` évite l'attente d'un
|
|
|
52
52
|
|
|
53
53
|
Avec `ia` actif, le garde-fou repowarden est branché pour Claude Code et opencode : l'agent est arrêté avant de modifier `main`/`develop`, de commiter sans `repowarden cc` ou de contourner les hooks. `repowarden cc -m "…"` pour commiter.
|
|
54
54
|
|
|
55
|
-
Fichiers de droits protégés (jamais écrits par un agent, listés fixes, qu'aucune variable ne change) : `.devcontainer/opencode/agent.json`, `.devcontainer/opencode.jsonc`, `.repowarden.conf`, `.devcontainer/agent-
|
|
55
|
+
Fichiers de droits protégés (jamais écrits par un agent, listés fixes, qu'aucune variable ne change) : `.devcontainer/opencode/agent.json`, `.devcontainer/opencode.jsonc`, `.repowarden.conf`, `.devcontainer/agent-rights.sh`. Un agent qui les touche est refusé et le changement est annulé dans l'arbre.
|
|
56
56
|
|
|
57
57
|
## Kubernetes seulement
|
|
58
58
|
|
|
@@ -13,13 +13,13 @@ exec </dev/null
|
|
|
13
13
|
ICI="$(dirname "$0")"
|
|
14
14
|
# Relais du socket Docker d'abord (#293) : sans lui, les docker exec longs
|
|
15
15
|
# (kind, modules) sont coupés au bout de 0,5 s sous Docker Desktop
|
|
16
|
-
DEVZONE_RELAIS_REEL=oui bash "$ICI/docker-
|
|
16
|
+
DEVZONE_RELAIS_REEL=oui bash "$ICI/docker-relay.sh" || echo "démarrage : relais Docker non corrigé (devzone repair)"
|
|
17
17
|
bash "$ICI/git-identite.sh" || echo "démarrage : identité git non traitée (devzone start)"
|
|
18
18
|
bash "$ICI/kube-config.sh" || echo "démarrage : clusters non traités (devzone start)"
|
|
19
19
|
# Jeton du compte Kubernetes limité (#430) : 24 h, renouvelé à chaque
|
|
20
20
|
# démarrage ; compte posé au passage s'il manque. Sans cluster des services
|
|
21
21
|
# choisi, rien à faire
|
|
22
|
-
bash "$ICI/kube-
|
|
22
|
+
bash "$ICI/kube-account.sh" jeton || echo "démarrage : jeton du compte kubernetes non renouvelé (devzone repair)"
|
|
23
23
|
# Module gitlab actif : /etc/hosts est un montage Docker régénéré à chaque
|
|
24
24
|
# démarrage, gitlab.localhost doit être re-pose (ssh, glab et getent passent
|
|
25
25
|
# par le résolveur système) ; hote-poser n'échoue jamais (avertissement seul)
|
|
@@ -42,7 +42,7 @@ fi
|
|
|
42
42
|
# Module mysql actif : le relais 127.0.0.1:3306, relancé comme celui de
|
|
43
43
|
# postgres après chaque démarrage
|
|
44
44
|
if bash "$ICI/devzone" is-enabled mysql; then
|
|
45
|
-
bash "$ICI/
|
|
45
|
+
bash "$ICI/catalog/mysql/mysql.sh" relay-start || echo "démarrage : relais mysql non lancé (devzone repair)"
|
|
46
46
|
fi
|
|
47
47
|
# Relais de ports vers le poste (#290) : l'IP du conteneur change à chaque
|
|
48
48
|
# démarrage, chaque relais de l'état est recréé ; un échec n'empêche rien
|
|
@@ -55,9 +55,9 @@ if [ "${DEVZONE_WORKSPACE:-}" != kubernetes ]; then
|
|
|
55
55
|
fi
|
|
56
56
|
# Catalogue d'applications : une ligne <app>=off par application absente,
|
|
57
57
|
# écrite une fois, jamais une ligne existante modifiée (#414)
|
|
58
|
-
bash "$ICI/
|
|
58
|
+
bash "$ICI/catalog.sh" sync || echo "démarrage : catalogue non synchronisé (devzone repair)"
|
|
59
59
|
# Veilleur du catalogue : réapplique à chaud dès que .devzone.modules change
|
|
60
|
-
DEVZONE_CATALOGUE_REEL=oui bash "$ICI/
|
|
60
|
+
DEVZONE_CATALOGUE_REEL=oui bash "$ICI/catalog/catalog-watcher.sh" demarrer >/dev/null 2>&1 || echo "démarrage : veilleur catalogue non lancé (devzone repair)"
|
|
61
61
|
|
|
62
62
|
# Vue regroupée des identifiants (#332), regénérée à chaque démarrage ; un
|
|
63
63
|
# échec n'empêche rien et le contenu n'est jamais affiché
|
|
@@ -147,7 +147,7 @@ state_json() {
|
|
|
147
147
|
add_error modules "argocd.sh status unavailable"
|
|
148
148
|
fi
|
|
149
149
|
elif [ "$m" = mysql ]; then
|
|
150
|
-
if out="$(bash "$ICI/
|
|
150
|
+
if out="$(bash "$ICI/catalog/mysql/mysql.sh" status 2>/dev/null)"; then
|
|
151
151
|
state_value="$out"
|
|
152
152
|
else
|
|
153
153
|
state_value=""
|
|
@@ -172,7 +172,7 @@ state_json() {
|
|
|
172
172
|
done
|
|
173
173
|
|
|
174
174
|
# docker-hote option (#432): absent = on; socket really mounted (same
|
|
175
|
-
# source as docker-
|
|
175
|
+
# source as docker-relay.sh), may differ until make rebuild
|
|
176
176
|
# In the Kubernetes workspace (DEVZONE_WORKSPACE=kubernetes), the pod has
|
|
177
177
|
# no Docker host socket: the socket is absent (#515)
|
|
178
178
|
if [ "${DEVZONE_WORKSPACE:-}" = kubernetes ]; then
|
|
@@ -219,10 +219,10 @@ state_json() {
|
|
|
219
219
|
add_error ports "ports.sh unavailable"
|
|
220
220
|
fi
|
|
221
221
|
|
|
222
|
-
applications_json="$(bash "$ICI/
|
|
222
|
+
applications_json="$(bash "$ICI/catalog.sh" json 2>/dev/null || echo '[]')"
|
|
223
223
|
if ! printf '%s' "$applications_json" | jq -e . >/dev/null 2>&1; then
|
|
224
224
|
applications_json='[]'
|
|
225
|
-
add_error modules "
|
|
225
|
+
add_error modules "catalog.sh json unavailable"
|
|
226
226
|
fi
|
|
227
227
|
|
|
228
228
|
if [ -f "$RACINE/.password" ]; then
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Write lock of the module state, sourced by
|
|
2
|
+
# Write lock of the module state, sourced by state.sh (#417 and #476)
|
|
3
3
|
# state_lock_take / state_lock_release write lock
|
|
4
4
|
|
|
5
5
|
# Exclusive lock (mkdir): one write at a time. A vanished holder is guessed
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# state_init [modules…] creates the state if it is missing
|
|
16
16
|
|
|
17
17
|
# Write lock (#476): state_lock_take, state_lock_release
|
|
18
|
-
# shellcheck source=SCRIPTDIR/
|
|
18
|
+
# shellcheck source=SCRIPTDIR/state-lock.sh
|
|
19
19
|
# shellcheck disable=SC1091
|
|
20
|
-
. "$(dirname "${BASH_SOURCE[0]}")/
|
|
20
|
+
. "$(dirname "${BASH_SOURCE[0]}")/state-lock.sh"
|
|
21
21
|
|
|
22
22
|
# Abort under lock: the temporary file goes, the lock is released
|
|
23
23
|
state_abort() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Why: post-create.sh and
|
|
2
|
+
# Why: post-create.sh and startup.sh never run in the Kubernetes workspace
|
|
3
3
|
# pod (#503). This script installs the devzone tools when the container starts.
|
|
4
4
|
# Each step logs one "devzone init:" line, and a failure never stops the next
|
|
5
5
|
# step. No Docker socket is used and no kubeconfig is fabricated.
|
package/Makefile
CHANGED
|
@@ -19,13 +19,13 @@ help: ## Liste les commandes
|
|
|
19
19
|
@grep -E '^[a-z-]+:.*## ' $(MAKEFILE_LIST) | awk -F':.*## ' '{printf " make %-16s %s\n", $$1, $$2}'
|
|
20
20
|
|
|
21
21
|
# up et rebuild : étapes affichées, journal complet dans .devzone.log, question
|
|
22
|
-
# posée dans le conteneur signalée au lieu d'attendre (manage/scripts/
|
|
22
|
+
# posée dans le conteneur signalée au lieu d'attendre (manage/scripts/launch.sh)
|
|
23
23
|
# En workspace Kubernetes, up/shell/stop pilotent le pod (#472).
|
|
24
24
|
up: hors-conteneur ## Lance le conteneur (le crée si absent)
|
|
25
|
-
@bash manage/scripts/poste.sh up "$(CURDIR)"; c=$$?; [ $$c = 3 ] || exit $$c; bash manage/scripts/
|
|
25
|
+
@bash manage/scripts/poste.sh up "$(CURDIR)"; c=$$?; [ $$c = 3 ] || exit $$c; bash manage/scripts/launch.sh up "$(CURDIR)"
|
|
26
26
|
|
|
27
27
|
shell: hors-conteneur ## Ouvre un shell dans le conteneur
|
|
28
|
-
@bash manage/scripts/poste.sh shell "$(CURDIR)"; c=$$?; [ $$c = 3 ] || exit $$c; bash manage/scripts/
|
|
28
|
+
@bash manage/scripts/poste.sh shell "$(CURDIR)"; c=$$?; [ $$c = 3 ] || exit $$c; bash manage/scripts/launch.sh up "$(CURDIR)" && $(DC) exec $(WS) bash
|
|
29
29
|
|
|
30
30
|
stop: hors-conteneur ## Arrête le conteneur (état conservé)
|
|
31
31
|
@bash manage/scripts/poste.sh stop "$(CURDIR)"; c=$$?; [ $$c = 3 ] || exit $$c; ids=$$(docker ps -q $(FILTRE)); if [ -z "$$ids" ]; then echo "déjà arrêté"; else docker stop $$ids >/dev/null && echo "devzone arrêté"; fi
|
|
@@ -36,19 +36,19 @@ down: hors-conteneur ## Supprime le conteneur (volumes et image conservés)
|
|
|
36
36
|
docker rm -f $$ids >/dev/null && echo "devzone supprimé (désinstallation complète : make desinstaller)"; fi
|
|
37
37
|
|
|
38
38
|
rebuild: hors-conteneur ## Reconstruit de zéro (après modif de .devcontainer/)
|
|
39
|
-
@bash manage/scripts/poste.sh rebuild "$(CURDIR)"; c=$$?; [ $$c = 3 ] || exit $$c; bash manage/scripts/
|
|
39
|
+
@bash manage/scripts/poste.sh rebuild "$(CURDIR)"; c=$$?; [ $$c = 3 ] || exit $$c; bash manage/scripts/launch.sh rebuild "$(CURDIR)"
|
|
40
40
|
|
|
41
41
|
status: hors-conteneur ## État du conteneur
|
|
42
42
|
@docker ps -a $(FILTRE) --format '{{.Status}}' | grep . || echo "aucun conteneur"
|
|
43
43
|
|
|
44
44
|
test-fonctionnel: hors-conteneur ## Tests fonctionnels : devzone isolé, construit puis supprimé (5 à 10 min)
|
|
45
|
-
@bash manage/test/
|
|
45
|
+
@bash manage/test/functional.sh
|
|
46
46
|
|
|
47
47
|
test-cli: hors-conteneur ## Tests de la CLI dans un vrai terminal : devzone isolé, puis supprimé (10 à 15 min)
|
|
48
48
|
@bash manage/test/cli-terminal.sh
|
|
49
49
|
|
|
50
50
|
desinstaller: hors-conteneur ## Supprime tout ce que devzone a créé, après confirmation (GARDER=connexions : garde les connexions)
|
|
51
|
-
@GARDER="$(GARDER)" bash manage/scripts/
|
|
51
|
+
@GARDER="$(GARDER)" bash manage/scripts/uninstall.sh
|
|
52
52
|
|
|
53
53
|
uninstall: hors-conteneur ## Supprime tout ce que devzone a créé, après confirmation (alias de desinstaller)
|
|
54
|
-
@GARDER="$(GARDER)" bash manage/scripts/
|
|
54
|
+
@GARDER="$(GARDER)" bash manage/scripts/uninstall.sh
|