Four folded skills carried operator identity tokens that the sanitization gate (verify-sanitized.sh) forbids in the public framework package: - kickstart: template path pointed at a private brain checkout; now uses the framework-shipped $MOSAIC_HOME/templates/docs/TASKS.md.template - mosaic-deploy: dropped one estate-specific stack-name row from the example table - mosaic-portainer, mosaic-woodpecker: credentials now name the framework credentials store (load_credentials <service>) instead of a private checkout path Estate-specific values can live in a skills-local override, which the linker applies with precedence over canonical skills.
2.0 KiB
2.0 KiB
name, description
| name | description |
|---|---|
| mosaic-portainer | Manage Portainer stacks on the Mosaic infrastructure. Use when asked to list, start, stop, redeploy, or check logs of Docker Swarm stacks via Portainer. Wraps scripts in ~/.config/mosaic/tools/portainer/. Requires load_credentials portainer first. |
mosaic-portainer
Manage Portainer stacks via pre-built Mosaic scripts.
Setup
Always load credentials before running scripts:
source ~/.config/mosaic/tools/_lib/credentials.sh
load_credentials portainer
# Exports: PORTAINER_URL, PORTAINER_API_KEY
Scripts
All scripts live in ~/.config/mosaic/tools/portainer/.
| Script | Purpose | Key flags |
|---|---|---|
stack-list.sh |
List all stacks | — |
stack-status.sh |
Status of a stack | -n <name> |
stack-redeploy.sh |
Redeploy (file or git-based) | -n <name> [-p] (pull images) |
stack-start.sh |
Start a stopped stack | -n <name> |
stack-stop.sh |
Stop a running stack | -n <name> |
stack-logs.sh |
Tail stack logs | -n <name> [-l lines] |
endpoint-list.sh |
List Portainer endpoints | — |
Common Workflows
Redeploy a stack with fresh images:
source ~/.config/mosaic/tools/_lib/credentials.sh && load_credentials portainer
~/.config/mosaic/tools/portainer/stack-redeploy.sh -n mosaic-stack -p
Check all stack statuses:
source ~/.config/mosaic/tools/_lib/credentials.sh && load_credentials portainer
~/.config/mosaic/tools/portainer/stack-list.sh
Tail logs for a service:
source ~/.config/mosaic/tools/_lib/credentials.sh && load_credentials portainer
~/.config/mosaic/tools/portainer/stack-logs.sh -n mosaic-stack -l 100
Notes
- Portainer URL:
https://10.1.1.43:9443 - Primary Docker host:
w-docker0(10.1.1.45) managed via Portainer agent - Docker Swarm image updates:
stack-redeploy.sh -pdoes NOT guarantee new image pull if digest is pinned; SSH to node anddocker pullfirst if needed - Credentials:
load_credentials portainer(framework credentials store)