GitLab

by levlaz
68 deployments · 41 still active · last rev. 1 year ago

This StackScript creates a ready to rock GitLab site! Simply deploy the script and navigate to your URL (or IP address) to get started. Happy coding! :)

Once the installation finishes the credentials are:
Username: root
Password: 5iveL!fe

Compatible with: Debian 7, Ubuntu 14.04 LTS, Ubuntu 12.04 LTS
						#!/bin/bash
# <UDF name="hostname" Label="Host Name for VM" example="gitlab"/>
# <UDF name="FQDN" Label="Fully Qualified Domain Name" example="gitlab.example.com" />
# <UDF name="URL" Label="Full URL for new gitlab site" example="http://gitlab.example.com" />

source <ssinclude StackScriptID="1">

system_update 
system_set_hostname "$HOSTNAME"
system_add_host_entry "$(system_primary_ip)" "$FQDN"

# Set directives to allow for silent postfix install, this will create an "Internet Site" for postfix
debconf-set-selections <<< "postfix postfix/mailname string $FQDN"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"

# Install Pre Reqs
apt-get -y install wget openssh-server postfix 

# Determine Distro and Download and Install gitlab 
ver=`cat /etc/*release | grep DISTRIB_CODENAME | cut -d "=" -f 2`
if [ $ver == "trusty" ]
then
	wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64.deb
else
	if [ $ver == "precise" ]
	then 
		wget https://downloads-packages.s3.amazonaws.com/ubuntu-12.04/gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64.deb
	else 
	wget --no-check-certificate https://downloads-packages.s3.amazonaws.com/debian-7.6/gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64.deb
	fi
fi

sudo dpkg -i gitlab_7.4.3-omnibus.5.1.0.ci-1_amd64.deb

# Configure gitlab with Site URL 
echo "external_url '$URL'" > /etc/gitlab/gitlab.rb

# Launch gitlab 
sudo gitlab-ctl reconfigure