OSDN Git Service

adds the hc-vault cookbook.
[metasearch/grid-chef-repo.git] / roles / vault-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 'vault-on-docker'
18 description 'vault on Docker'
19
20 #vault_cn = 'vault.io.example.com'  # default: node['fqdn']
21 #vault_port = '8200'  # default: 8200
22
23 run_list(
24   'role[docker]',
25   'recipe[hc-vault::docker-compose]',
26 )
27
28 #env_run_lists()
29
30 #default_attributes()
31
32 override_attributes(
33   'docker-grid' => {
34     'engine' => {
35       'skip_setup' => false,
36     },
37     'compose' => {
38       'skip_setup' => false,
39     },
40   },
41   'hc-vault' => {
42     'config' => {
43       #'default_lease_ttl' => '768h',
44       #'max_lease_ttl' => '768h',
45     },
46     'docker-compose' => {
47       'config' => {
48         'services' => {
49           'vault' => {
50             #'ports' => [
51             #  "#{vault_port}:8200",
52             #],
53             'environment' => {
54               #'VAULT_LOCAL_CONFIG' => '',  # expanded to /vault/config/local.json
55             },
56           },
57         },
58       },
59     },
60   },
61 )