Skip to content

Instantly share code, notes, and snippets.

@ryan-blunden
Created November 8, 2019 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryan-blunden/fb1edf685a2c363d9ca969d3ca044b70 to your computer and use it in GitHub Desktop.
Save ryan-blunden/fb1edf685a2c363d9ca969d3ca044b70 to your computer and use it in GitHub Desktop.
Install GitLab dev Sourcegraph branch
yum clean all
yum update -y
yum upgrade -y
amazon-linux-extras install -y ruby2.6 redis4.0 GraphicsMagick1.3 \
postgresql10 epel
yum install -y postgresql-server postgresql-devel libicu-devel cmake \
gcc gcc-c++ ed fontconfig freetype libfreetype.so.6 libfontconfig.so.1 \
libstdc++.so.6 re2 re2-devel perl-Image-ExifTool rsync sqlite-devel \
ruby-devel perl-Digest-SHA
# shasumfix
ln -s /usr/bin/sha1sum /usr/bin/shasum
# PostgreSQL
postgresql-setup --initdb --unit postgresql
sudo systemctl start postgresql
systemctl enable postgresql
# Install runit manually
wget http://smarden.org/runit/runit-2.1.2.tar.gz
tar xzf runit-2.1.2.tar.gz
rm -f runit-2.1.2.tar.gz
cd admin/runit-2.1.2
sed -i -E 's/ -static$//g' src/Makefile
./package/compile
./package/check
./package/install
cd ../
rm -fr admin/runit-2.1.2 runit-2.1.2
# Go - https://tecadmin.net/install-go-on-centos/
wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
tar -xzf go1.13.4.linux-amd64.tar.gz
rm -f go1.13.4.linux-amd64.tar.gz
mv go /usr/local/bin
echo -e '\nexport GOROOT=/usr/local/bin/go\nexport PATH=$GOPATH/bin:$GOROOT/bin:$PATH\n' >> ~/.bash_profile
# Node.js - https://tecadmin.net/install-latest-nodejs-and-npm-on-centos/
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
yum install -y nodejs
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
yum install -y yarn
# Git
yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.24.0.tar.gz
tar -zxf git-2.24.0.tar.gz
cd git-2.24.0
make prefix=/usr/local all
make prefix=/usr/local install
# Replace system git with symlink to new git
yum remove -y git
rm -fr /usr/bin/git
ln -s /usr/local/bin/git /usr/bin/git
# As ec2-user
bundle config build.pg --with-pg-config=/usr/pgsql-10/bin/pg_config
# Install rvm to target Ruby 2.6.3
\curl -sSL https://get.rvm.io | bash
sudo rvm install 2.6.3
sudo rvm use 2.6.3
gem install bundler -v '= 1.17.3'
gem install gitlab-development-kit
gdk init
cd gitlab-development-kit
gdk install shallow_clone=true gitlab_repo=https://gitlab.com/felixfbecker/gitlab-ee.git
support/set-gitlab-upstream
cd gitlab
bundle install
yarn install
bundle exec rake db:migrate
gdk start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment