mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 10:51:13 +00:00
1f634c2604
ci/woodpecker/push/02-build-push Pipeline failed
- Modified the autodev state to reflect the current testing phase and details of the new `jetson-e2e` tests. - Enhanced the "How to Test" documentation to provide clearer instructions on the demo replay validation process, including video and tlog alignment steps. - Updated architectural documentation to include the new demo replay operator flow and its dependencies. - Documented the removal of deprecated auto-sync features and clarified the operator-facing UI for replay validation. - Added new entries in the dependencies table for upcoming tasks related to the demo replay flow. These changes improve clarity and usability for operators and developers working with the demo replay system.
2.6 KiB
2.6 KiB
Step 7: Deployment Scripts
Role: DevOps / Platform engineer Goal: Create executable deployment scripts for pulling Docker images and running services on the remote target machine. Constraints: Produce real, executable shell scripts. This is the ONLY step that creates implementation artifacts.
Steps
- Read
containerization.mdanddeployment_procedures.mdfrom previous steps - Read
.env.examplefor required variables - Create the following scripts in
SCRIPTS_DIR/:
deploy.sh — Main deployment orchestrator
- Validates that required environment variables are set (sources
.envif present) - Calls
pull-images.sh, thenstop-services.sh, thenstart-services.sh, thenhealth-check.sh - Exits with non-zero code on any failure
- Supports
--rollbackflag to redeploy previous image tags
pull-images.sh — Pull Docker images to target machine
- Reads image list and tags from environment or config
- Authenticates with container registry
- Pulls all required images
- Verifies image integrity (digest check)
start-services.sh — Start services on target machine
- Runs
docker compose up -dor individualdocker runcommands - Applies environment variables from
.env - Configures networks and volumes
- Waits for containers to reach healthy state
stop-services.sh — Graceful shutdown
- Stops services with graceful shutdown period
- Saves current image tags for rollback reference
- Cleans up orphaned containers/networks
health-check.sh — Verify deployment health
- Checks all health endpoints
- Reports status per service
- Returns non-zero if any service is unhealthy
-
All scripts must:
- Be POSIX-compatible (
#!/bin/bashwithset -euo pipefail) - Source
.envfrom project root or accept env vars from the environment - Include usage/help output (
--helpflag) - Be idempotent where possible
- Handle SSH connection to remote target (configurable via
DEPLOY_HOSTenv var)
- Be POSIX-compatible (
-
Document all scripts in
deploy_scripts.md
Self-verification
- All five scripts created and executable
- Scripts source environment variables correctly
deploy.shorchestrates the full flowpull-images.shhandles registry auth and image pullstart-services.shstarts containers with correct configstop-services.shhandles graceful shutdownhealth-check.shvalidates all endpoints- Rollback supported via
deploy.sh --rollback - Scripts work for remote deployment via SSH (
DEPLOY_HOST) deploy_scripts.mddocuments all scripts
Save action
Write scripts to SCRIPTS_DIR/. Write deploy_scripts.md using templates/deploy_scripts.md.