This repository has been archived by the owner on Mar 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
openshift-template.yml
138 lines (138 loc) · 3.33 KB
/
openshift-template.yml
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
apiVersion: v1
kind: Template
metadata:
labels:
description: >
Ruby 2.4 available as docker container is a base platform for
building and running various Ruby 2.4 applications and frameworks.
Ruby is the interpreted scripting language for quick and easy object-oriented programming.
It has many features to process text files and to do system management tasks (as in Perl).
It is simple, straight-forward, and extensible.
tags: builder,ruby,ruby24
template: ruby-fedora
iconClass: icon-docker
name: ruby
objects:
- kind : ImageStream
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : ruby-s2i-${APP_NAME}
- kind : ImageStream
apiVersion : v1
metadata :
name : ${APP_NAME}-s2i
labels :
appid : ruby-s2i-${APP_NAME}
spec:
tags:
- name: latest
from:
kind: DockerImage
name: koscicz/ruby
- kind : BuildConfig
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : ruby-s2i-${APP_NAME}
spec :
triggers :
- type : ConfigChange
- type : ImageChange
- type : GitHub
github:
secret: secret42
source :
type : Git
git :
uri : ${SOURCE_REPOSITORY}
contextDir : ${CONTEXT_DIR}
strategy :
type : Source
sourceStrategy :
from :
kind : ImageStreamTag
name : ${APP_NAME}-s2i:latest
output :
to :
kind : ImageStreamTag
name : ${APP_NAME}:latest
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: ${APP_NAME}
labels :
appid : ruby-s2i-${APP_NAME}
spec:
strategy:
type: Rolling
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${APP_NAME}
from:
kind: ImageStreamTag
name: ${APP_NAME}:latest
replicas: 1
selector :
deploymentconfig : ${APP_NAME}
template:
metadata :
labels :
appid: ruby-s2i-${APP_NAME}
deploymentconfig : ${APP_NAME}
spec:
containers:
- env:
- name: RUBY_VERSION
value: '2.4'
name : ${APP_NAME}
image : ${APP_NAME}:latest
ports:
- containerPort: 8080
- kind : Service
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : ruby-s2i-${APP_NAME}
spec :
ports :
- name: 8080-tcp
protocol : TCP
port : 8080
targetPort : 8080
selector :
deploymentconfig : ${APP_NAME}
- kind : Route
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : ruby-s2i-${APP_NAME}
spec :
host :
to :
kind : Service
name : ${APP_NAME}
weight : 100
port :
targetPort : 8080-tcp
parameters :
- name : APP_NAME
description : Name of application
value :
required : true
- name : SOURCE_REPOSITORY
description : Git source repository
value :
required : true
- name : CONTEXT_DIR
description : Git context directory
value :
required : false