-
Notifications
You must be signed in to change notification settings - Fork 8
/
openshift.yaml
158 lines (154 loc) · 4.92 KB
/
openshift.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: s2i-example-tensorflow
annotations:
openshift.io/display-name: "Thoth S2I Example TensorFlow"
openshift.io/documentation-url: "https://github.com/thoth-station/s2i-example-tensorflow"
openshift.io/provider-display-name: "Red Hat, Inc."
description: |-
An example application integrating OpenShift's s2i with Thoth's recommendation engine for TensorFlow stack.
version: 0.3.0
tags: thoth,openshift,s2i,python
iconClass: icon-python
labels:
template: s2i-example-tensorflow
app: "s2i-example-tensorflow"
objects:
- kind: BuildConfig
apiVersion: v1
metadata:
name: "s2i-example-tensorflow"
labels:
app: "s2i-example-tensorflow"
spec:
successfulBuildsHistoryLimit: 1
failedBuildsHistoryLimit: 2
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 1
memory: 1Gi
output:
to:
kind: ImageStreamTag
name: "s2i-example-tensorflow:latest"
source:
type: Git
git:
uri: "https://github.com/thoth-station/s2i-example"
ref: "master"
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
name: "s2i-thoth-ubi8-py36:latest"
env:
# Enable Pipenv in OpenShift's s2i.
- name: "ENABLE_PIPENV"
value: "1"
# Force use Thoth service.
- name: "THOTH_ADVISE"
value: "1"
# Set to 1 if you would like to submit stack to Thoth but not use
# the recommended stack - Pipfile.lock from the Git repo will be
# used.
- name: "THOTH_DRY_RUN"
value: "1"
# .thoth.yaml file is generated from template file
# thoth_conf_template.yaml
- name: "THAMOS_CONFIG_TEMPLATE"
value: "thoth_conf_template.yaml"
# Enable expansion based on environment variables when generating
# .thoth.yaml file - this needs to be explictly turned on due to
# possible security implications.
- name: "THAMOS_CONFIG_EXPAND_ENV"
value: "1"
# Do not use cached results, always force analysis on Thoth's side
# if set to 1.
- name: "THAMOS_FORCE"
value: "0"
# Run thamos in verbose mode to show what's going on.
- name: "THAMOS_VERBOSE"
value: "1"
# The adviser on Thoth's backend side is run in debug mode, you can
# obtain logs by running thamos logs <analysis id> or directly on
# Thoth's user API (the analysis id gets printed into the console
# during the build process in OpenShift).
- name: "THAMOS_DEBUG"
value: "1"
# Use latest sources of Thamos and Invectio from Git master.
- name: "THOTH_FROM_MASTER"
value: "0"
# Consider also development dependencies stated in the lock file.
- name: "THAMOS_DEV"
value: "0"
# Consider overlays directory for thoth recommend stack.
- name: "THAMOS_RUNTIME_ENVIRONMENT"
value: ""
triggers:
- type: ImageChange
imageChange: {}
- kind: DeploymentConfig
apiVersion: v1
metadata:
labels:
app: "s2i-example-tensorflow"
name: "s2i-example-tensorflow"
spec:
replicas: 1
selector:
service: "s2i-example-thoth"
template:
metadata:
labels:
service: "s2i-example-thoth"
spec:
containers:
- name: "s2i-example-tensorflow"
ports:
- containerPort: 8080
protocol: TCP
resources:
requests:
memory: 512Mi
cpu: 250m
limits:
memory: 512Mi
cpu: 500m
test: false
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- "s2i-example-tensorflow"
from:
kind: ImageStreamTag
name: "s2i-example-tensorflow:latest"
- apiVersion: "image.openshift.io/v1"
kind: ImageStream
metadata:
labels:
app: "s2i-example-tensorflow"
name: "s2i-example-tensorflow"
spec:
name: "s2i-example-tensorflow"
- apiVersion: "image.openshift.io/v1"
kind: ImageStream
metadata:
labels:
app: "s2i-example-tensorflow"
name: "s2i-thoth-ubi8-py36"
spec:
tags:
- name: "latest"
from:
kind: "DockerImage"
name: "quay.io/thoth-station/s2i-thoth-ubi8-py36"
referencePolicy:
type: "Source"