-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcompose.yaml
89 lines (87 loc) · 3.05 KB
/
compose.yaml
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
87
88
89
---
services:
control-plane:
image: ghcr.io/metal-stack/metal-deployment-base:${DEPLOYMENT_BASE_IMAGE_TAG}
container_name: deploy-control-plane
volumes:
- /var/run/docker.sock:/var/run/docker.sock:z
- .:/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
# - ${HOME}/.ansible/roles/metal-ansible-modules:/root/.ansible/roles/metal-ansible-modules:ro
# - ${HOME}/git/github.com/metal-stack/helm-charts:/helm-charts:ro
environment:
- ANSIBLE_CONFIG=/mini-lab/ansible.cfg
- KUBECONFIG=/mini-lab/.kubeconfig
- K8S_AUTH_KUBECONFIG=/mini-lab/.kubeconfig
- CI=${CI}
- DOCKER_HUB_USER=${DOCKER_HUB_USER}
- DOCKER_HUB_TOKEN=${DOCKER_HUB_TOKEN}
network_mode: host
working_dir: /mini-lab
dns:
- 172.17.0.1
- 1.1.1.1
- 1.0.0.1
entrypoint:
- /bin/bash
- -ce
- |
ansible-playbook \
-i inventories/control-plane.yaml \
obtain_role_requirements.yaml
ansible-galaxy install --ignore-errors -r requirements.yaml
ansible-playbook \
-i inventories/control-plane.yaml \
deploy_control_plane.yaml --extra-vars "@.extra_vars.yaml"
partition:
image: ghcr.io/metal-stack/metal-deployment-base:${DEPLOYMENT_BASE_IMAGE_TAG}
container_name: deploy-partition
volumes:
- /var/run/docker.sock:/var/run/docker.sock:z
- .:/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
# - ${HOME}/.ansible/roles/metal-ansible-modules:/root/.ansible/roles/metal-ansible-modules:ro
environment:
- ANSIBLE_CONFIG=/mini-lab/ansible.cfg
- CI=${CI}
- DOCKER_HUB_USER=${DOCKER_HUB_USER}
- DOCKER_HUB_TOKEN=${DOCKER_HUB_TOKEN}
network_mode: host
working_dir: /mini-lab
dns:
- 172.17.0.1
- 1.1.1.1
- 1.0.0.1
entrypoint:
- /bin/bash
- -ce
- |
ansible-playbook \
-i inventories/control-plane.yaml \
obtain_role_requirements.yaml
ansible-galaxy install --ignore-errors -r requirements.yaml
ansible-playbook \
-i inventories/partition.yaml \
-i clab-mini-lab/ansible-inventory.yml \
deploy_partition.yaml --extra-vars "@.extra_vars.yaml"
metalctl:
image: ghcr.io/metal-stack/metalctl:${METALCTL_IMAGE_TAG}
environment:
- METALCTL_HMAC=metal-admin
- METALCTL_API_URL=http://api.172.17.0.1.nip.io:8080/metal
volumes:
- ./files/ssh:/root/.ssh:ro
- ./files/ignition.json:/tmp/ignition.json
- ./files/rules.yaml:/tmp/rules.yaml
network_mode: host
dns:
- 172.17.0.1
- 1.1.1.1
- 1.0.0.1
command: --version