From 722e1dac0b47737488d7b899e4268d7c984f6a07 Mon Sep 17 00:00:00 2001 From: wolf1996 Date: Mon, 21 May 2018 13:50:19 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20=D0=B4?= =?UTF-8?q?=D1=83=D0=B1=D0=BB=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=20=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=BD=D1=83=D1=8E=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA=D1=83=20miniku?= =?UTF-8?q?be?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 79 +++++++++++++++++--------------------------------------- 1 file changed, 24 insertions(+), 55 deletions(-) diff --git a/Makefile b/Makefile index ea44af2..74ea122 100644 --- a/Makefile +++ b/Makefile @@ -58,79 +58,52 @@ build_all: \ build_stats \ build_gateway \ -# не работает, надо лапками вводить команду у себя для работы -use_kubernetes_docker: - @eval $$(minikube docker-env) + +# для работы с докером необходимо переключить контекст на minikube +# сделать это из makefile для родительского терминала без костылей +# (я не уверен) нельзя, ткчт для работы с докером minikube надо ввести +# eval $(minikube docker-env) +# в текущем терминале # выкатываем с тегом -docker_image_build_gateway_minikube: - @eval $$(minikube docker-env);\ +docker_image_build_gateway: $(MAKE) -C python/gateway docker_build -docker_image_build_data_minikube: - @eval $$(minikube docker-env);\ +docker_image_build_data: $(MAKE) -C python/data docker_build -docker_image_build_stats_minikube: - @eval $$(minikube docker-env);\ +docker_image_build_stats: $(MAKE) -C python/stats docker_build -docker_image_build_receiver_minikube: - @eval $$(minikube docker-env);\ +docker_image_build_receiver: $(MAKE) -C python/receiver docker_build -docker_images_minikube_build: \ - docker_image_build_gateway_minikube \ - docker_image_build_data_minikube \ - docker_image_build_stats_minikube \ - docker_image_build_receiver_minikube +docker_images_build: \ + docker_image_build_gateway \ + docker_image_build_data \ + docker_image_build_stats \ + docker_image_build_receiver #выкатываем без перетеггирования -docker_image_build_gateway_minikube_curr: - @eval $$(minikube docker-env);\ +docker_image_build_gateway_curr: $(MAKE) -C python/gateway docker_build_curr -docker_image_build_data_minikube_curr: - @eval $$(minikube docker-env);\ +docker_image_build_data_curr: $(MAKE) -C python/data docker_build_curr -docker_image_build_stats_minikube_curr: - @eval $$(minikube docker-env);\ +docker_image_build_stats_curr: $(MAKE) -C python/stats docker_build_curr -docker_image_build_receiver_minikube_curr: - @eval $$(minikube docker-env);\ +docker_image_build_receiver_curr: $(MAKE) -C python/receiver docker_build_curr -docker_images_minikube_build_curr: \ - docker_image_build_gateway_minikube_curr \ - docker_image_build_data_minikube_curr \ - docker_image_build_stats_minikube_curr \ - docker_image_build_receiver_minikube_curr - -# просто выкатываем образы -docker_image_build_gateway: - $(MAKE) -C python/gateway docker_build - -docker_image_build_data: - $(MAKE) -C python/data docker_build - -docker_image_build_stats: - $(MAKE) -C python/stats docker_build - -docker_image_build_receiver: - $(MAKE) -C python/receiver docker_build - -docker_images_build: \ - docker_image_build_gateway \ - docker_image_build_data \ - docker_image_build_stats \ - docker_image_build_receiver +docker_images_build_curr: \ + docker_image_build_gateway_curr \ + docker_image_build_data_curr \ + docker_image_build_stats_curr \ + docker_image_build_receiver_curr -kubernetes_docker_images_build: \ - use_kubernetes_docker \ - docker_images_build rebuild_protobuf: python3 -m grpc_tools.protoc -I./protobuf/ ./protobuf/proto/*.proto --python_out=./depends/python/ --grpc_python_out=./depends/python/ @@ -151,7 +124,6 @@ kubernetes_data_service_remove: #Собираем новый образ и запускаем kubernetes_data_buildnload: - @eval $$(minikube docker-env); \ $(MAKE) -C python/data kubernetes_buildnload # stats kubernetes @@ -168,7 +140,6 @@ kubernetes_stats_service_remove: $(MAKE) -C python/stats kubernetes_service_remove kubernetes_stats_buildnload: - @eval $$(minikube docker-env); \ $(MAKE) -C python/stats kubernetes_buildnload @@ -186,7 +157,6 @@ kubernetes_gateway_service_remove: $(MAKE) -C python/gateway kubernetes_service_remove kubernetes_gateway_buildnload: - @eval $$(minikube docker-env); \ $(MAKE) -C python/gateway kubernetes_buildnload @@ -204,7 +174,6 @@ kubernetes_reciever_service_remove: $(MAKE) -C python/receiver kubernetes_service_remove kubernetes_receiver_buildnload: - @eval $$(minikube docker-env); \ $(MAKE) -C python/receiver kubernetes_buildnload