GitLab Community Edition (CE) is an open-source, cloud-based Git repository and version control system that allows DevOps teams to manage the full software development lifecycle from a single application. This system offers various options for managing code, branching, merging, and version control. This document will cover some of the possible options for managing a GitLab CE repository.
Creating a GitLab CE project
To create a new GitLab CE project, follow these steps:
- Access the GitLab CE administration panel.
- Click on the “+” button in the top menu bar and select “New project.”
- Choose the project visibility level (public, internal, or private).
- If you want to import an existing repository, choose the repository hosting service and provide the necessary access tokens.
- Click on the “Create project” button.
Once the project is created, you can start managing your code using Git commands or the GitLab web interface.
Configuring GitLab CI/CD for an external repository
GitLab CI/CD can be configured for an external repository, such as a GitHub repository, to enable continuous integration and continuous deployment. To set this up, follow these steps:
- In GitLab, create a new project and select “Run CI/CD for external repository.”
- Choose the repository hosting service (e.g., GitHub).
- Provide the necessary access tokens.
- In the external repository, create a
.gitlab-ci.yml
file to configure GitLab CI/CD.
GitLab will import the project, enable pull mirroring, enable GitHub project integration, and create a web hook on the external repository to notify GitLab of new commits.
For more information, refer to the official GitLab documentation.
Repository storage
GitLab CE supports two types of repository storage:
- Physical storage: Configured with a
gitaly_address
pointing to a Gitaly node. - Virtual storage: Repositories are stored on a Gitaly Cluster.
Repository storage can be configured as a path pointing directly to the directory where the repositories are stored. However, this approach is deprecated. Instead, configure GitLab to use Gitaly for better performance and scalability.
For more information, refer to the official GitLab documentation on repository storage paths.
Running GitLab in the cloud
GitLab CE can be run in the cloud using the Bitnami GitLab CE Stack. This stack is available for various cloud providers, including AWS, Microsoft Azure, Google Cloud Platform, and virtual machine marketplaces.
To get started, follow the specific guide for your cloud provider:
These guides will help you create your own Git repository and integrate it with a Continuous Integration (CI) server in the cloud.
Conclusion
GitLab CE offers a wide range of options for managing Git repositories, from configuring CI/CD pipelines for external repositories to managing storage and running the application in the cloud. By understanding and utilizing these options, you can optimize your GitLab CE experience and effectively manage your software development projects.