OSDN Git Service

improve the backup and restore scripts.
[metasearch/grid-chef-repo.git] / roles / screwdriver-all-on-docker.rb
1 #
2 # Copyright 2018, 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 'screwdriver-all-on-docker'
18 description 'Screwdriver with all components on Docker'
19
20 # Default ports
21 #ui_port     = '9000'
22 #api_port    = '9001'
23 #store_port  = '9002'
24
25 run_list(
26   'role[screwdriver-on-docker]',
27 )
28
29 override_attributes(
30   'docker-grid' => {
31     'engine' => {
32       #'skip_setup' => true,  # default: false
33     },
34     'compose' => {
35       #'skip_setup' => true,  # default: false
36     },
37   },
38   'screwdriver' => {
39     'api' => {
40       'config' => {
41         'scms' => {
42 =begin
43           # **REQUIRED**: SCM settings
44           'github.com' => {  # id and display name
45             'plugin' => 'github',
46             'config' => {
47               # These 3 secrets should be set by the following `['screwdriver']['api']['scms_vault_items']` attribute.
48               'oauthClientId' => 'YOU-PROBABLY-WANT-SOMETHING-HERE',  # The client id used for OAuth with github. GitHub OAuth (https://developer.github.com/v3/oauth/)
49               'oauthClientSecret' => 'AGAIN-SOMETHING-HERE-IS-USEFUL',  # The client secret used for OAuth with github
50               'secret' => 'SUPER-SECRET-SIGNING-THING',  # Secret to add to GitHub webhooks so that we can validate them
51               #'gheHost' => 'github.screwdriver.cd',  # [Optional] GitHub enterprise host
52               'username' => 'sd-buildbot',  # [Optional] Username for code checkout
53               'email' => 'dev-null@screwdriver.cd',  # [Optional] Email for code checkout
54               'privateRepo' => false,  # [Optional] Set to true to support private repo; will need read and write access to public and private repos (https://developer.github.com/v3/oauth/#scopes)
55             },
56           },
57 =end
58         },
59       },
60     },
61     'store' => {
62       'backend' => 'minio',
63     },
64     'docker-compose' => {
65       'config' => {
66         'services' => {
67           'api' => {
68             'ports' => [
69               #"#{api_port}:80",
70             ],
71             'environment' => {
72               #'NODE_TLS_REJECT_UNAUTHORIZED' => '0',  # for self-signed cetificates
73               # The following variables will be set by the screwdriver::docker-compose recipe automatically.
74               #'ECOSYSTEM_UI' => "http://#{node['fqdn']}:#{ui_port}",
75               #'ECOSYSTEM_STORE' => "http://#{node['fqdn']}:#{store_port}",
76               'DATASTORE_SEQUELIZE_DIALECT' => 'mysql',  # or 'postgres'
77               'EXECUTOR_QUEUE_ENABLED' => 'false',
78             },
79           },
80           'ui' => {
81             'ports' => [
82               #"#{ui_port}:80",
83             ],
84             'environment' => {
85               # These variables will be set by the screwdriver::docker-compose recipe automatically.
86               #'ECOSYSTEM_API' => "http://#{node['fqdn']}:#{api_port}",
87               #'ECOSYSTEM_STORE' => "http://#{node['fqdn']}:#{store_port}",
88             },
89           },
90           'store' => {
91             'ports' => [
92               #"#{store_port}:80",
93             ],
94             'environment' => {
95               # This variable will be set by the screwdriver::docker-compose recipe automatically.
96               #'ECOSYSTEM_UI' => "http://#{node['fqdn']}:#{ui_port}",
97             },
98           },
99         },
100       },
101     },
102   },
103 )