OSDN Git Service

add yarn-installer recipe to the nodejs_utils cookbook.
[metasearch/grid-chef-repo.git] / roles / gitlab-on-docker.rb
1 #
2 # Copyright 2017, whitestar
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 name 'gitlab-on-docker'
18 description 'GitLab on Docker'
19
20 #gitlab_cn = 'gitlab.io.example.com'  # default: node['fqdn']
21 #gitlab_http_port = '80'  # default: 80, and 8080 already in use.
22 #gitlab_ssh_port = '2022'
23
24 run_list(
25   'role[docker]',
26   'recipe[gitlab-grid::docker-compose]',
27   'recipe[platform_utils::sysctl]',
28 )
29
30 #env_run_lists()
31
32 #default_attributes()
33
34 override_attributes(
35   'docker-grid' => {
36     'engine' => {
37       'skip_setup' => false,
38     },
39     'compose' => {
40       'skip_setup' => false,
41     },
42   },
43   'gitlab-grid' => {
44     'gitlab.rb' => {
45       #'external_url' => "http://#{gitlab_cn}:#{gitlab_http_port}",
46       'gitlab_rails' => {
47         #'time_zone' => 'Asia/Tokyo',
48         #'gitlab_shell_ssh_port' => gitlab_ssh_port.to_i,
49       },
50     },
51     'docker-compose' => {
52       'config' => {
53         'services' => {
54           'gitlab' => {
55             #'hostname' => gitlab_cn,
56             #'ports' => [
57               #"#{gitlab_http_port}:#{gitlab_http_port}",
58               #"#{gitlab_ssh_port}:22",
59             #],
60           },
61         },
62       },
63     },
64   },
65   'platform_utils' => {
66     'sysctl' => {
67       'configs' => {
68         '80-gitlab' => {
69           'action' => :create,
70           'params' => {
71             'vm.swappiness' => '10',  # default: '60'
72           },
73         },
74       },
75     },
76   },
77 )