Skip to content

Instantly share code, notes, and snippets.

@mikomatic
Forked from cjtallman/README.md
Created August 21, 2021 16:45
Show Gist options
  • Save mikomatic/555f944e99a69918c957b4fc86b9dd72 to your computer and use it in GitHub Desktop.
Save mikomatic/555f944e99a69918c957b4fc86b9dd72 to your computer and use it in GitHub Desktop.
Vagrant Gitlab Server

Vagrant Gitlab Server

Quickly set up a local Gitlab CE server using Vagrant.

Run vagrant up to setup the virtual server.

Server Details

echo ==== Installing Requirements ==============================================
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl openssh-server ca-certificates postfix
echo ==== Installing GitLab CE =================================================
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install -y gitlab-ce
sudo gitlab-ctl reconfigure
sudo gitlab-ctl status
echo ==== Installing GitLab Multi Runner =======================================
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash
sudo apt-get install -y gitlab-ci-multi-runner
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.hostname = "gitlab.local.dev"
config.vm.network :private_network, ip: "33.33.33.33"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provider "virtualbox" do |vb|
vb.name = "GitLab Server"
vb.memory = "2048"
vb.cpus = "2"
end
config.vm.provision :docker
config.vm.provision "shell", path: "install_gitlab.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment