forked from TheDhm/EasyTP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-all.sh
60 lines (38 loc) · 1.52 KB
/
deploy-all.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
46
47
48
49
echo "1- creating namespaces"
kubectl apply -f ./deploy-django/namespaces.yaml
echo " "
echo "2- creating persistent volumes and claims ( storage for users and teachers )"
kubectl apply -f ./deploy-django/persistentVolume.yaml
echo " "
echo "3- creating Service account ( for django app )"
kubectl apply -f ./deploy-django/ServiceAccount.yaml
echo " "
echo "4- creating Roles for the service account"
kubectl apply -f ./deploy-django/Role.yaml
echo " "
echo "5- creating Role Bindings between role and service account"
kubectl apply -f ./deploy-django/RoleBinding.yaml
echo " "
echo "6- creating Postgres secrets"
kubectl apply -f ./deploy-django/postgres/postgres-secrets.yaml
echo " "
echo "7- creating Postgres persistent volume and claim ( nfs_share/DB )"
kubectl apply -f ./deploy-django/postgres/postgres-pv.yaml
echo " "
echo "8- creating Postgres deployment"
kubectl apply -f ./deploy-django/postgres/postgres-deployment.yaml
echo " "
echo "9- creating Postgres service"
kubectl apply -f ./deploy-django/postgres/postgres-service.yaml
echo " "
echo "10- creating Django app deployment"
kubectl apply -f ./deploy-django/django-deployment.yaml
echo " "
echo "11- creating Django app service"
kubectl apply -f ./deploy-django/ServiceDjango.yaml
echo " "
echo "migrate and create super user and everything is done"
#### migrations to DB ####
# kubectl -n django-space exec -it <django pod> -- python manage.py migrate
### creating super user
# kubectl -n django-space exec -it <django pod> -- python manage.py createsuperuser