Skip to content

Restructure scripts/ folder (create gcp/, aws/, common/ subdirs) #23

@UJ2202

Description

@UJ2202

User Story

As a DevOps engineer, I want the scripts folder to be organized by cloud provider so that I can easily manage and maintain deployment scripts for different cloud platforms.

Description

Reorganize the current scripts/ directory to separate cloud-specific scripts from common utilities, creating a clear structure that supports multi-cloud deployments while maintaining existing functionality.

Current Scripts Analysis

Based on the existing scripts/ directory:

  • setup-cluster.sh - GCP-specific cluster setup
  • deploy.sh - GCP-focused deployment
  • build-images.sh - Container image building (cloud-agnostic)
  • cleanup.sh - Environment cleanup
  • local-dev.sh - Local development setup
  • Additional utility scripts for security, validation, etc.

Proposed Directory Structure

scripts/
├── common/                    # Cloud-agnostic scripts
│   ├── build-images.sh       # Container building
│   ├── local-dev.sh          # Local development
│   ├── validate-security.sh  # Security validation
│   └── generate-encryption-key.sh
├── gcp/                      # Google Cloud Platform scripts
│   ├── setup-cluster.sh     # GKE cluster setup
│   ├── deploy.sh            # GCP deployment
│   └── cleanup.sh           # GCP resource cleanup
├── aws/                     # Amazon Web Services scripts
│   ├── setup-cluster.sh    # EKS cluster setup (future)
│   ├── deploy.sh           # AWS deployment (future)
│   └── cleanup.sh          # AWS resource cleanup (future)
└── README.md               # Usage documentation

Migration Strategy

  1. Analysis: Review each script to determine cloud dependency
  2. Categorization: Classify scripts as GCP-specific, AWS-specific, or common
  3. Restructuring: Move scripts to appropriate subdirectories
  4. Path Updates: Update any internal script references
  5. Documentation: Update README and deployment guides
  6. Testing: Verify all scripts work from new locations

Acceptance Criteria

  • Cloud-specific scripts are moved to provider subdirectories
  • Common scripts remain accessible and functional
  • All internal script references are updated
  • Documentation reflects new directory structure
  • Existing deployment procedures still work
  • New structure supports adding AWS scripts
  • Scripts maintain executable permissions
  • Git history is preserved where possible

Technical Implementation

  • Create new directory structure
  • Move existing scripts to appropriate locations
  • Update script paths in documentation
  • Ensure symbolic links or wrapper scripts if needed
  • Update CI/CD pipelines that reference scripts
  • Test deployment procedures with new structure

Files to Reorganize

Common Scripts (cloud-agnostic):

  • build-images.shcommon/build-images.sh
  • local-dev.shcommon/local-dev.sh
  • validate-security.shcommon/validate-security.sh
  • generate-encryption-key.shcommon/generate-encryption-key.sh

GCP Scripts (Google Cloud specific):

  • setup-cluster.shgcp/setup-cluster.sh
  • deploy.shgcp/deploy.sh
  • cleanup.shgcp/cleanup.sh
  • setup-production-env.shgcp/setup-production-env.sh

Documentation Updates

  • Update main README.md to reference new script locations
  • Create scripts/README.md explaining directory structure
  • Update deployment documentation
  • Update any CI/CD pipeline configurations

Related to

Epic #22 - Multi-Cloud Support

Definition of Done

  • Directory structure is implemented and functional
  • All existing scripts work from new locations
  • Documentation is updated and accurate
  • Structure supports future AWS script additions
  • No functionality is lost in the reorganization

Metadata

Metadata

Assignees

No one assigned

    Labels

    awsAmazon Web Services relatedinfrastructureInfrastructure and deployment issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions