2.4 KiB
CI/CD Pipeline Documentation
1. Staging vs. Production Environments
In the Software Development Life Cycle (SDLC) and DevOps practices, environments are strictly separated to ensure software quality and stability before reaching the end-user:
-
Staging Environment:
- This is an exact replica (clone) of the production environment, sharing the same configurations, database schemas, and network topology.
- Purpose: It acts as the final testing ground for Quality Assurance (QA), Integration Testing, and User Acceptance Testing (UAT) to catch bugs under real-world conditions.
- Access & Impact: Restricted to the development team, QA engineers, and stakeholders. If the system crashes here, real users are not affected.
-
Production Environment:
- This is the live, public-facing environment serving actual end-users and handling real data.
- Purpose: To deliver the application with maximum stability, security, and High Availability (HA).
- Access & Impact: Strictly controlled. Deploying to production is a highly sensitive operation that requires passing all automated tests in Staging and mandates a Manual Approval step in our CI/CD pipeline to prevent catastrophic failures.
Ghaymah CLI Integration Guide
To control deployments and monitor environments directly from the terminal (or integrate them programmatically into CI/CD pipelines), developers and SREs use the ghaymah CLI.
Step 1: Installation
Install the CLI tool on the local machine or CI build runners:
curl -sL [https://cli.ghaymah.systems/install](https://cli.ghaymah.systems/install) | bash
Step 2: Authentication
To link the CLI with your Ghaymah account, you must authenticate either interactively or via an API token:
Interactive login (for developers)
ghaymah login
Automated login using a Token (for GitHub Actions/Pipelines)
ghaymah login --token <YOUR_GHAYMAH_API_TOKEN>
Step 3: Project Configuration
Link your local workspace to the remote project hosted on the Ghaymah platform:
Link the project using its unique Project ID
ghaymah project link --id <PROJECT_ID>
Step 4: Execution & Monitoring
Once configured, engineers can trigger deployments and monitor container health directly from the terminal:
Trigger a new deployment
ghaymah app deploy
Stream live container logs for troubleshooting
ghaymah logs tail --app q1-sre-api