18199edf3b3f8492dfb26beeeb16738537170fa7
[apex-tripleo-heat-templates.git] / Makefile
1 generated_templates =                         \
2         overcloud.yaml                        \
3         overcloud-with-block-storage-nfs.yaml \
4         undercloud-vm.yaml                    \
5         undercloud-bm.yaml                    \
6         undercloud-vm-ironic.yaml
7
8 # Files included in overcloud-source.yaml via FileInclude
9 overcloud_source_deps = nova-compute-instance.yaml
10
11 all: $(generated_templates)
12 VALIDATE := $(patsubst %,validate-%,$(generated_templates))
13 validate-all: $(VALIDATE)
14 $(VALIDATE):
15         heat template-validate -f $(subst validate-,,$@)
16
17 overcloud.yaml: overcloud-source.yaml block-storage.yaml swift-deploy.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml nova-compute-config.yaml $(overcloud_source_deps)
18         python ./tripleo_heat_merge/merge.py --scale NovaCompute=$${COMPUTESCALE:-'1'} --scale controller=$${CONTROLSCALE:-'1'} --scale SwiftStorage=$${SWIFTSTORAGESCALE='0'} --scale BlockStorage=$${BLOCKSTORAGESCALE='0'} overcloud-source.yaml block-storage.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml swift-deploy.yaml nova-compute-config.yaml > $@.tmp
19         mv $@.tmp $@
20
21 overcloud-with-block-storage-nfs.yaml: overcloud-source.yaml block-storage-nfs.yaml nfs-server-source.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml $(overcloud_source_deps)
22         # $^ won't work here because we want to list nova-compute-instance.yaml as
23         # a prerequisite but don't want to pass it into merge.py
24         python ./tripleo_heat_merge/merge.py --scale NovaCompute=$${COMPUTESCALE:-'1'} --scale controller=$${CONTROLSCALE:-'1'} --scale SwiftStorage=$${SWIFTSTORAGESCALE='0'} --scale BlockStorage=$${BLOCKSTORAGESCALE:-'1'} overcloud-source.yaml block-storage-nfs.yaml nfs-server-source.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml > $@.tmp
25         mv $@.tmp $@
26
27 undercloud-vm.yaml: undercloud-source.yaml undercloud-vm-nova-config.yaml undercloud-vm-nova-deploy.yaml
28         python ./tripleo_heat_merge/merge.py $^ > $@.tmp
29         mv $@.tmp $@
30
31 undercloud-bm.yaml: undercloud-source.yaml undercloud-bm-nova-config.yaml undercloud-bm-nova-deploy.yaml
32         python ./tripleo_heat_merge/merge.py $^ > $@.tmp
33         mv $@.tmp $@
34
35 undercloud-vm-ironic.yaml: undercloud-source.yaml undercloud-vm-ironic-config.yaml undercloud-vm-ironic-deploy.yaml
36         python ./tripleo_heat_merge/merge.py $^ > $@.tmp
37         mv $@.tmp $@
38
39 check: test
40
41 test:
42         @bash test_merge.bash
43
44 clean:
45         rm -f $(generated_templates)
46
47 .PHONY: clean overcloud.yaml check