Skip to content

Commit 2e863cb

Browse files
committed
New Docker recipe
1 parent 855a9a5 commit 2e863cb

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ This installs and starts GitLab with nginx and your chosen database.
258258

259259
This installs GitLab Runner. This does not have to be on the same system, in fact GitLab recommend against it.
260260

261+
## docker
262+
263+
This installs Docker and creates a `gitlab` service for it. It includes the `runner` recipe above.
264+
261265
## mysql, postgres
262266

263267
These are internal, set `gitlab['database']['type']` instead.

metadata.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
).each do |cb_depend|
3030
depends cb_depend
3131
end
32+
depends 'docker', '~> 2.0'
3233
depends 'mysql', '~> 6.0'
3334
depends 'mysql2_chef_gem'
3435
depends 'nginx', '<3'

recipes/docker.rb

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Cookbook Name:: gitlab
3+
# Recipe:: docker
4+
#
5+
# Copyright 2016, Yakara Ltd
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
include_recipe 'gitlab::runner'
21+
22+
docker_service 'gitlab' do
23+
action [:create, :start]
24+
end
25+
26+
group 'docker' do
27+
members 'gitlab-runner'
28+
append true
29+
action :modify
30+
end

0 commit comments

Comments
 (0)