Special Tip – Use the following link to get $10 dollars on Digital Ocean https://m.do.co/c/a701804ca297
Setting up a server on digital ocean can be a breeze. You simply select the droplet (virtual machine) that you would like and you are ready to go. They even have pre-configured applications that you can use. One of them being a git-lab pre-configured image. We do not want to use this image since we are looking for an extremely cheap version. I do recommend you install the pre-configured version if you plan on using this for production since digital ocean has done a great job at optimizing the application and server.
Creating you droplet » Its just a couple of clicks.
- I will not be covering this step since digital ocean has done a great job at documenting the process and honestly even a cave man can do it.
Select Centos 7 since this is the operating system we will be using to install git-lab on.
- Once you have access to the environment you can start to deploy the git-lab application.
1. Install and configure the necessary dependencies
On CentOS 7 (and RedHat/Oracle/Scientific Linux 7), the commands below will also open HTTP and SSH access in the system firewall.
sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.
sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix
During Postfix installation a configuration screen may appear. Select ‘Internet Site’ and press enter. Use your server’s external DNS for ‘mail name’ and press enter. If additional screens appear, continue to press enter to accept the defaults.
2. Add the GitLab package repository and install the package
Add the GitLab package repository.
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
Next, install the GitLab package. Change `http://gitlab.example.com` to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL. HTTPS requires additional configuration after installation.
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee
3. Browse to the hostname and login
On your first visit, you’ll be redirected to a password reset screen. Provide the password for the initial administrator account and you will be redirected back to the login screen. Use the default account’s username
root to login.
4. Set up your communication preferences
Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.
Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.
That is all folks. You have deployed a functioning git-lab environment for $5 dollars.
If you would like a faster environment then look into increasing the ram and cpu on your droplet.