forked from metal-stack/mini-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (63 loc) · 2.27 KB
/
docker-compose.yml
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
---
version: '3.7'
services:
control-plane:
image: metalstack/metal-deployment-base:v0.0.2
container_name: deploy-control-plane
volumes:
- /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock
- /var/run/docker.sock:/var/run/docker.sock
- .:/mini-lab
# for developing role dependencies
# TODO: make this a switch
# - ${HOME}/.ansible/roles/ansible-common:/root/.ansible/roles/ansible-common:ro
# - ${HOME}/.ansible/roles/metal-roles:/root/.ansible/roles/metal-roles:ro
environment:
- ANSIBLE_CONFIG=/mini-lab/ansible.cfg
- KUBECONFIG=/mini-lab/.kubeconfig
- K8S_AUTH_KUBECONFIG=/mini-lab/.kubeconfig
network_mode: host
working_dir: /mini-lab
entrypoint:
- /bin/bash
- -ce
- |
ansible-galaxy install --ignore-errors -r control-plane/requirements.yaml
ansible-playbook \
-i control-plane/inventory.yaml \
control-plane.yaml
partition:
image: metalstack/metal-deployment-base:v0.0.2
container_name: deploy-partition
volumes:
- ${HOME}/.vagrant.d:/root/.vagrant.d
- /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock
- /var/run/docker.sock:/var/run/docker.sock
- .:/mini-lab
# for developing role dependencies
# TODO: make this a switch
# - ${HOME}/.ansible/roles/ansible-common:/root/.ansible/roles/ansible-common:ro
# - ${HOME}/.ansible/roles/metal-roles:/root/.ansible/roles/metal-roles:ro
environment:
- ANSIBLE_CONFIG=/mini-lab/ansible.cfg
- ANSIBLE_VAGRANT_USE_CACHE=1
- ANSIBLE_VAGRANT_CACHE_FILE=/mini-lab/.ansible_vagrant_cache
- ANSIBLE_VAGRANT_CACHE_MAX_AGE=0
network_mode: host
working_dir: /mini-lab
entrypoint:
- /bin/bash
- -ce
- |
ansible-galaxy install --ignore-errors -r partition/requirements.yaml
ansible-playbook \
-i partition/static_inventory.yaml \
-i ~/.ansible/roles/ansible-common/inventory/vagrant \
partition.yaml
metalctl:
image: registry.fi-ts.io/metal/metalctl:${METALCTL_IMAGE_TAG}
environment:
- METALCTL_HMAC=metal-admin
- METALCTL_URL=http://api.192.168.121.1.xip.io:8080/metal
network_mode: host
command: --version