Skip to content

Stage-Based Logs and Parameterized Multi-Stage Deployment with Secure Public/Private Config Management #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

git-user-9
Copy link
Owner

Pull Request Description

This pull request extends the project automation by adding support for multi-stage deployments and secure configuration handling. It aligns with the requirements of Assignment 4 and introduces the following enhancements:

  • Multi-Stage Deployment

    • Support for stage-based deployments (dev, prod) using input parameters or git tags such as deploy-dev and deploy-prod.
    • Terraform and GitHub Actions workflows are updated to dynamically select stage-specific variable files and configurations.
  • Private and Public Config Handling

    • Configuration files and startup scripts can now be fetched from either public or private GitHub repositories.
    • For private repositories (used in production), a GitHub Personal Access Token (PAT) stored in GitHub Secrets is passed securely during deployment.
  • Stage-Based S3 Log Upload

    • Application and deployment logs are uploaded to stage-specific folders in S3, for example:

      s3://your-bucket/logs/dev/...
      s3://your-bucket/logs/prod/...
      
  • Post-Deployment Health Check

    • Automated health checks verify application availability on port 8080 (backend) or port 80 (frontend) after deployment.
  • Documentation Updates

    • The README has been updated to include instructions for multi-stage deployments and secret management for private repositories.

This feature/assignment [devops/a4] continues from [devops/a3] and has been raised on [main] to maintain a clear history of each assignment.

Below are screenshots for stage based s3 logs storage.
dev stage
SCR-20250715-bjdk

prod stage
SCR-20250715-bgil

The screenshot below shows the successful execution of the deployment workflow across multiple stages.

The screenshot below demonstrates the successful execution of the deployment workflow for the prod stage, where the configuration was fetched from a private repository.
SCR-20250714-txwz

In the following screenshot, you can see that during the dev stage, the step to clone the private repository is skipped, as it is only required for the production environment.
SCR-20250714-ugvd

These results confirm that the configuration management for both public and private repositories is working as intended across different stages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant