Skip to content

Instantly share code, notes, and snippets.

@okonomi
Created May 29, 2014 07:10
Show Gist options
  • Save okonomi/86d505695c0538751b25 to your computer and use it in GitHub Desktop.
Save okonomi/86d505695c0538751b25 to your computer and use it in GitHub Desktop.
GitLab on Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
yum update -y
rpm -i https://downloads-packages.s3.amazonaws.com/centos-6.5/gitlab-6.9.1_omnibus-1.el6.x86_64.rpm
gitlab-ctl reconfigure
SCRIPT
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos65"
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision :shell, :inline => $script
end
# GitLab url is:
#
# http://localhost:8080
#
# add ~/.ssh/config:
#
# Host gitlab
# hostname 127.0.0.1
# port 2222
#
# and repository url is:
#
# git@gitlab:repo.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment