gitlab-grack 2.0.0.pre → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 189a97748f50e765dfdd52856aaf7fa210872244
4
- data.tar.gz: c0041c27441c704f1467594417040772c1bf2f45
3
+ metadata.gz: e58169aa1a220e55b89a028ccd0f404da9724959
4
+ data.tar.gz: 2d6677fac1e708aad1fb9b635b429fedcdff2a2f
5
5
  SHA512:
6
- metadata.gz: 9a60611a19097eb2d0e8050e9cc48565708e8cd8827b8f5a186274d18fd527979363a971ac22b7073dd909b498777735cf1c2095a586c805b6ec4267346ec82e
7
- data.tar.gz: 2d6fcdf02de0325a09624847206ecc51387be92032db6c965b9daf22aaac300a7a1f42864148dff5452e36905fbe69d1a1af33a911d2b992828e295d86f4a888
6
+ metadata.gz: 04add40340ee6c556e435e3908c32bf38f19f4e503f04f44a61b6a1574addef1b0d768cfb2f257c5879549918cd1e15b4482bf1e63ba3a7e9d536f1767b6b66c
7
+ data.tar.gz: a87bdaac672b756b35aa7ea7e862c70b46ff0441a8d2cbb1c28604860ae3bae2190e41e4f199f67a47884014e8f656275b9f09a52e83300aa3536bb82a66a60f
data/.gitignore CHANGED
@@ -1,3 +1,22 @@
1
- coverage/
2
- pkg/
3
- *.gem
1
+ gitlab-shell/
2
+ .ssh/
3
+ gitlab-satellites/
4
+ repositories/
5
+ gitlab/
6
+ gitlab-ci/
7
+ gitlab-runner/
8
+ Procfile
9
+ postgresql/data
10
+ postgresql/.s.*
11
+ redis/*.conf
12
+ .bundle/
13
+ gitlab-openldap/bin/
14
+ gitlab-openldap/etc/
15
+ gitlab-openldap/include/
16
+ gitlab-openldap/lib/
17
+ gitlab-openldap/libexec/
18
+ gitlab-openldap/openldap-2.4.40.tgz
19
+ gitlab-openldap/openldap-2.4.40/
20
+ gitlab-openldap/sbin/
21
+ gitlab-openldap/share/
22
+ .vagrant/
data/Gemfile CHANGED
@@ -1,8 +1,3 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- gemspec
4
-
5
- group :development do
6
- gem 'rake'
7
- gem 'rack-test'
8
- end
3
+ gem 'foreman'
@@ -1,25 +1,16 @@
1
- PATH
2
- remote: .
3
- specs:
4
- gitlab-grack (1.0.1)
5
- rack (~> 1.4.1)
6
-
7
1
  GEM
8
2
  remote: https://rubygems.org/
9
3
  specs:
10
- metaclass (0.0.1)
11
- mocha (0.14.0)
12
- metaclass (~> 0.0.1)
13
- rack (1.4.5)
14
- rack-test (0.6.2)
15
- rack (>= 1.0)
16
- rake (10.0.4)
4
+ dotenv (0.11.1)
5
+ dotenv-deployment (~> 0.0.2)
6
+ dotenv-deployment (0.0.2)
7
+ foreman (0.74.0)
8
+ dotenv (~> 0.11.1)
9
+ thor (~> 0.19.1)
10
+ thor (0.19.1)
17
11
 
18
12
  PLATFORMS
19
13
  ruby
20
14
 
21
15
  DEPENDENCIES
22
- gitlab-grack!
23
- mocha (~> 0.11)
24
- rack-test
25
- rake
16
+ foreman
@@ -0,0 +1,153 @@
1
+ gitlab_repo = https://gitlab.com/gitlab-org/gitlab-ce.git
2
+ gitlab_shell_repo = https://gitlab.com/gitlab-org/gitlab-shell.git
3
+ gitlab_ci_repo = https://gitlab.com/gitlab-org/gitlab-ci.git
4
+ gitlab_runner_repo = https://gitlab.com/gitlab-org/gitlab-ci-runner.git
5
+ gitlab_development_root = $(shell pwd)
6
+ postgres_bin_dir = $(shell pg_config --bindir)
7
+
8
+ all: gitlab-setup gitlab-shell-setup gitlab-ci-setup gitlab-runner-setup support-setup
9
+
10
+ # Set up the GitLab Rails app
11
+
12
+ gitlab-setup: gitlab/.git gitlab-config gitlab/.bundle
13
+
14
+ gitlab/.git:
15
+ git clone ${gitlab_repo} gitlab
16
+
17
+ gitlab-config: gitlab/config/gitlab.yml gitlab/config/database.yml gitlab/config/unicorn.rb gitlab/config/resque.yml
18
+
19
+ gitlab/config/gitlab.yml:
20
+ sed -e "s|/home/git|${gitlab_development_root}|"\
21
+ gitlab/config/gitlab.yml.example > gitlab/config/gitlab.yml
22
+ support/edit-gitlab.yml gitlab/config/gitlab.yml
23
+
24
+ gitlab/config/database.yml:
25
+ sed "s|/home/git|${gitlab_development_root}|" database.yml.example > gitlab/config/database.yml
26
+
27
+ gitlab/config/unicorn.rb:
28
+ cp gitlab/config/unicorn.rb.example.development gitlab/config/unicorn.rb
29
+
30
+ gitlab/config/resque.yml:
31
+ sed "s|/home/git|${gitlab_development_root}|" redis/resque.yml.example > $@
32
+
33
+ gitlab/.bundle:
34
+ cd ${gitlab_development_root}/gitlab && bundle install --without mysql production --jobs 4
35
+
36
+ # Set up gitlab-shell
37
+
38
+ gitlab-shell-setup: gitlab-shell/.git gitlab-shell/config.yml gitlab-shell/.bundle
39
+
40
+ gitlab-shell/.git:
41
+ git clone ${gitlab_shell_repo} gitlab-shell
42
+
43
+ gitlab-shell/config.yml:
44
+ sed -e "s|/home/git|${gitlab_development_root}|"\
45
+ -e "s|:8080/|:3000|"\
46
+ -e "s|/usr/bin/redis-cli|$(shell which redis-cli)|"\
47
+ -e "s|^ socket: .*| socket: ${gitlab_development_root}/redis/redis.socket|"\
48
+ gitlab-shell/config.yml.example > gitlab-shell/config.yml
49
+
50
+ gitlab-shell/.bundle:
51
+ cd ${gitlab_development_root}/gitlab-shell && bundle install --without production --jobs 4
52
+
53
+ # Set up gitlab-ci
54
+ gitlab-ci-setup: gitlab-ci/.git gitlab-ci-config gitlab-ci/.bundle
55
+
56
+ gitlab-ci/.git:
57
+ git clone ${gitlab_ci_repo} gitlab-ci
58
+
59
+ gitlab-ci-config: gitlab-ci/config/application.yml gitlab-ci/config/database.yml gitlab-ci/config/resque.yml gitlab-ci/config/unicorn.rb
60
+
61
+ gitlab-ci/config/application.yml:
62
+ cp gitlab-ci/config/application.yml.example.development $@
63
+
64
+ gitlab-ci/config/database.yml:
65
+ sed -e "s|gitlabhq|gitlabci|"\
66
+ -e "s|/home/git|${gitlab_development_root}|"\
67
+ database.yml.example > $@
68
+
69
+ gitlab-ci/config/resque.yml:
70
+ sed "s|/home/git|${gitlab_development_root}|" redis/resque.yml.example > $@
71
+
72
+ gitlab-ci/config/unicorn.rb:
73
+ cp gitlab-ci/config/unicorn.rb.example.development $@
74
+
75
+ gitlab-ci/.bundle:
76
+ cd ${gitlab_development_root}/gitlab-ci && bundle install --without mysql production --jobs 4
77
+
78
+ gitlab-ci-clean:
79
+ rm -rf gitlab-ci
80
+
81
+ # Set up gitlab-runner
82
+ gitlab-runner-setup: gitlab-runner/.git gitlab-runner/.bundle
83
+
84
+ gitlab-runner/.git:
85
+ git clone ${gitlab_runner_repo} gitlab-runner
86
+
87
+ gitlab-runner/.bundle:
88
+ cd ${gitlab_development_root}/gitlab-runner && bundle install --jobs 4
89
+
90
+ gitlab-runner-clean:
91
+ rm -rf gitlab-runner
92
+
93
+ # Update gitlab, gitlab-shell, gitlab-ci and gitlab-runner
94
+
95
+ update: gitlab-update gitlab-shell-update gitlab-ci-update gitlab-runner-update
96
+
97
+ gitlab-update: gitlab/.git/pull
98
+ cd ${gitlab_development_root}/gitlab && \
99
+ bundle install --without mysql production --jobs 4 && \
100
+ bundle exec rake db:migrate
101
+
102
+ gitlab-shell-update: gitlab-shell/.git/pull
103
+ cd ${gitlab_development_root}/gitlab-shell && \
104
+ bundle install --without production --jobs 4
105
+
106
+ gitlab-ci-update: gitlab-ci/.git/pull
107
+ cd ${gitlab_development_root}/gitlab-ci && \
108
+ bundle install --without mysql production --jobs 4 && \
109
+ bundle exec rake db:migrate
110
+
111
+ gitlab-runner-update: gitlab-runner/.git/pull
112
+ cd ${gitlab_development_root}/gitlab-runner && \
113
+ bundle install
114
+
115
+ gitlab/.git/pull:
116
+ cd ${gitlab_development_root}/gitlab && git pull --ff-only
117
+
118
+ gitlab-shell/.git/pull:
119
+ cd ${gitlab_development_root}/gitlab-shell && git pull --ff-only
120
+
121
+ gitlab-ci/.git/pull:
122
+ cd ${gitlab_development_root}/gitlab-ci && git pull --ff-only
123
+
124
+ gitlab-runner/.git/pull:
125
+ cd ${gitlab_development_root}/gitlab-runner && git pull --ff-only
126
+
127
+ # Set up supporting services
128
+
129
+ support-setup: Procfile redis postgresql .bundle
130
+ @echo ""
131
+ @echo "*********************************************"
132
+ @echo "************** Setup finished! **************"
133
+ @echo "*********************************************"
134
+ sed -n '/^### Post-installation/,/^END Post-installation/p' README.md
135
+ @echo "*********************************************"
136
+
137
+ Procfile:
138
+ sed -e "s|/home/git|${gitlab_development_root}|g"\
139
+ -e "s|postgres |${postgres_bin_dir}/postgres |"\
140
+ $@.example > $@
141
+
142
+ redis: redis/redis.conf
143
+
144
+ redis/redis.conf:
145
+ sed "s|/home/git|${gitlab_development_root}|" $@.example > $@
146
+
147
+ postgresql: postgresql/data/PG_VERSION
148
+
149
+ postgresql/data/PG_VERSION:
150
+ ${postgres_bin_dir}/initdb -E utf-8 postgresql/data
151
+
152
+ .bundle:
153
+ bundle install --jobs 4
@@ -0,0 +1,3 @@
1
+ redis: redis-server /home/git/redis/redis.conf
2
+ postgresql: postgres -D /home/git/postgresql/data -k /home/git/postgresql -h ''
3
+ #openldap: cd gitlab-openldap && libexec/slapd -F slapd.d -d2 -h "ldap://127.0.0.1:3890"
data/README.md CHANGED
@@ -1,95 +1,292 @@
1
- Grack - Ruby/Rack Git Smart-HTTP Server Handler
2
- ===============================================
3
-
4
- [![Build Status](https://travis-ci.org/gitlabhq/grack.png)](https://travis-ci.org/gitlabhq/grack)
5
- [![Code Climate](https://codeclimate.com/github/gitlabhq/grack.png)](https://codeclimate.com/github/gitlabhq/grack)
6
-
7
- This project aims to replace the builtin git-http-backend CGI handler
8
- distributed with C Git with a Rack application. This reason for doing this
9
- is to allow far more webservers to be able to handle Git smart http requests.
10
-
11
- The default git-http-backend only runs as a CGI script, and specifically is
12
- only targeted for Apache 2.x usage (it requires PATH_INFO to be set and
13
- specifically formatted). So, instead of trying to get it to work with
14
- other CGI capable webservers (Lighttpd, etc), we can get it running on nearly
15
- every major and minor webserver out there by making it Rack capable. Rack
16
- applications can run with the following handlers:
17
-
18
- * CGI
19
- * FCGI
20
- * Mongrel (and EventedMongrel and SwiftipliedMongrel)
21
- * WEBrick
22
- * SCGI
23
- * LiteSpeed
24
- * Thin
25
-
26
- These web servers include Rack handlers in their distributions:
27
-
28
- * Ebb
29
- * Fuzed
30
- * Phusion Passenger (which is mod_rack for Apache and for nginx)
31
- * Unicorn
32
- * Puma
33
-
34
- With [Warbler](http://caldersphere.rubyforge.org/warbler/classes/Warbler.html),
35
- and JRuby, we can also generate a WAR file that can be deployed in any Java
36
- web application server (Tomcat, Glassfish, Websphere, JBoss, etc).
37
-
38
- Since the git-http-backend is really just a simple wrapper for the upload-pack
39
- and receive-pack processes with the '--stateless-rpc' option, it does not
40
- actually re-implement very much.
41
-
42
- Dependencies
43
- ========================
44
- * Ruby - http://www.ruby-lang.org
45
- * Rack - http://rack.rubyforge.org
46
- * A Rack-compatible web server
47
- * Git >= 1.7 (currently the 'pu' branch)
48
- * Mocha (only for running the tests)
49
-
50
- Quick Start
51
- ========================
52
- $ gem install rack
53
- $ (edit config.ru to set git project path)
54
- $ rackup --host 127.0.0.1 -p 8080 config.ru
55
- $ git clone http://127.0.0.1:8080/schacon/grit.git
56
-
57
- Contributing
58
- ========================
59
- If you would like to contribute to the Grack project, I prefer to get
60
- pull-requests via GitHub. You should include tests for whatever functionality
61
- you add. Just fork this project, push your changes to your fork and click
62
- the 'pull request' button. To run the tests, you first need to install the
63
- 'mocha' mocking library and initialize the submodule.
64
-
65
- $ sudo gem install mocha
66
- $ git submodule init
67
- $ git submodule update
68
-
69
- Then you should be able to run the tests with a 'rake' command. You can also
70
- run coverage tests with 'rake rcov' if you have rcov installed.
71
-
72
- License
73
- ========================
74
- (The MIT License)
75
-
76
- Copyright (c) 2009 Scott Chacon <schacon@gmail.com>
77
-
78
- Permission is hereby granted, free of charge, to any person obtaining
79
- a copy of this software and associated documentation files (the
80
- 'Software'), to deal in the Software without restriction, including
81
- without limitation the rights to use, copy, modify, merge, publish,
82
- distribute, sublicense, and/or sell copies of the Software, and to
83
- permit persons to whom the Software is furnished to do so, subject to
84
- the following conditions:
85
-
86
- The above copyright notice and this permission notice shall be
87
- included in all copies or substantial portions of the Software.
88
-
89
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
90
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
91
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
92
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
93
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
94
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
95
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ # GitLab Development Kit
2
+
3
+ The GDK runs a GitLab development environment isolated in a directory.
4
+ This environemnt contains GitLab CE, CI and Runner.
5
+ This project uses Foreman to run dedicated Postgres and Redis processes for
6
+ GitLab development. All data is stored inside the gitlab-development-kit
7
+ directory. All connections to supporting services go through Unix domain
8
+ sockets to avoid port conflicts.
9
+
10
+ ## Design goals
11
+
12
+ - Get the user started, do not try to take care of everything
13
+ - Run everything as your 'desktop' user on your development machine
14
+ - GitLab Development Kit itself does not run `sudo` commands
15
+ - It is OK to leave some things to the user (e.g. installing Ruby)
16
+
17
+ ## Installation
18
+
19
+ The preferred way to use GitLab Development Kit is to install Ruby and dependencies on your 'native' OS.
20
+ We strongly recommend the native install since it is much faster that a virtualized one.
21
+ If you want to use [Vagrant](https://www.vagrantup.com/) instead please see [the instructions for our (experimental) Vagrantfile](#vagrant).
22
+ **DO NOT** run the installation as a root user
23
+
24
+ ### Install dependencies
25
+
26
+ #### Prerequisites for all platforms
27
+
28
+ If you do not have the dependencies below you will experience strange errors during installation.
29
+
30
+ 1. Ruby 2.1.5 with your method of choice (RVM, ruby-build, rbenv, chruby, etc.)
31
+ 1. Bundler `gem install bundler`
32
+
33
+ #### OS X 10.9
34
+
35
+ ```
36
+ brew tap homebrew/dupes
37
+ brew install redis postgresql phantomjs libiconv icu4c pkg-config cmake nodejs
38
+ bundle config build.nokogiri --with-iconv-dir=/usr/local/opt/libiconv
39
+ ```
40
+
41
+ #### Ubuntu
42
+
43
+ ```
44
+ sudo apt-get install postgresql libpq-dev phantomjs redis-server libicu-dev cmake g++ nodejs libkrb5-dev
45
+ ```
46
+
47
+ #### Arch Linux
48
+
49
+ ```
50
+ sudo pacman -S postgresql phantomjs redis postgresql-libs icu nodejs
51
+ ```
52
+
53
+ #### Debian
54
+
55
+ Please contribute this by sending a merge request.
56
+
57
+ #### RedHat
58
+
59
+ Please contribute this by sending a merge request.
60
+
61
+ ### Clone GitLab Development Kit repository
62
+
63
+ ```
64
+ git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git
65
+ cd gitlab-development-kit
66
+ ```
67
+
68
+ ### Install the repositories and gems
69
+
70
+ The Makefile will clone the repositories, install the Gem bundles and set up
71
+ basic configuration files.
72
+
73
+ ```
74
+ # Clone the official repositories of gitlab and gitlab-shell
75
+ make
76
+ ```
77
+
78
+ Alternatively, you can clone straight from your forked repositories or GitLab EE.
79
+
80
+ ```
81
+ # Clone your own forked repositories
82
+ make gitlab_repo=git@gitlab.com:example/gitlab-ce.git gitlab_shell_repo=git@gitlab.com:example/gitlab-shell.git
83
+ ```
84
+
85
+ ### Post-installation
86
+
87
+ Start Redis and PostgreSQL by running the command below.
88
+
89
+ bundle exec foreman start
90
+
91
+ Seed the main GitLab database:
92
+
93
+ cd gitlab && bundle exec rake db:create dev:setup
94
+
95
+ Finally, start the main GitLab rails application:
96
+
97
+ bundle exec foreman start
98
+
99
+ Now you can go to http://localhost:3000 in your browser.
100
+ The development login credentials are `root` and `5iveL!fe`
101
+
102
+ If you want to work on GitLab CI, first seed the GitLab CI database:
103
+
104
+ cd gitlab-ci && bundle exec rake db:create db:setup
105
+
106
+ To start the GitLab CI rails application:
107
+
108
+ bundle exec foreman start
109
+
110
+ Setup the GitLab Runner:
111
+
112
+ cd gitlab-runner
113
+ CI_SERVER_URL=http://localhost:9000 bundle exec ./bin/setup
114
+
115
+ Start the GitLab Runner:
116
+
117
+ bundle exec ./bin/runner
118
+
119
+ To enable the OpenLDAP server, see the OpenLDAP instructions in this readme.
120
+
121
+ END Post-installation
122
+
123
+ Please do not delete the 'END Post-installation' line above. It is used to
124
+ print the post-installation message from the Makefile.
125
+
126
+ ### Vagrant
127
+
128
+ [Vagrant](http://www.vagrantup.com) is a tool for setting up identical development
129
+ environments including all dependencies. Vagrant will default to using
130
+ [VirtualBox](http://www.virtualbox.org), but it has many plugins for different
131
+ environments.
132
+
133
+ Vagrant allows you to develop GitLab without affecting your host machine.
134
+ But we recommend developing GitLab on metal if you can.
135
+ Vagrant can be very slow since the NFS server is on the host OS.
136
+ And GitLab (testing) accesses a lot of files.
137
+ You can improve the speed by running NFS on the guest OS.
138
+ In this case you should take care to not lose the files when you shut down the VM.
139
+
140
+ Once you have Vagrant installed, simply type `vagrant up` in this directory. Vagrant
141
+ will download an OS image, bring it up, and install all the prerequisites. You then
142
+ type `vagrant ssh` to ssh into the box. This directory will be available as a shared
143
+ folder in `/vagrant/` and you can continue at *Install the repositories and gems*
144
+ below.
145
+
146
+ Typically you keep editing on the host machine but run `make`, `bundle exec` etc.
147
+ inside the `vagrant ssh` session.
148
+
149
+ Note: On some setups the shared folder will have the wrong user. This is detected
150
+ by the Vagrantfile and you should `sudo su - build` to switch to the correct user
151
+ in that case.
152
+
153
+ ## Development
154
+
155
+ When doing development, you will need one shell session (terminal window)
156
+ running Postgres and Redis, and one or more other sessions to work on GitLab
157
+ itself.
158
+
159
+ ### Example
160
+
161
+ First start Postgres and Redis.
162
+
163
+ ```
164
+ # terminal window 1
165
+ # current directory: gitlab-development-kit
166
+ bundle exec foreman start
167
+ ```
168
+
169
+ Next, start a Rails development server.
170
+
171
+ ```
172
+ # terminal window 2
173
+ # current directory: gitlab-development-kit/gitlab
174
+ bundle exec foreman start
175
+ ```
176
+
177
+ Now you can go to http://localhost:3000 in your browser.
178
+ The development login credentials are `root` and `5iveL!fe`
179
+
180
+ ### Running the tests
181
+
182
+ In order to run the test you can use the following commands:
183
+ - `rake spinach` to run the spinach suite
184
+ - `rake spec` to run the rspec suite
185
+ - `rake jasmine:ci` to run the jasmine test suite
186
+ - `rake gitlab:test` to run all the tests
187
+
188
+ Note: You can't run `rspec .` since this will try to run all the `_spec.rb`
189
+ files it can find, also the ones in `/tmp`
190
+
191
+ To run a single test file you can use:
192
+
193
+ - `bundle exec rspec spec/controllers/commit_controller_spec.rb` for a rspec test
194
+ - `bundle exec spinach features/project/issues/milestones.feature` for a spinach test
195
+
196
+ ## Update gitlab and gitlab-shell repositories
197
+
198
+ When working on a new feature, always check that your `gitlab` repository is up
199
+ to date with the upstream master branch.
200
+
201
+ In order to fetch the latest code, first make sure that `foreman` for
202
+ postgres is runnning (needed for db migration) and then run:
203
+
204
+ ```
205
+ make update
206
+ ```
207
+
208
+ This will update both `gitlab`, `gitlab-ci` and `gitlab-shell` and run any possible migrations.
209
+ You can also update them separately by running `make gitlab-update` `make gitlab-ci-update` and
210
+ `make gitlab-shell-update` respectively.
211
+
212
+ ## OpenLDAP
213
+
214
+ To run the OpenLDAP installation included in the GitLab development kit do the following:
215
+
216
+ ```
217
+ vim Procfile # remove the comment on the OpenLDAP line
218
+ cd gitlab-openldap
219
+ make # will setup the databases
220
+ ```
221
+
222
+ in the gitlab repository edit config/gitlab.yml;
223
+
224
+ ```yaml
225
+ ldap:
226
+ enabled: true
227
+ servers:
228
+ main:
229
+ label: LDAP
230
+ host: 127.0.0.1
231
+ port: 3890
232
+ uid: 'uid'
233
+ method: 'plain' # "tls" or "ssl" or "plain"
234
+ base: 'dc=example,dc=com'
235
+ user_filter: ''
236
+ group_base: 'ou=groups,dc=example,dc=com'
237
+ admin_group: ''
238
+ # Alternative server, multiple LDAP servers only work with GitLab-EE
239
+ # alt:
240
+ # label: LDAP-alt
241
+ # host: 127.0.0.1
242
+ # port: 3890
243
+ # uid: 'uid'
244
+ # method: 'plain' # "tls" or "ssl" or "plain"
245
+ # base: 'dc=example-alt,dc=com'
246
+ # user_filter: ''
247
+ # group_base: 'ou=groups,dc=example-alt,dc=com'
248
+ # admin_group: ''
249
+ ```
250
+
251
+ The second database is optional, and will only work with Gitlab-EE.
252
+
253
+ ## Troubleshooting
254
+
255
+ ### Rails cannot connect to Postgres
256
+
257
+ - Check if foreman is running in the gitlab-development-kit directory.
258
+ - Check for custom Postgres connection settings defined via the environment; we
259
+ assume none such variables are set. Look for them with `set | grep '^PG'`.
260
+
261
+ ### 'LoadError: dlopen' when starting Ruby apps
262
+
263
+ This can happen when you try to load a Ruby gem with native extensions that
264
+ were linked against a system library that is no longer there. A typical culprit
265
+ is Homebrew on OS X, which encourages frequent updates (`brew update && brew
266
+ upgrade`) which may break binary compatibility.
267
+
268
+ ```
269
+ bundle exec rake db:create gitlab:setup
270
+ rake aborted!
271
+ LoadError: dlopen(/Users/janedoe/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/charlock_holmes-0.6.9.4/charlock_holmes/charlock_holmes.bundle, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.52.1.dylib
272
+ Referenced from: /Users/janedoe/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/charlock_holmes-0.6.9.4/charlock_holmes/charlock_holmes.bundle
273
+ Reason: image not found - /Users/janedoe/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/charlock_holmes-0.6.9.4/charlock_holmes/charlock_holmes.bundle
274
+ /Users/janedoe/gitlab-development-kit/gitlab/config/application.rb:6:in `<top (required)>'
275
+ /Users/janedoe/gitlab-development-kit/gitlab/Rakefile:5:in `require'
276
+ /Users/janedoe/gitlab-development-kit/gitlab/Rakefile:5:in `<top (required)>'
277
+ (See full trace by running task with --trace)
278
+ ```
279
+
280
+ In the above example, you see that the charlock_holmes gem fails to load
281
+ `libicui18n.52.1.dylib`. You can try fixing this by re-installing
282
+ charlock_holmes:
283
+
284
+ ```
285
+ # in /Users/janedoe/gitlab-development-kit
286
+ gem uninstall charlock_holmes
287
+ bundle install # should reinstall charlock_holmes
288
+ ```
289
+
290
+ ### Other problems
291
+
292
+ Please open an issue on the [GDK issue tracker](https://gitlab.com/gitlab-org/gitlab-development-kit/issues).