Skip to content

Sprint Plan - Pre-Cluster Work

Sprint Start: 2025-11-04 Duration: 1 week sprint (per clarification) Total Effort: 4-6 hours with AI assistance Goal: Complete all non-cluster work before provisioning


Sprint Stories

Story 2.4: Promotion PR Automation ⭐ PRIORITY 1

Effort: 2-3 hours with AI assistance Assignee: Chris (recommended)

Tasks

  1. Create GitHub PAT (15 min)
  2. Go to GitHub → Settings → Developer settings → Personal access tokens
  3. Generate new token (classic) with repo scope
  4. Name: GITOPS_PAT_SYRF

  5. Add Secret to Repository (5 min)

  6. Go to syrf repo → Settings → Secrets → Actions
  7. Add new repository secret: GITOPS_PAT
  8. Paste the PAT value

  9. Add Promotion Job to Workflow (2 hrs with AI)

  10. Edit .github/workflows/auto-version.yml
  11. Add new job after build-and-push-images
  12. AI Prompt: "Create a GitHub Actions job that creates a PR to cluster-gitops updating the image tags in environment values files"

Key requirements: - Checkout cluster-gitops using PAT - Install yq for YAML manipulation - Update environments/staging/{service}.values.yaml - Create branch with timestamp - Create PR with service versions

  1. Test with Real Push (30 min)
  2. Make a small change to trigger workflow
  3. Verify Docker push to GHCR works
  4. Verify promotion PR created in cluster-gitops
  5. This also tests GHCR access

Success Criteria

  • PAT created and stored as secret
  • Promotion job added to workflow
  • Test PR successfully created
  • GHCR push verified working

Story 3.4: ApplicationSet for PR Previews ⭐ PRIORITY 2

Effort: 2-3 hours with AI assistance Assignee: Nuri (learning opportunity) or Chris

Tasks

  1. Create ApplicationSet YAML (2 hrs with AI)
  2. Create /home/chris/workspace/cluster-gitops/applicationsets/pr-previews.yaml
  3. AI Prompt: "Create an ArgoCD ApplicationSet for PR preview environments using GitHub Pull Request generator"

Requirements: - Pull Request Generator watching syrf repo - Ephemeral namespace: syrf-pr-{{number}} - Auto-cleanup when PR closed - Image tag pattern: pr-{{number}}-{{head_sha}}

  1. Configure Preview Pattern (30 min)
  2. Document URL pattern: {{service}}-pr-{{number}}.preview.syrf.org.uk
  3. Add to cluster-gitops documentation
  4. Note: Actual DNS will be configured when cluster exists

  5. Review and Validate (30 min)

  6. Validate YAML syntax
  7. Check against ArgoCD ApplicationSet documentation
  8. Commit to cluster-gitops

Success Criteria

  • ApplicationSet YAML created
  • PR generator configured
  • Namespace pattern defined
  • Documentation updated

Optional: Story 3.5 - Infrastructure Dependencies

Effort: 1-2 hours (skip if time constrained) Note: May not be needed given existing documentation

If time permits:

  • Review Jenkins X cluster components
  • Document installation order
  • Define smoke tests

Timeline

Day 1 (Monday)

  • Morning: Story 2.4 - Create PAT, add to secrets
  • Afternoon: Story 2.4 - Implement promotion job with AI

Day 2 (Tuesday)

  • Morning: Story 2.4 - Test and debug
  • Afternoon: Story 3.4 - Create ApplicationSet with AI

Day 3 (Wednesday)

  • Morning: Story 3.4 - Complete and document
  • Afternoon: Final testing and verification

Day 4-5 (Thursday-Friday)

  • Buffer for issues
  • Signal Chris when ready for cluster provisioning

AI Assistance Tips

For Story 2.4 (Promotion PRs)

Ask AI to generate the complete job including:

  • Conditional execution based on which services changed
  • yq commands for updating YAML
  • Git commands for branch/commit/push
  • GitHub CLI commands for PR creation

For Story 3.4 (ApplicationSet)

Ask AI to generate ApplicationSet with:

  • Pull Request generator configuration
  • Template for preview Applications
  • Sync policy for auto-cleanup
  • Resource limits for preview environments

Example AI Prompts

Story 2.4:

Create a GitHub Actions job that:
1. Runs after Docker images are pushed
2. Checks out cluster-gitops repo
3. Updates image.tag in environments/staging/*.values.yaml files
4. Creates a PR with the changes
Use yq for YAML updates and GitHub CLI for PR creation.

Story 3.4:

Create an ArgoCD ApplicationSet YAML that:
1. Uses Pull Request generator for GitHub
2. Creates preview environments in namespace syrf-pr-{{number}}
3. Auto-deletes when PR is closed
4. Uses multi-source pattern with charts from syrf repo
Include resource limits and RBAC restrictions.

Definition of Done

Sprint Complete When

  • Story 2.4 tested and working
  • Story 3.4 committed to cluster-gitops
  • Documentation updated
  • Chris notified for cluster provisioning

Cluster Provisioning Signal

When both stories complete, Chris will:

  1. Review the implementation
  2. Provision GKE cluster (specs documented)
  3. Begin Phase 1 infrastructure setup

Notes

  • Test Repository: Working in test repo at /home/chris/workspace/syrf/
  • Docker/containerization: Nuri's interest area (but very junior)
  • AI Usage: Approved for all tasks to accelerate delivery
  • Cost Consideration: Complete quickly to minimize dual-cluster period
  • Target Dual-Run: 3-5 days after cluster provision

Risk Mitigation

Risk Mitigation
PAT permissions issue Test with minimal repo first
GHCR access fails Check GitHub Actions permissions
yq syntax errors Test locally first
ApplicationSet complexity Start with minimal config

Communication

  • Daily standup: Update on progress
  • Blockers: Escalate immediately to Chris
  • Completion: Signal when ready for cluster

Sprint Manager: Gill Technical Lead: Chris Developer: Nuri (with AI assistance)