Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGokmen Goksel <gokmen@goksel.me>2016-07-26 07:31:41 +0300
committerMark Pundsack <markpundsack@users.noreply.github.com>2016-08-03 22:12:42 +0300
commit55e1677d08a8b97a597249d905959b9a62d8252c (patch)
tree4f57205750b4fcded3759b811c46d4971b72be03
parent7676f737f71ffadd010db6a383c9b72ae5044a97 (diff)
Koding.yml for GitLab on Koding
This stack script will create a c3.xlarge instance with 30G of disk on provided AWS account and then will install the base requirements for GitLab based on the steps provided in GitLab Development Kit. Once it's done you should have a running GitLab instance on your Koding account.
-rw-r--r--.koding.yml78
1 files changed, 78 insertions, 0 deletions
diff --git a/.koding.yml b/.koding.yml
new file mode 100644
index 00000000000..44968c9d262
--- /dev/null
+++ b/.koding.yml
@@ -0,0 +1,78 @@
+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: |
+ 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
+ touch gitlab-development-kit/.vagrant_enabled
+
+ echo _KD_NOTIFY_@Compiling GitLab...@
+ # run
+ cd gitlab-development-kit
+ make
+
+ EOF
+
+ chown $KODING_USER: $GITLAB_BOOTSTRAP
+ chmod +x $GITLAB_BOOTSTRAP
+
+ su - $KODING_USER -c $GITLAB_BOOTSTRAP
+
+ # pkill gitlab
+ # pkill postgres
+
+ echo ""
+ echo "Now launch a new terminal and do;"
+ echo " $ cd gitlab-development-kit"
+ echo " $ ./run"
+ echo ""
+
+ echo _KD_DONE_