OSDN Git Service

adds the devops-suite-on-docker role.
[metasearch/grid-chef-repo.git] / roles / concourse-on-docker.rb
1 name 'concourse-on-docker'
2 description 'Concourse on Docker'
3
4 image = 'concourse/concourse'
5 #port = '8080'  # '8443' (for https)
6 #concourse_cn = 'concourse.io.example.com'
7
8 run_list(
9   #'recipe[ssl_cert::server_key_pairs]',  # for https
10   'role[docker]',
11   'recipe[concourse-ci::docker-compose]',
12   #'recipe[concourse-ci::fly]',
13 )
14
15 #env_run_lists()
16
17 #default_attributes()
18
19 override_attributes(
20   # for https
21   'ssl_cert' => {
22     'common_names' => [
23       #concourse_cn,
24     ],
25   },
26   'docker-grid' => {
27     'engine' => {
28       'skip_setup' => false,
29     },
30     'compose' => {
31       'skip_setup' => false,
32     },
33   },
34   'concourse-ci' => {
35     'with_ssl_cert_cookbook' => false,  # or true (for https)
36     'ssl_cert' => {
37       #'common_name' => concourse_cn,
38     },
39     'docker-compose' => {
40       'config' => {
41         # Version 1 docker-compose format
42         'concourse-web' => {
43           'image' => image,
44           'ports' => [
45             #"#{port}:8080",  # If you sepecify no value, Chef will sets '8080:8080'.
46             #"#{port}:8443",  # for https
47           ],
48           'environment' => {
49             # If you sepecify no value, Chef will sets "http://#{node['ipaddress']}:8080".
50             #'CONCOURSE_EXTERNAL_URL' => "http://192.168.1.3:#{port}",  # or "https://192.168.1.3:#{port}"
51             #'CONCOURSE_TLS_BIND_PORT' => '8443',  # activate HTTPS
52             # These environments will be set by the concourse-ci::docker-compose recipe automatically.
53             #'CONCOURSE_TLS_CERT' => '/root/server.crt',
54             #'CONCOURSE_TLS_KEY' => '/root/server.key',
55           },
56           'volumes' => [
57             # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
58             #"#{server_cert_path(node['concourse-ci']['ssl_cert']['common_name'])}:/root/server.crt:ro",
59             #"#{server_key_path(node['concourse-ci']['ssl_cert']['common_name'])}:/root/server.key:ro",
60           ],
61         },
62         'concourse-worker' => {
63           'image' => image,
64         },
65       },
66     },
67   },
68 )