iGitLab – Configurable GitLab multi-version bash/shell installer script for Debian (Ubuntu, Linux Mint, etc)
So I finally decided to upgrade my git/svn server and to install a web gui to make things a little bit easier to view and track, which was when I stumbled upon GitLab. If you don’t already know, GitLab is an open source, self-hosted, GitHub style, git server with a web based interface, using Ruby/Ruby on Rails. After trying out a few of the scripts I found on GitHub to automate the install process, I found most were outdated, and lacked the ability to configure for future installations and/or versions. That’s when I decided to write my own installer script, which I decided to call iGitLab, for Install GitLab.
This script is for pretty much any debian flavored installation, but has only been tested on Ubuntu 12.04 x64, using the latest release which is 5-4-stable. Stay up to date with all new features by following the GitHub repository.
You can find the project on GitHub here:
https://github.com/tripflex/igitlab/
Setup and Install
I recommend starting off with a clean install of Ubuntu 12.04 or Debian 6, which will have less potential for errors or conflicts. There are configuration options inside the script itself that you can modify, such as branch to use, apt-get arguments, ruby source download url, etc. For all the details view the script source, or check it out on github: https://github.com/tripflex/igitlab
1 2 3 |
wget https://raw.github.com/tripflex/igitlab/master/igitlab chmod +x igitlab ./igitlab mygitdomain.com |
The command above will download a shell script that will install everything for you, making the install very easy. There’s a GitHub repository for more information, here.
This script was tested on the latest stable release, which as of 7/22/2013 was 5-4-stable.
Configuration
There are a few configuration options built into this script that you can modify depending on your setup.
GitLab Release
Set this to whatever branch you want to use for the GitLab installation. Current tested working version is 5-4-stable, change to master for latest.
1 |
gitlab_release=5-4-stable |
Unicorn or Puma
Version 5.1 through 5.9 uses Puma, whereas 6.0 will start using Unicorn again. Set this to 1 if you are installing a version that requires Unicorn instead of Puma.
1 |
useunicorn=0 |
Ruby Download URL
Set this to the URL to download Ruby source
1 |
rubydlurl="http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz" |
MySQL Root Password
Set this to the root password for MySQL access. If MySQL is not setup yet on the server you will be prompted to set one up, and then enter it again for the script to use. You will probably only need to set this if you already have MySQL setup, or just enter it when script asks for it.
1 |
mysqlpasswd="" |
Apt Arguments
Set this to the arguments you want ran with apt when updating, and installing. Current default is set to “-qq” which assumes -y and supresses output from apt. Set to -y for standard output.
1 2 3 4 5 |
# -s = simulate # -y = yes (no prompt) # -q = quiet # -qq = even more quiet (also implies -y, do not use with -s) aptget_arguments="-qq" |
Apt Log Files
Set these to filenames you want to use for apt logs
1 2 |
APTLOG=apt.log APTERRLOG=apterror.log |
-
Myles McNamara
-
Stephen Vanderwarker
-
Myles