July 14, 2021 . 5 MIN READ
https://www.linode.com/docs/guides/deploy-gitlab-with-marketplace-apps/
GitLab is a complete solution for all aspects of your software development. At its core, GitLab serves as your centralized remote Git repository. GitLab also features built-in tools that represent every task in your development workflow, from planning to testing to releasing.
Self-hosting your software development with GitLab offers total control of your codebase. At the same time, its familiar interface will ease collaboration for you and your team. GitLab is the most popular self-hosted Git repository software, so you’ll benefit from a robust set of integrated tools and an active community.
Linode’s App Marketplace allows you to easily deploy software on a Linode using the Linode Cloud Manager. To access Linode’s App Marketplace:
You can configure your GitLab App by providing values for the following fields:
| Field | Description |
|---|---|
| Domain | Your GitLab site’s domain name. This domain will also be used by Postfix to send mail. Setting a value for this field will not automatically set up DNS for your app, so be sure to follow the DNS instructions in the Access your GitLab Site section. If you do not have a domain name, you can leave this field blank and Postfix will use your Linode’s default Reverse DNS to send email instead (i.e. gitlab@li926-227.members.linode.com). Advanced Configuration. |
This guide may involve or result in sending email. In an effort to fight spam, Linode restricts …
After providing the app specific options, provide configurations for your Linode server:
| Configuration | Description |
|---|---|
| Select an Image | Debian 9 is currently the only image supported by the GitLab Marketplace App, and it is pre-selected on the Linode creation page. Required. |
| Region | The region where you would like your Linode to reside. In general, it’s best to choose a location that’s closest to you. For more information on choosing a DC, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between you and each of our data centers. Required. |
| Linode Plan | Your Linode’s hardware resources. We recommend that you use, at minimum, an 8GB Linode plan for your GitLab server. For more information on GitLab’s system requirements see their official documentation. If you decide that you need more or fewer hardware resources after you deploy your app, you can always resize your Linode to a different plan. Required. |
| Linode Label | The name for your Linode, which must be unique between all of the Linodes on your account. This name will be how you identify your server in the Cloud Manager’s Dashboard. Required. |
| Root Password | The primary administrative password for your Linode instance. This password must be provided when you log in to your Linode via SSH. The password must meet the complexity strength validation requirements for a strong password. Your root password can be used to perform any action on your server, so make it long, complex, and unique. Required. |
When you’ve provided all required Linode Options, click on the Create button. Your GitLab app will complete installation anywhere between 3-7 minutes after your Linode has finished provisioning.
After GitLab has finished installing, you will be able to access your GitLab site over http:// with your Linode’s IPv4 address or the domain name entered when deploying your GitLab Marketplace App.
http://.With a Domain Name
If you deployed your GitLab Marketplace App with a value set for the Domain field, you will need to separately set up DNS for your app. Specifically, you’ll need to create an A record associated with the IPv4 address for your Linode. Review the DNS Manager guide for instructions on setting up DNS records.
Once your DNS records are created (and the changes have propagated to your internet service provider), you can then enter the domain name in a browser window to access your GitLab site. Ensure you are using http:// when visiting your site.
Note
root as the username and the password you just created to log in. You can now begin creating GitLab repositories, users, and more. See GitLab’s official documentation for more information.If you configured your GitLab Marketplace App without providing a domain, you can configure one after the app has been deployed. Begin by setting up DNS for your domain:
After setting up DNS, you will need to update your GitLab instance’s /etc/gitlab/gitlab.rb file with your domain name. This will ensure that any emails sent to users by the GitLab instance will use your site’s domain.
/etc/gitlab/gitlab.rb file and modify the value of external_url. Ensure you replace http://example.com with your domain:
|
|
gitlab-ctl reconfigure
The GitLab Marketplace App will install the following required software on your Linode:
| Software | Description |
|---|---|
| GitLab | Remote Git repository software. |
| Postfix | Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail. |
| UFW | Firewall utility. Ports 22/tcp, 80/tcp, 443/tcp, 25, 587, and 110 for IPv4 and IPv6 will allow outgoing and incoming traffic. |
| Fail2ban | Fail2Ban is an intrusion prevention software framework that protects computer servers from brute-force attacks. |