Skip to content
Snippets Groups Projects
Commit 63223f3e authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Merge branch 'koding' into 'master'

Add .koding.yml for testing GitLab on Koding

ref: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4769

See merge request !170
parents 7bfa01f4 25ab84e6
No related branches found
No related tags found
1 merge request!170Add .koding.yml for testing GitLab on Koding
koding:
buildDuration: 720 # ~12 min.
provider:
aws:
access_key: '${var.aws_access_key}'
secret_key: '${var.aws_secret_key}'
resource:
aws_instance:
gdk-instance:
root_block_device:
volume_size: 30
instance_type: c3.xlarge
ami: ''
tags:
Name: '${var.koding_user_username}gitlab'
user_data: |
# define variables:
export KODING_USER=${var.koding_user_username}
export KODING_USER_EMAIL=${var.koding_user_email}
export USER_HOME=/home/$KODING_USER
export GITLAB_BOOTSTRAP=$USER_HOME/gitlab-bootstrap.sh
echo _KD_NOTIFY_@Updating package repository...@
# add lxc repo
apt-add-repository -y ppa:ubuntu-lxc/lxd-stable
apt-get update -y
echo _KD_NOTIFY_@Installing base requirements...@
# install base requirements
apt-get install -y software-properties-common python-software-properties git postgresql postgresql-contrib libpq-dev phantomjs redis-server libicu-dev cmake g++ nodejs libkrb5-dev golang ed pkg-config
# set overcommit_memory
echo "vm.overcommit_memory = 1" | tee -a /etc/sysctl.conf
sysctl vm.overcommit_memory=1
cat > $GITLAB_BOOTSTRAP <<EOF
#!/bin/bash
echo _KD_NOTIFY_@Installing RVM and Ruby...@
# install rvm
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --ruby=2.1.8
source $USER_HOME/.rvm/scripts/rvm
echo _KD_NOTIFY_@Installing bundler...@
# install bundler
gem install bundler
echo _KD_NOTIFY_@Cloning GitLab repository...@
# clone and run gitlab
git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git
# force to use 0.0.0.0 for localhost
echo "0.0.0.0" > gitlab-development-kit/host
echo _KD_NOTIFY_@Compiling GitLab...@
cd gitlab-development-kit
make
EOF
chown $KODING_USER: $GITLAB_BOOTSTRAP
chmod +x $GITLAB_BOOTSTRAP
su - $KODING_USER -c $GITLAB_BOOTSTRAP
echo ""
echo "Now launch a new terminal and do;"
echo " $ cd gitlab-development-kit"
echo " $ ./run"
echo ""
echo _KD_DONE_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment