-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
34 lines (28 loc) · 1.17 KB
/
Makefile
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
MYNAME="mikhail"
MYDOCKERUSER="thecrazyrussian"
IMAGETAG=1
customize:
mkdir -p kubernetes
cat "templates/deployment.yaml.template" | sed "s/{{MYNAME}}/${MYNAME}/g; s/{{MYDOCKERUSER}}/${MYDOCKERUSER}/g; s/{{IMAGETAG}}/${IMAGETAG}/g" > kubernetes/deployment.yaml
cat "templates/ingress.yaml.template" | sed "s/{{MYNAME}}/${MYNAME}/g" > kubernetes/ingress.yaml
cat "templates/service.yaml.template" | sed "s/{{MYNAME}}/${MYNAME}/g" > kubernetes/service.yaml
build:
docker build . --tag ${MYDOCKERUSER}/${MYNAME}-app-dotnet:${IMAGETAG}
publish:
docker push ${MYDOCKERUSER}/${MYNAME}-app-dotnet:${IMAGETAG}
deploy:
kubectl apply -f kubernetes/deployment.yaml
kubectl apply -f kubernetes/service.yaml
kubectl apply -f kubernetes/ingress.yaml
@echo "Your application should be available at https://${MYNAME}.rancher.simpleblocks.net."
charts:
helm create charts
deploycharts:
helm install ${MYNAME}-app2 charts \
--set image.repository=${MYDOCKERUSER}/${MYNAME}-app-dotnet \
--set image.tag=${IMAGETAG} \
--set ingress.enabled=true \
--set "ingress.hosts[0].host=${MYNAME}2.rancher.simpleblocks.net" \
--set "ingress.hosts[0].paths[0]=/"
removecharts:
helm delete ${MYNAME}-app2