You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

48 lines
1.4 KiB

export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
export IMG_VERSION = 1.42
export IMG_NGINX_VERSION = 1.17
# limpia todo
all: imagen nginx clean install
imagen:
cd ../; make
install:
-kubectl create -f namespace.yaml
-kubectl create -f reg-secret.yaml
-kubectl create -f env-prod-configmap.yaml
-kubectl create -f env-prod-db-configmap.yaml
-kubectl create -f pv-local-libros.yaml
-kubectl create -f libros-prod-persistentvolumeclaim.yaml
-kubectl create -f static-volume-persistentvolumeclaim.yaml
-kubectl create -f postgres-data-persistentvolumeclaim.yaml
-kubectl create -f db-deployment.yaml
-kubectl create -f db-service.yaml
-envsubst < libros-deployment.yaml |kubectl create -f -
-envsubst < nginx-deployment.yaml |kubectl create -f -
-kubectl create -f nginx-service.yaml
clean:
-envsubst < nginx-deployment.yaml |kubectl delete -f -
-kubectl delete -f nginx-service.yaml
-envsubst < libros-deployment.yaml |kubectl delete -f -
-kubectl delete -f db-deployment.yaml
-kubectl delete -f db-service.yaml
-kubectl delete -f env-prod-configmap.yaml
-kubectl delete -f env-prod-db-configmap.yaml
-kubectl delete -f postgres-data-persistentvolumeclaim.yaml
-kubectl delete -f static-volume-persistentvolumeclaim.yaml
-kubectl delete -f libros-prod-persistentvolumeclaim.yaml
-kubectl delete -f pv-local-libros.yaml
-kubectl delete -f reg-secret.yaml
-kubectl delete -f namespace.yaml
nginx:
cd ../nginx; make