what is gitlab?
GitLab is a web-based DevOps platform that provides a complete CI/CD (Continuous Integration/Continuous Deployment) pipeline along with Git repository management, issue tracking, and security features. It enables developers to collaborate, automate workflows, and deploy applications efficiently.
Key Features of GitLab:
1. Version Control: Git-based repository management, similar to GitHub and Bitbucket.
2. CI/CD Integration: Built-in Continuous Integration & Continuous Deployment (CI/CD) pipelines.
3. Issue Tracking & Project Management: Helps teams manage work using boards, milestones, and issue tracking.
4. Security & Compliance: Offers code quality checks, security scanning, and compliance features.
5. Container Registry: Built-in Docker container registry for managing images.
6. Self-Hosted or Cloud-Based: Available as GitLab.com (cloud-hosted) or GitLab Self-Managed (on-premises installation).
7. Infrastructure as Code: Supports Kubernetes, Terraform, and Infrastructure as Code (IaC).
8. Monitoring & Logging: Provides built-in monitoring via Prometheus.
Tools Required:
1. GitLab: For repository hosting and CI/CD pipeline.
2. Docker: For containerizing the Django/Node application.
3. AWS EC2: For hosting the deployed application.
4. Django or Node.js: Depending on the chosen stack for the
application development.
5. Any code editor (like Visual Studio Code, Atom, etc.)
Step 1: Setup an AWS EC2 Instance
- Launch an Ubuntu 22.04 EC2 instance
- Allow ports 22, 80, 443 in security groups
- SSH into
*Step 2: Open GitLab and add a new project *
- Open Gitlab.com & set up the account
- add new project
- Import the project
- Click on Repository by URL
Step3: Create .gitlab-ci.yml file
1.Create a new file
- Name the file
.gitlab-ci.yml
file
*Step4: Run the pipeline *
1.Go to main project & click on pipeline
pipeline is pending
Go to the setting ,click on CI/CD and go to the runner
- Enable the Runner
Step5:Setup Docker & Docker Compose
- install Docker
Step 6: Add port to the Security group
Top comments (0)