This repository was archived by the owner on Mar 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.kitchen.yml
More file actions
86 lines (81 loc) · 2.71 KB
/
Copy path.kitchen.yml
File metadata and controls
86 lines (81 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#
# Copyright (c) 2015-2016 Sam4Mobile
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
# Customize Kitchen with some monkey patching:
# - Suites scheduler
# <% load "#{File.dirname(__FILE__)}/test/kitchen_command.rb" %>
# - Create kitchen network if missing
# <% net_test = '! docker network ls | grep "kitchen" >/dev/null 2>&1' %>
# <% net_create = 'docker network create --driver bridge kitchen' %>
# <% `if #{net_test}; then #{net_create}; fi` %>
driver:
name: docker_cli
transport:
name: docker_cli
provisioner:
name: chef_zero
platforms:
- name: centos-7
driver_config:
image: sbernard/centos-systemd-kitchen
privileged: true # glusterfs need it (for xattr) to mount volumes
volume: /sys/fs/cgroup:/sys/fs/cgroup:ro
command: /usr/lib/systemd/systemd
network: kitchen
skip_preparation: true
suites:
<% { 'glusterfs' => 3 }.each do |name, n| %>
<% ("1".."#{n}").each do |i| %>
- name: <%= name %>-<%= i %>
driver:
hostname: <%= name %>-kitchen-<%= i %>.kitchen
container_name: <%= name %>-kitchen-<%= i %>
run_list:
- role[<%= name %>-kitchen]
attributes:
glusterfs:
initiator_id: 3
package_retries: 1
peer_wait_retries: 10
peer_wait_retry_delay: 5
mounts:
myvol:
mount_point: '/mnt/data'
server: 'glusterfs-kitchen-3.kitchen'
volumes:
myvol:
type: 'disperse'
count: 3
redundancy: 1
transport_type: 'tcp'
mount_points: [[
'glusterfs-kitchen-1:/mnt/brick1',
'glusterfs-kitchen-2:/mnt/brick2',
'glusterfs-kitchen-3:/mnt/brick3',
'glusterfs-kitchen-1:/mnt/brick4',
'glusterfs-kitchen-2:/mnt/brick5',
'glusterfs-kitchen-3:/mnt/brick6',
'glusterfs-kitchen-1:/mnt/brick7',
'glusterfs-kitchen-2:/mnt/brick8',
'glusterfs-kitchen-3:/mnt/brick9',
'glusterfs-kitchen-1:/mnt/brick10',
'glusterfs-kitchen-2:/mnt/brick11',
'glusterfs-kitchen-3:/mnt/brick12'
]]
action: [['create', 'start']]
force: true
<% end %>
<% end %>