05ce192d347218f8923b280d18869117640faffa
[icn.git] / Makefile
1 SHELL:=/bin/bash
2
3 help:
4         @echo "  Targets:"
5         @echo "  jump_server      -- install jump server into this machine"
6         @echo "  unit             -- run the unit tests"
7         @echo "  verifier         -- run verifier tests for CI & CD logs"
8         @echo "  vm_cluster       -- deploy VM compute cluster"
9         @echo "  pod11_cluster    -- deploy pod11 compute cluster"
10         @echo "  help             -- this help output"
11
12 install: jump_server
13
14 # The jump server
15
16 jump_server: management_cluster \
17         tools \
18         ironic_bridge \
19         controllers
20
21 jump_server_clean: ironic_bridge_clean \
22         management_cluster_clean
23
24 # The jump server requires a K8s cluster to install into
25
26 management_cluster:
27         source user_config.sh && \
28         ./deploy/kud/kud_bm_launch.sh minimal
29
30 management_cluster_clean:
31         ./deploy/kud/kud_bm_launch.sh reset
32
33 # Tools used during the installation of jump server components
34
35 tools: kustomize \
36         clusterctl \
37         flux_cli \
38         sops \
39         emcoctl
40
41 kustomize:
42         ./deploy/kustomize/kustomize.sh deploy
43
44 clusterctl:
45         ./deploy/clusterctl/clusterctl.sh deploy
46
47 flux_cli:
48         ./deploy/flux-cli/flux-cli.sh deploy
49
50 sops:
51         ./deploy/sops/sops.sh deploy
52
53 emcoctl: golang
54         ./deploy/emcoctl/emcoctl.sh deploy
55
56 golang:
57         ./deploy/golang/golang.sh deploy
58
59 kubectl:
60         ./deploy/kubectl/kubectl.sh deploy
61
62 # Provisioning network configuration in the jump server
63
64 ironic_bridge:
65         source user_config.sh && env && \
66         ./deploy/ironic/ironic.sh deploy-bridge
67
68 ironic_bridge_clean:
69         ./deploy/ironic/ironic.sh clean-bridge
70
71 # Jump server components
72
73 controllers: baremetal_operator \
74         cluster_api \
75         flux
76
77 baremetal_operator: ironic cert_manager
78         ./deploy/baremetal-operator/baremetal-operator.sh deploy
79
80 baremetal_operator_clean:
81         ./deploy/baremetal-operator/baremetal-operator.sh clean
82
83 ironic:
84         ./deploy/ironic/ironic.sh deploy
85
86 cert_manager:
87         ./deploy/cert-manager/cert-manager.sh deploy
88
89 cluster_api:
90         ./deploy/cluster-api/cluster-api.sh deploy
91
92 flux:
93         ./deploy/flux/flux.sh deploy
94
95 # Example compute clusters
96
97 pod11_cluster:
98         ./deploy/site/pod11/pod11.sh deploy
99         ./deploy/site/pod11/pod11.sh wait
100         ./deploy/kata/kata.sh test
101         ./deploy/addons/addons.sh test
102
103 pod11_cluster_clean:
104         ./deploy/site/pod11/pod11.sh clean
105
106 vm_cluster:
107         ./deploy/site/vm/vm.sh deploy
108         ./deploy/site/vm/vm.sh wait
109         ./deploy/kata/kata.sh test
110         ./deploy/addons/addons.sh test
111
112 vm_cluster_clean:
113         ./deploy/site/vm/vm.sh clean
114
115 # Test targets
116
117 unit: bashate
118
119 bashate:
120         bashate -i E006,E003,E002,E010,E011,E042,E043 `find . -type f -not -path './ci/jjb/shell/*' -not -path './build/*' -name "*.sh"`
121
122 verifier: vm_verifier
123
124 vm_verifier: jump_server \
125         vm_cluster \
126         vm_cluster_clean \
127         jump_server_clean
128
129 bm_verifier: jump_server \
130         pod11_cluster \
131         pod11_cluster_clean \
132         jump_server_clean
133
134 SDWAN_VERIFIER_PATH:=$(CURDIR)/sdwan/test
135 sdwan_verifier:
136         pushd $(SDWAN_VERIFIER_PATH) && bash sdwan_verifier.sh && popd
137
138 # Development targets
139 source: flux_cli kubectl kustomize
140         ./deploy/baremetal-operator/baremetal-operator.sh build-source
141         ./deploy/cert-manager/cert-manager.sh build-source
142         ./deploy/cluster/cluster.sh build-source
143         ./deploy/ironic/ironic.sh build-source
144         ./deploy/kata/kata.sh build-source