{"id":31048967,"url":"https://github.com/erangamadhushan/devops-foundation","last_synced_at":"2026-04-28T21:34:42.795Z","repository":{"id":309616216,"uuid":"1036943321","full_name":"Erangamadhushan/DevOps-Foundation","owner":"Erangamadhushan","description":"DevOps, Version Control, Git, CI/CD, Containers, Configuration Management, Monitoring, Logging, Cloud Services","archived":false,"fork":false,"pushed_at":"2025-08-12T21:48:54.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-12T22:30:24.612Z","etag":null,"topics":["cicd","cloud","configuration-management","containers","devops","docker","docker-image","git","github","pipeline","version-control"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Erangamadhushan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-12T20:19:45.000Z","updated_at":"2025-08-12T21:48:58.000Z","dependencies_parsed_at":"2025-08-12T22:30:34.521Z","dependency_job_id":null,"html_url":"https://github.com/Erangamadhushan/DevOps-Foundation","commit_stats":null,"previous_names":["erangamadhushan/devops-foundation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Erangamadhushan/DevOps-Foundation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erangamadhushan%2FDevOps-Foundation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erangamadhushan%2FDevOps-Foundation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erangamadhushan%2FDevOps-Foundation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erangamadhushan%2FDevOps-Foundation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erangamadhushan","download_url":"https://codeload.github.com/Erangamadhushan/DevOps-Foundation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erangamadhushan%2FDevOps-Foundation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275169671,"owners_count":25417334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","cloud","configuration-management","containers","devops","docker","docker-image","git","github","pipeline","version-control"],"created_at":"2025-09-14T21:25:18.324Z","updated_at":"2026-04-28T21:34:42.789Z","avatar_url":"https://github.com/Erangamadhushan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 DevOps Foundation\n\n[![CI/CD Pipeline](https://github.com/Erangamadhushan/DevOps-Foundation/actions/workflows/main.yml/badge.svg)](https://github.com/Erangamadhushan/DevOps-Foundation/actions/workflows/main.yml)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)\n[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)\n\nA comprehensive DevOps foundation project demonstrating modern development practices including **Version Control, Git, CI/CD, Containers, Configuration Management, Monitoring, Logging, and Cloud Services** with hands-on exercises and a sample Node.js Express application.\n\n## 📋 Table of Contents\n\n- [Overview](#-overview)\n- [Learning Objectives](#-learning-objectives)\n- [Quick Start](#-quick-start)\n- [DevOps Exercises](#-devops-exercises)\n- [Application Setup](#-application-setup)\n- [Git Workflow Exercises](#-git-workflow-exercises)\n- [CI/CD Pipeline](#-cicd-pipeline)\n- [API Documentation](#-api-documentation)\n- [Project Structure](#-project-structure)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## 🎯 Overview\n\nThis repository contains **hands-on exercises for DevOps foundation** concepts along with a practical Node.js Express application. It's designed to provide real-world experience with:\n\n- **Version Control \u0026 Git** - Branching, merging, and collaboration workflows\n- **CI/CD Pipelines** - Automated testing, building, and deployment\n- **Containerization** - Docker and container orchestration\n- **Configuration Management** - Environment-specific configurations\n- **Monitoring \u0026 Logging** - Application health and performance tracking\n- **Cloud Services** - Modern cloud deployment strategies\n\n## 🎓 Learning Objectives\n\nBy working through this repository, you will learn:\n\n- ✅ **Git Version Control** - Professional branching and merging strategies\n- ✅ **GitHub Actions** - Setting up automated CI/CD workflows  \n- ✅ **Node.js Development** - Building RESTful APIs with Express\n- ✅ **Testing Strategies** - Unit testing and continuous integration\n- ✅ **Code Quality** - Linting, formatting, and best practices\n- ✅ **Deployment** - From development to production workflows\n- ✅ **DevOps Culture** - Collaboration between development and operations\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- **Node.js** (v18 or higher)\n- **Git** for version control\n- **Code Editor** (VS Code recommended)\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/Erangamadhushan/DevOps-Foundation.git\n   cd DevOps-Foundation\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Start the application**\n   ```bash\n   node index.js\n   ```\n\n4. **Visit the application**\n   ```\n   http://localhost:3000\n   ```\n\n## 📚 DevOps Exercises\n\nThis repository includes practical exercises covering essential DevOps concepts:\n\n### 1. Version Control \u0026 Git Fundamentals\n- Repository initialization and configuration\n- Branching strategies and best practices\n- Merge vs. Rebase workflows\n- Conflict resolution techniques\n\n### 2. CI/CD Pipeline Development\n- GitHub Actions workflow setup\n- Automated testing integration\n- Build and deployment automation\n- Environment-specific deployments\n\n### 3. Configuration Management\n- Environment variable management\n- Configuration file organization\n- Secrets and security best practices\n\n### 4. Monitoring \u0026 Logging\n- Application health monitoring\n- Error tracking and alerting\n- Performance metrics collection\n\n## 💻 Application Setup\n\n### Available Scripts\n\n```bash\n# Start the application\nnode index.js\n\n# Install development dependencies\nnpm install --save-dev nodemon\n\n# Development mode (if nodemon is installed)\nnpx nodemon index.js\n```\n\n### Environment Configuration\n\nThe application runs on port 3000 by default. You can modify the configuration in `index.js`:\n\n```javascript\nconst port = process.env.PORT || 3000;\n```\n\n### Dependencies\n\n- **express** - Web application framework\n- **dotenv** - Environment configuration management\n- **cors** - Cross-origin resource sharing\n\n## 🌿 Git Workflow Exercises\n\n### Exercise 1: Feature Branch Workflow\n\nPractice the complete feature development cycle:\n\n```bash\n# Show all git branches\ngit branch\n\n# Create and switch to add-readme branch\ngit checkout -b add-readme\n\n# Make necessary changes in readme file\n# ... edit files ...\n\n# Stage changes\ngit add README.md\n\n# Commit changes with meaningful message\ngit commit -m \"Add comprehensive project documentation\"\n\n# Push changes to remote repository branch\ngit push -u origin add-readme\n\n# Switch to the main branch\ngit checkout main\n\n# Merge add-readme local branch into the main branch\ngit merge add-readme\n\n# Push changes to remote repository main branch\ngit push -u origin main\n\n# Delete add-readme branch from remote repository\ngit push origin --delete add-readme\n\n# Delete add-readme branch from local repository\ngit branch -d add-readme\n```\n\n### Exercise 2: Collaboration Workflow\n\nLearn how to work with multiple contributors:\n\n1. **Fork the repository**\n2. **Create feature branches** for different features\n3. **Submit Pull Requests** for code review\n4. **Handle merge conflicts** when they occur\n5. **Maintain clean commit history**\n\n## 🔄 CI/CD Pipeline\n\nThe project uses **GitHub Actions** for automated workflows:\n\n### Current Pipeline Features\n\n- **Automated Testing** - Runs on every push and pull request\n- **Code Quality Checks** - Linting and formatting validation\n- **Build Verification** - Ensures application builds successfully\n- **Deployment Automation** - Deploys to staging/production environments\n\n### Workflow Configuration\n\nLocated in `.github/workflows/main.yml`:\n\n```yaml\nname: CI/CD Pipeline\n\non:\n  push:\n    branches: [ main ]\n  pull_request:\n    branches: [ main ]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: '20'\n      # Add your test commands here\n```\n\n## 📚 API Documentation\n\n### Base URL\n```\nLocal Development: http://localhost:3000\n```\n\n### Available Endpoints\n\n#### Root Endpoint\n```http\nGET /\n```\n\n**Response:**\n```json\n{\n  \"message\": \"Welcome to the API\",\n  \"endpoints\": {\n    \"health\": \"/health\",\n    \"users\": \"/api/users\"\n  }\n}\n```\n\n#### Health Check\n```http\nGET /health\n```\n\n**Response:**\n```\nStatus: 200 OK\nBody: \"OK\"\n```\n\n### API Features\n\n- **JSON Response Format** - Structured API responses\n- **Health Monitoring** - Built-in health check endpoint\n- **Express Middleware** - JSON parsing and URL encoding\n- **Error Handling** - Graceful error responses\n\n## 📁 Project Structure\n\n```\nDevOps-Foundation/\n├── .github/\n│   └── workflows/\n│       └── main.yml          # CI/CD pipeline configuration\n├── src/                      # Source code directory\n├── node_modules/             # Dependencies (auto-generated)\n├── index.js                  # Main application file\n├── package.json              # Project configuration and dependencies\n├── package-lock.json         # Dependency lock file\n├── .gitignore               # Git ignore rules\n├── LICENSE                   # Project license\n└── README.md                 # Project documentation\n```\n\n### Key Files\n\n- **`index.js`** - Main Express application with API endpoints\n- **`package.json`** - Node.js project configuration and dependencies\n- **`.github/workflows/main.yml`** - GitHub Actions CI/CD pipeline\n- **`README.md`** - Comprehensive project documentation\n\n## 🛠 Development Best Practices\n\n### Code Quality\n\n- Follow consistent coding standards\n- Use meaningful commit messages\n- Write descriptive documentation\n- Implement proper error handling\n\n### Git Workflow\n\n- Use feature branches for development\n- Keep commits atomic and focused\n- Write clear commit messages\n- Regularly sync with main branch\n\n### Testing Strategy\n\n- Write unit tests for core functionality\n- Implement integration tests for API endpoints\n- Use continuous integration for automated testing\n- Maintain high code coverage\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how to get started:\n\n1. **Fork the repository**\n2. **Create a feature branch**\n   ```bash\n   git checkout -b feature/amazing-feature\n   ```\n3. **Make your changes** following the coding standards\n4. **Test your changes** thoroughly\n5. **Commit with clear messages**\n   ```bash\n   git commit -m \"Add amazing feature for DevOps automation\"\n   ```\n6. **Push to your fork**\n   ```bash\n   git push origin feature/amazing-feature\n   ```\n7. **Submit a Pull Request** with detailed description\n\n### Development Guidelines\n\n- Follow existing code style and patterns\n- Add tests for new functionality\n- Update documentation as needed\n- Ensure all CI/CD checks pass\n\n## 📈 Learning Path\n\n### Beginner Level\n1. Complete Git workflow exercises\n2. Set up local development environment\n3. Understand the CI/CD pipeline basics\n4. Make your first contribution\n\n### Intermediate Level\n1. Implement new API endpoints\n2. Add comprehensive testing\n3. Set up monitoring and logging\n4. Create Docker containers\n\n### Advanced Level\n1. Design complex deployment strategies\n2. Implement infrastructure as code\n3. Set up monitoring and alerting\n4. Optimize performance and security\n\n## 📄 License\n\nThis project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.\n\n## 🙋‍♂️ Support \u0026 Resources\n\n### Getting Help\n\n- **Issues**: Report bugs or request features in [GitHub Issues](https://github.com/Erangamadhushan/DevOps-Foundation/issues)\n- **Discussions**: Join conversations about DevOps practices\n- **Documentation**: Comprehensive guides and examples included\n\n### Additional Resources\n\n- [Git Documentation](https://git-scm.com/doc)\n- [GitHub Actions Guide](https://docs.github.com/en/actions)\n- [Node.js Best Practices](https://nodejs.org/en/docs/)\n- [Express.js Guide](https://expressjs.com/)\n\n---\n\n**🎯 Ready to start your DevOps journey? Begin with the Git workflow exercises and explore the hands-on learning materials!**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferangamadhushan%2Fdevops-foundation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferangamadhushan%2Fdevops-foundation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferangamadhushan%2Fdevops-foundation/lists"}