-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-develop…
…ment-kit into reorganize-readme Conflicts: Makefile README.md
- Loading branch information
Showing
7 changed files
with
154 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
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_ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# GitLab Development Kit cheat sheet | ||
|
||
./run # Start everything | ||
./run db # Start enough to run tests | ||
./run app # Start GitLab, need './run db' | ||
|
||
make gitlab_repo=https://my-fork # Install everything | ||
make update # Pull application changes from Git | ||
make clean-config all # Delete and regenerate all config files created by GDK | ||
|
||
# Development admin account: root / 5iveL!fe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
redis: redis-server /home/git/redis/redis.conf | ||
postgresql: support/postgresql-signal-wrapper postgres -D /home/git/postgresql/data -k /home/git/postgresql -h '' | ||
#postgresql-replica: support/postgresql-signal-wrapper postgres -D /home/git/postgresql-replica/data -k /home/git/postgresql-replica -h '' | ||
#openldap: cd gitlab-openldap && libexec/slapd -F slapd.d -d2 -h "ldap://127.0.0.1:3890" | ||
gitlab-workhorse: PATH=/home/git/gitlab-workhorse:$PATH gitlab-workhorse -authSocket /home/git/gitlab.socket -listenAddr $host:$port -documentRoot /home/git/gitlab/public -developmentMode | ||
rails-web: RAILS_ENV=development support/exec-cd gitlab bin/web start_foreground | ||
rails-background-jobs: SIDEKIQ_LOG_ARGUMENTS=1 RAILS_ENV=development support/exec-cd gitlab bin/background_jobs start_foreground | ||
#influxdb: influxdb/bin/influxd -config influxdb/influxdb.conf | ||
#grafana: support/wait-postgresql-ready support/exec-cd grafana bin/grafana-server -config grafana.ini | ||
#sshd: /usr/sbin/sshd -e -D -f /home/git/openssh/sshd_config | ||
#nginx: nginx -p /home/git/nginx -c conf/nginx.conf | ||
# GDK Procfile rules to help foreman shut down services: | ||
# - all commands must start with 'exec' | ||
# - no inline shell scripts ('&&' or ';') | ||
# | ||
redis: exec redis-server /home/git/redis/redis.conf | ||
postgresql: exec support/postgresql-signal-wrapper postgres -D /home/git/postgresql/data -k /home/git/postgresql -h '' | ||
#postgresql-replica: exec support/postgresql-signal-wrapper postgres -D /home/git/postgresql-replica/data -k /home/git/postgresql-replica -h '' | ||
#openldap: exec support/exec-cd gitlab-openldap libexec/slapd -F slapd.d -d2 -h "ldap://127.0.0.1:3890" | ||
gitlab-workhorse: exec /usr/bin/env PATH=/home/git/gitlab-workhorse:$PATH gitlab-workhorse -authSocket /home/git/gitlab.socket -listenAddr $host:$port -documentRoot /home/git/gitlab/public -developmentMode | ||
rails-web: exec /usr/bin/env RAILS_ENV=development support/exec-cd gitlab bin/web start_foreground | ||
rails-background-jobs: exec /usr/bin/env SIDEKIQ_LOG_ARGUMENTS=1 RAILS_ENV=development support/exec-cd gitlab bin/background_jobs start_foreground | ||
#influxdb: exec influxdb/bin/influxd -config influxdb/influxdb.conf | ||
#grafana: exec support/wait-postgresql-ready support/exec-cd grafana bin/grafana-server -config grafana.ini | ||
#sshd: exec /usr/sbin/sshd -e -D -f /home/git/openssh/sshd_config | ||
#nginx: exec nginx -p /home/git/nginx -c conf/nginx.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Debugging with Pry | ||
|
||
[Pry](http://pryrepl.org/) allows you to set breakpoints in Ruby code | ||
for interactive debugging. Just drop in the magic word `binding.pry`. | ||
|
||
When running tests Pry's interactive debugging prompt appears in the | ||
terminal window where you start your test command (`rake`, `rspec` | ||
etc.). | ||
|
||
If you want to get a debugging prompt while browsing on your local | ||
development server (localhost:3000) you need to comment out the | ||
`rails-web:` line in the Procfile in your GDK root directory because | ||
Unicorn is not compatible with Pry. | ||
|
||
Then launch GDK as usual (e.g. with `./run`) and in a separate | ||
terminal run: `./run thin`. Your Pry prompts will appear in the window | ||
that runs Thin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters