-
Notifications
You must be signed in to change notification settings - Fork 11
/
deploy.sh
executable file
·45 lines (27 loc) · 1.53 KB
/
deploy.sh
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
#!/bin/sh
set -e
export PLATFORM=$1
# Set up postgresql
kubectl -n openclimate apply -f k8s/${PLATFORM}/postgresql-persistentvolume.${PLATFORM}.yml
kubectl -n openclimate apply -f k8s/${PLATFORM}/postgresql-persistentvolumeclaim.${PLATFORM}.yml
kubectl -n openclimate apply -f k8s/local/postgresql-deployment.local.yml
kubectl -n openclimate apply -f k8s/postgresql-service.yml
# Do the migrations
kubectl -n openclimate create -f k8s/openclimate-migrations-job.yml
# Do the imports
kubectl -n openclimate apply -f k8s/${PLATFORM}/openclimate-harmonize-persistentvolume.${PLATFORM}.yml
kubectl -n openclimate apply -f k8s/${PLATFORM}/openclimate-harmonize-persistentvolumeclaim.${PLATFORM}.yml
kubectl -n openclimate create -f k8s/openclimate-import-job.yml
# Deploy the API
kubectl -n openclimate apply -f k8s/openclimate-api-deployment.yml
kubectl -n openclimate apply -f k8s/openclimate-api-service.yml
# Build and deploy the UI
kubectl -n openclimate apply -f k8s/openclimate-ui-deployment.yml
kubectl -n openclimate apply -f k8s/openclimate-ui-service.yml
# Deploy ElasticSearch
kubectl -n openclimate apply -f k8s/${PLATFORM}/openclimate-elasticsearch-persistentvolume.${PLATFORM}.yml
kubectl -n openclimate apply -f k8s/${PLATFORM}/openclimate-elasticsearch-persistentvolumeclaim.${PLATFORM}.yml
kubectl -n openclimate apply -f k8s/openclimate-elasticsearch-deployment.yml
kubectl -n openclimate apply -f k8s/openclimate-elasticsearch-service.yml
# Deploy the Ingress
kubectl -n openclimate apply -f k8s/local/openclimate-ingress.local.yml