create tasks from 5

This commit is contained in:
EgorAnti
2026-11-03 20:49:07 +03:00
parent 6a4cd9534f
commit d235571a52
18 changed files with 1071 additions and 97 deletions
+19
View File
@@ -0,0 +1,19 @@
$ErrorActionPreference = 'Continue'
if (Test-Path variable:PSNativeCommandUseErrorActionPreference) {
$PSNativeCommandUseErrorActionPreference = $false
}
$nodes = @('hla-swarm-manager', 'hla-swarm-worker1', 'hla-swarm-worker2', 'hla-swarm-registry')
foreach ($node in $nodes) {
$existing = (& docker ps --all --filter "name=^/${node}$" --format '{{.Names}}')
if ($existing -eq $node) {
docker rm --force $node | Out-Null
if ($LASTEXITCODE -ne 0) { throw "Cannot remove $node" }
}
}
$existingNetwork = (& docker network ls --filter 'name=^hla-swarm-underlay$' --format '{{.Name}}')
if ($existingNetwork -eq 'hla-swarm-underlay') {
docker network rm hla-swarm-underlay | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Cannot remove hla-swarm-underlay' }
}
Write-Output 'Removed the disposable three-node Swarm lab and its nested volumes.'