OSDN Git Service

add .envrc
[metasearch/grid-chef-repo.git] / roles / gitlab-runner.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-runner'
18 description 'GitLab-runner'
19
20 ca_name = 'grid_ca'  # Internal CA
21
22 run_list(
23   #'recipe[ssl_cert::ca_certs]',
24   'role[docker]',
25   'recipe[gitlab-grid::runner-docker-compose]',
26 )
27
28 #env_run_lists()
29
30 #default_attributes()
31
32 override_attributes(
33   'ssl_cert' => {
34     'ca_names' => [
35       ca_name,
36     ],
37   },
38   'gitlab-grid' => {
39     #'with_ssl_cert_cookbook' => true,
40     'ssl_cert' => {
41       'ca_name' => ca_name,
42     },
43     'runner-docker-compose' => {
44       #'import_ca' => true,
45       'config' => {
46         'services' => {
47           'runner' => {
48             'volumes' => [
49               # for Docker executor
50               '/var/run/docker.sock:/var/run/docker.sock',
51             ],
52           },
53         },
54       },
55     },
56   },
57 )