|
| 1 | +--- |
| 2 | +author: |
| 3 | + name: Linode Community |
| 4 | + email: docs@linode.com |
| 5 | +description: 'Deploy GitLab on Linode using One-Click Apps.' |
| 6 | +keywords: ['gitlab','one-click apps','version control','git'] |
| 7 | +license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' |
| 8 | +published: 2019-03-27 |
| 9 | +modified: 2019-03-27 |
| 10 | +modified_by: |
| 11 | + name: Linode |
| 12 | +title: "Deploy GitLab with One-Click Apps" |
| 13 | +contributor: |
| 14 | + name: Linode |
| 15 | +external_resources: |
| 16 | +- '[GitLab Adminstrator Documentation](https://docs.gitlab.com/ee/administration/)' |
| 17 | +--- |
| 18 | +## GitLab One-Click App |
| 19 | + |
| 20 | +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. |
| 21 | + |
| 22 | +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. |
| 23 | + |
| 24 | +### Deploy a GitLab One-Click App |
| 25 | + |
| 26 | +{{< content "deploy-one-click-apps">}} |
| 27 | + |
| 28 | +### GitLab Options |
| 29 | + |
| 30 | +You can configure your GitLab App by providing values for the following fields: |
| 31 | + |
| 32 | +| **Field** | **Description** | |
| 33 | +|:--------------|:------------| |
| 34 | +| **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](#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*. | |
| 35 | +| **SSH public key** | Your SSH [public key](/docs/security/authentication/use-public-key-authentication-with-ssh/). The public key will be stored in the `/root/.ssh/authorized_keys` file on your Linode. *Advanced Configuration*. | |
| 36 | + |
| 37 | +### Linode Options |
| 38 | + |
| 39 | +After providing the app specific options, provide configurations for your Linode server: |
| 40 | + |
| 41 | +| **Configuration** | **Description** | |
| 42 | +|--------------|------------| |
| 43 | +| **Select an Image** | Debian 9 is currently the only image supported by the GitLab One-Click App, and it is pre-selected on the Linode creation page. *Required*. | |
| 44 | +| **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](/docs/platform/how-to-choose-a-data-center) guide. You can also generate [MTR reports](/docs/networking/diagnostics/diagnosing-network-issues-with-mtr/) for a deeper look at the network routes between you and each of our data centers. *Required*. | |
| 45 | +| **Linode Plan** | Your Linode's [hardware resources](/docs/platform/how-to-choose-a-linode-plan/#hardware-resource-definitions). 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](https://docs.gitlab.com/ee/install/requirements.html). If you decide that you need more or fewer hardware resources after you deploy your app, you can always [resize your Linode](/docs/platform/disk-images/resizing-a-linode/) to a different plan. *Required*. | |
| 46 | +| **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*. | |
| 47 | +| **Root Password** | The primary administrative password for your Linode instance. This password must be provided when you log in to your Linode via SSH. It must be at least 6 characters long and contain characters from two of the following categories: lowercase and uppercase case letters, numbers, and punctuation characters. Your root password can be used to perform any action on your server, so make it long, complex, and unique. *Required*. | |
| 48 | + |
| 49 | +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**. |
| 50 | + |
| 51 | +## Getting Started after Deployment |
| 52 | + |
| 53 | +### Access your GitLab Site |
| 54 | + |
| 55 | +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 One-Click App. |
| 56 | + |
| 57 | +1. Access your GitLab instance: |
| 58 | + |
| 59 | + **With your Linode's IP Address** |
| 60 | + |
| 61 | + You will be able to access your GitLab site by copying your Linode's IPv4 address and entering it in the browser of your choice. To find your Linode's IPv4 address: |
| 62 | + |
| 63 | + 1. Click on the **Linodes** link in the sidebar. You will see a list of all your Linodes. |
| 64 | + |
| 65 | + 1. Find the Linode you just created when deploying your app and select it. |
| 66 | + |
| 67 | + 1. Navigate to the **Networking** tab. |
| 68 | + |
| 69 | + 1. Your IPv4 address will be listed under the **Address** column in the **IPv4** table. |
| 70 | + |
| 71 | + 1. Copy and paste the IPv4 address into a browser window. Ensure you are using `http://`. |
| 72 | + |
| 73 | + **With a Domain Name** |
| 74 | + |
| 75 | + If you deployed your GitLab One-Click 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*](/docs/networking/dns/dns-records-an-introduction/#a-and-aaaa) associated with the IPv4 address for your Linode. Review the [DNS Manager](/docs/platform/manager/dns-manager/) guide for instructions on setting up DNS records. |
| 76 | + |
| 77 | + Once your DNS records are created (and the changes have [propagated to your internet service provider](/docs/platform/manager/dns-manager/#wait-for-propagation)), 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. |
| 78 | + |
| 79 | + {{< note >}} |
| 80 | +For more general information about how DNS works, review the [DNS Records: An Introduction](/docs/networking/dns/dns-records-an-introduction/) guide. |
| 81 | +{{< /note >}} |
| 82 | + |
| 83 | +1. Once you have accessed your GitLab site, you will be brought to GitLab's password reset screen. Provide a secure password for the administrator's account: |
| 84 | + |
| 85 | +  |
| 86 | + |
| 87 | +1. You will be redirected to the login screen. Enter `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](https://docs.gitlab.com/ee/university/training/topics/getting_started.html) for more information. |
| 88 | + |
| 89 | +### Add a Domain after Deploying your GitLab Instance |
| 90 | + |
| 91 | +If you configured your GitLab One-Click App without providing a domain, you can configure one after the app has been deployed. Begin by setting up DNS for your domain: |
| 92 | + |
| 93 | +1. Create an [*A record*](/docs/networking/dns/dns-records-an-introduction/#a-and-aaaa) associated with the IPv4 address for your Linode. Review the [DNS Manager](/docs/platform/manager/dns-manager/) guide for instructions on setting up DNS records. |
| 94 | + |
| 95 | +1. Wait for your new DNS records to [propagate to your internet service provider](/docs/platform/manager/dns-manager/#wait-for-propagation). |
| 96 | + |
| 97 | +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. |
| 98 | + |
| 99 | +1. [Connect to your Linode via SSH](/docs/getting-started/#connect-to-your-linode-via-ssh). |
| 100 | + |
| 101 | +1. With a text editor of your choice ([nano](/docs/quick-answers/linux/use-nano-to-edit-files-in-linux/), for example), open the `/etc/gitlab/gitlab.rb` file and modify the value of `external_url`. Ensure you replace `http://example.com` with your domain: |
| 102 | + |
| 103 | + {{< file "/etc/gitlab/gitlab.rb" >}} |
| 104 | +## GitLab URL |
| 105 | +##! URL on which GitLab will be reachable. |
| 106 | +##! For more details on configuring external_url see: |
| 107 | +##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab |
| 108 | +external_url 'http://example.com' |
| 109 | +{{< /file >}} |
| 110 | + |
| 111 | +1. Issue the following command to enable your new configuration: |
| 112 | + |
| 113 | + gitlab-ctl reconfigure |
| 114 | + |
| 115 | +1. Navigate to the domain in a browser window and verify that you are directed to your GitLab instance. |
| 116 | + |
| 117 | +### Software Included |
| 118 | + |
| 119 | +The GitLab One-Click App will install the following required software on your Linode: |
| 120 | + |
| 121 | +| **Software** | **Description** | |
| 122 | +|:--------------|:------------| |
| 123 | +| [**GitLab**](https://about.gitlab.com/) | Remote Git repository software. | |
| 124 | +| [**Postfix**](http://www.postfix.org/) | Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail. | |
| 125 | +| [**UFW**](https://wiki.ubuntu.com/UncomplicatedFirewall) | Firewall utility. Ports 22/tcp, 80/tcp, 443/tcp, 25, 587, and 110 for IPv4 and IPv6 will allow outgoing and incoming traffic. | |
| 126 | +| [**Fail2ban**](https://www.fail2ban.org/wiki/index.php/Main_Page) | Fail2Ban is an intrusion prevention software framework that protects computer servers from brute-force attacks. | |
0 commit comments