-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.mk
More file actions
108 lines (70 loc) · 3.57 KB
/
Copy pathpackage.mk
File metadata and controls
108 lines (70 loc) · 3.57 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -----------------------------------------------------------------------------
# description: Package Specific Makefile
# licence: GPL3 <https://opensource.org/licenses/GPL3>
# author: Daniel Kovacs <danadeasysau@gmail.com>
# version: 1.1
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# imports
# -----------------------------------------------------------------------------
include flask.mk
# -----------------------------------------------------------------------------
# declarations
# -----------------------------------------------------------------------------
export PACKAGE_NAME=qctrl_api
export PACKAGE_VERSION=0.1.0
# export PY_EXECUTE_ARGS=--loglevel debug
# -----------------------------------------------------------------------------
# docker config
# -----------------------------------------------------------------------------
export DOCKER_BASE_IMAGE_TAG=qctrl/gcp-py3
# -----------------------------------------------------------------------------
# flask config
# -----------------------------------------------------------------------------
# Using defaults
# export FLASK_SERVICE_PORT=8080
# export KUBE_PUBLIC_PORT=8080
# -----------------------------------------------------------------------------
# application config
# -----------------------------------------------------------------------------
export WORKDIRL=./tmp
export GOOGLE_APPLICATION_CREDENTIALS=keys/
# ---------------------------------------------------------------------------------------------------
# namespace config
# ---------------------------------------------------------------------------------------------------
# export GLOBAL_NAMESPACE=
# -----------------------------------------------------------------------------
# docker config
# -----------------------------------------------------------------------------
DOCKER_RUN_ARGS:=$(DOCKER_RUN_ARGS) \
--env KUBERNETES_CLUSTER_ID=$(KUBERNETES_CLUSTER_ID) \
--env KUBERNETES_CLUSTER_ZONE=$(KUBERNETES_CLUSTER_ZONE)
# -----------------------------------------------------------------------------
# kubernetes config
# -----------------------------------------------------------------------------
# KUBERNETES_DEPLOYMENT_NAME=$(subst _,-,$(PACKAGE_NAME))
#
# This will work as long as there is only one cluster available in the current gcloud config.
# If there are more than one clusters, please set these variables externally.
#
# ifeq "$(KUBERNETES_CLUSTER_ID)" ""
# KUBERNETES_CLUSTER_ID=$(eval KUBERNETES_CLUSTER_ID := $$(shell gcloud container clusters list --format "get(name)"))$(KUBERNETES_CLUSTER_ID)
# endif
# ifeq "$(KUBERNETES_CLUSTER_ZONE)" ""
# KUBERNETES_CLUSTER_ZONE=$(eval KUBERNETES_CLUSTER_ZONE := $$(shell gcloud container clusters list --format "get(zone)"))$(KUBERNETES_CLUSTER_ZONE)
# endif
KUBERNETES_DEPLOYMENT_ARGS_3=\
--env KUBERNETES_CLUSTER_ID=$(KUBERNETES_CLUSTER_ID) \
--env KUBERNETES_CLUSTER_ZONE=$(KUBERNETES_CLUSTER_ZONE)
# -----------------------------------------------------------------------------
# general-pre-run::
# -----------------------------------------------------------------------------
general-pre-run:: kube-info-cache
# -----------------------------------------------------------------------------
# linking git working copies of dependencies
# -----------------------------------------------------------------------------
#
# Note: this is used when you want to develop the linked package and this
# package in the same time.
#
deps:: $(VIRTUALENV_HOME)/deplink_dc-broadcast-utils package.mk