-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
88 lines (85 loc) · 2.4 KB
/
deployment.yaml
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
apiVersion: v1
kind: Template
labels:
app: ${APP_NAME}
metadata:
name: ${APP_NAME}
objects:
- apiVersion: v1
kind: Route
metadata:
name: ${APP_NAME}-route
labels:
app: ${APP_NAME}
spec:
to:
kind: Service
name: ${APP_NAME}-svc
- apiVersion: v1
kind: Service
metadata:
name: ${APP_NAME}-svc
namespace: default
labels:
app: ${APP_NAME}
spec:
ports:
- port: 80
targetPort: 5000
protocol: TCP
selector:
app: ${APP_NAME}
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: ${APP_NAME}-dep
labels:
app: ${APP_NAME}
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: ${APP_NAME}
spec:
containers:
- name: ${APP_NAME}
imagePullPolicy: Always
image: ${IMAGE_URL}
ports:
- containerPort: 5000
name: plaintext-port
resources:
requests:
cpu: 100m
memory: 300Mi
limits:
cpu: 200m
memory: 600Mi
env:
- name: BACKEND_STORE_URI
value: ${BACKEND_STORE_URI}
- name: DEFAULT_ARTIFACT_ROOT
value: ${DEFAULT_ARTIFACT_ROOT}
- name: AWS_ACCESS_KEY_ID
value: ${AWS_ACCESS_KEY_ID}
- name: AWS_SECRET_ACCESS_KEY
value: ${AWS_SECRET_ACCESS_KEY}
parameters:
- name: IMAGE_URL
description: URL of the docker image
- name: APP_NAME
description: Application to use in OpenShift
value: mlflow-tracking-server
- name: BACKEND_STORE_URI
description: URI of Backend Store for MLflow. If the tracking server is intended for other people to access remotely, recommended backend store is to use a database.
value: mysql://user:password@mysql:3306/sampledb
- name: DEFAULT_ARTIFACT_ROOT
description: Path of Artifact Store. If the tracking server is intended for other people to access remotely, file store is not recommended.
value: "s3://bucket/artifacts"
- name: AWS_ACCESS_KEY_ID
description: AWS Access Key ID which has access to S3 bucket mentioned above.
- name: AWS_SECRET_ACCESS_KEY
description: AWS Access Key Secret which has access to S3 bucket mentioned above.