|
| 1 | +apiVersion: v1 |
| 2 | +kind: Template |
| 3 | +metadata: |
| 4 | + creationTimestamp: null |
| 5 | + name: wordpress |
| 6 | +objects: |
| 7 | +- apiVersion: v1 |
| 8 | + kind: Service |
| 9 | + metadata: |
| 10 | + creationTimestamp: null |
| 11 | + labels: |
| 12 | + template: mysql-ephemeral-template |
| 13 | + name: mysql |
| 14 | + spec: |
| 15 | + ports: |
| 16 | + - name: mysql |
| 17 | + port: 3306 |
| 18 | + protocol: TCP |
| 19 | + targetPort: 3306 |
| 20 | + selector: |
| 21 | + name: mysql |
| 22 | + sessionAffinity: None |
| 23 | + type: ClusterIP |
| 24 | + status: |
| 25 | + loadBalancer: {} |
| 26 | +- apiVersion: v1 |
| 27 | + kind: Service |
| 28 | + metadata: |
| 29 | + annotations: |
| 30 | + openshift.io/generated-by: OpenShiftNewApp |
| 31 | + creationTimestamp: null |
| 32 | + labels: |
| 33 | + app: wordpress-frontend |
| 34 | + name: wordpress-frontend |
| 35 | + spec: |
| 36 | + ports: |
| 37 | + - name: 8080-tcp |
| 38 | + port: 8080 |
| 39 | + protocol: TCP |
| 40 | + targetPort: 8080 |
| 41 | + selector: |
| 42 | + app: wordpress-frontend |
| 43 | + deploymentconfig: wordpress-frontend |
| 44 | + sessionAffinity: None |
| 45 | + type: ClusterIP |
| 46 | + status: |
| 47 | + loadBalancer: {} |
| 48 | +- apiVersion: v1 |
| 49 | + kind: ImageStream |
| 50 | + metadata: |
| 51 | + annotations: |
| 52 | + labels: |
| 53 | + app: wordpress-frontend |
| 54 | + name: wordpress |
| 55 | + spec: |
| 56 | + dockerImageRepository: docker.io/mfojtik/wordpress |
| 57 | +- apiVersion: v1 |
| 58 | + kind: ImageStream |
| 59 | + metadata: |
| 60 | + labels: |
| 61 | + app: wordpress-frontend |
| 62 | + name: wordpress-frontend |
| 63 | +- apiVersion: v1 |
| 64 | + kind: BuildConfig |
| 65 | + metadata: |
| 66 | + creationTimestamp: null |
| 67 | + labels: |
| 68 | + app: wordpress-frontend |
| 69 | + name: wordpress-frontend |
| 70 | + spec: |
| 71 | + output: |
| 72 | + to: |
| 73 | + kind: ImageStreamTag |
| 74 | + name: wordpress-frontend:latest |
| 75 | + postCommit: {} |
| 76 | + resources: {} |
| 77 | + source: |
| 78 | + git: |
| 79 | + uri: ${SITE_REPOSITORY} |
| 80 | + secrets: [] |
| 81 | + type: Git |
| 82 | + strategy: |
| 83 | + sourceStrategy: |
| 84 | + from: |
| 85 | + kind: ImageStreamTag |
| 86 | + name: wordpress:latest |
| 87 | + type: Source |
| 88 | + triggers: |
| 89 | + - github: |
| 90 | + secret: TcaowunWDfKGNFWPRQP6 |
| 91 | + type: GitHub |
| 92 | + - generic: |
| 93 | + secret: 9FcerQuhlnRNl5etEr3l |
| 94 | + type: Generic |
| 95 | + - type: ConfigChange |
| 96 | + - imageChange: {} |
| 97 | + type: ImageChange |
| 98 | + status: |
| 99 | + lastVersion: 0 |
| 100 | +- apiVersion: v1 |
| 101 | + kind: DeploymentConfig |
| 102 | + metadata: |
| 103 | + creationTimestamp: null |
| 104 | + labels: |
| 105 | + template: mysql-ephemeral-template |
| 106 | + name: mysql |
| 107 | + spec: |
| 108 | + replicas: 1 |
| 109 | + selector: |
| 110 | + name: mysql |
| 111 | + strategy: |
| 112 | + recreateParams: |
| 113 | + timeoutSeconds: 600 |
| 114 | + resources: {} |
| 115 | + type: Recreate |
| 116 | + template: |
| 117 | + metadata: |
| 118 | + creationTimestamp: null |
| 119 | + labels: |
| 120 | + name: mysql |
| 121 | + spec: |
| 122 | + containers: |
| 123 | + - env: |
| 124 | + - name: MYSQL_USER |
| 125 | + value: ${MYSQL_USER} |
| 126 | + - name: MYSQL_PASSWORD |
| 127 | + value: ${MYSQL_PASSWORD} |
| 128 | + - name: MYSQL_DATABASE |
| 129 | + value: ${MYSQL_DATABASE} |
| 130 | + image: centos/mysql-56-centos7 |
| 131 | + imagePullPolicy: IfNotPresent |
| 132 | + livenessProbe: |
| 133 | + failureThreshold: 3 |
| 134 | + initialDelaySeconds: 30 |
| 135 | + periodSeconds: 10 |
| 136 | + successThreshold: 1 |
| 137 | + tcpSocket: |
| 138 | + port: 3306 |
| 139 | + timeoutSeconds: 1 |
| 140 | + name: mysql |
| 141 | + ports: |
| 142 | + - containerPort: 3306 |
| 143 | + protocol: TCP |
| 144 | + readinessProbe: |
| 145 | + exec: |
| 146 | + command: |
| 147 | + - /bin/sh |
| 148 | + - -i |
| 149 | + - -c |
| 150 | + - MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE |
| 151 | + -e 'SELECT 1' |
| 152 | + failureThreshold: 3 |
| 153 | + initialDelaySeconds: 5 |
| 154 | + periodSeconds: 10 |
| 155 | + successThreshold: 1 |
| 156 | + timeoutSeconds: 1 |
| 157 | + resources: |
| 158 | + limits: |
| 159 | + memory: 512Mi |
| 160 | + securityContext: |
| 161 | + capabilities: {} |
| 162 | + privileged: false |
| 163 | + terminationMessagePath: /dev/termination-log |
| 164 | + volumeMounts: |
| 165 | + - mountPath: /var/lib/mysql/data |
| 166 | + name: mysql-data |
| 167 | + dnsPolicy: ClusterFirst |
| 168 | + restartPolicy: Always |
| 169 | + securityContext: {} |
| 170 | + terminationGracePeriodSeconds: 30 |
| 171 | + volumes: |
| 172 | + - emptyDir: {} |
| 173 | + name: mysql-data |
| 174 | + test: false |
| 175 | + triggers: |
| 176 | + - imageChangeParams: |
| 177 | + containerNames: |
| 178 | + - mysql |
| 179 | + from: |
| 180 | + kind: ImageStreamTag |
| 181 | + name: mysql:latest |
| 182 | + namespace: openshift |
| 183 | + type: ImageChange |
| 184 | + - type: ConfigChange |
| 185 | + status: {} |
| 186 | +- apiVersion: v1 |
| 187 | + kind: DeploymentConfig |
| 188 | + metadata: |
| 189 | + creationTimestamp: null |
| 190 | + labels: |
| 191 | + app: wordpress-frontend |
| 192 | + name: wordpress-frontend |
| 193 | + spec: |
| 194 | + replicas: 1 |
| 195 | + selector: |
| 196 | + app: wordpress-frontend |
| 197 | + deploymentconfig: wordpress-frontend |
| 198 | + strategy: |
| 199 | + resources: {} |
| 200 | + rollingParams: |
| 201 | + intervalSeconds: 1 |
| 202 | + maxSurge: 25% |
| 203 | + maxUnavailable: 25% |
| 204 | + timeoutSeconds: 600 |
| 205 | + updatePeriodSeconds: 1 |
| 206 | + type: Rolling |
| 207 | + template: |
| 208 | + metadata: |
| 209 | + labels: |
| 210 | + app: wordpress-frontend |
| 211 | + deploymentconfig: wordpress-frontend |
| 212 | + spec: |
| 213 | + containers: |
| 214 | + - env: |
| 215 | + - name: MYSQL_USER |
| 216 | + value: ${MYSQL_USER} |
| 217 | + - name: MYSQL_PASSWORD |
| 218 | + value: ${MYSQL_PASSWORD} |
| 219 | + - name: MYSQL_DATABASE |
| 220 | + value: ${MYSQL_DATABASE} |
| 221 | + livenessProbe: |
| 222 | + failureThreshold: 3 |
| 223 | + initialDelaySeconds: 5 |
| 224 | + periodSeconds: 5 |
| 225 | + successThreshold: 1 |
| 226 | + httpGet: |
| 227 | + path: "/" |
| 228 | + port: 8080 |
| 229 | + readinessProbe: |
| 230 | + failureThreshold: 3 |
| 231 | + initialDelaySeconds: 1 |
| 232 | + periodSeconds: 2 |
| 233 | + successThreshold: 1 |
| 234 | + timeoutSeconds: 1 |
| 235 | + httpGet: |
| 236 | + path: "/" |
| 237 | + port: 8080 |
| 238 | + image: wordpress-frontend |
| 239 | + imagePullPolicy: Always |
| 240 | + name: wordpress-frontend |
| 241 | + ports: |
| 242 | + - containerPort: 8080 |
| 243 | + protocol: TCP |
| 244 | + resources: {} |
| 245 | + terminationMessagePath: /dev/termination-log |
| 246 | + volumeMounts: |
| 247 | + - mountPath: /opt/app-root/wp-content |
| 248 | + name: wordpress-frontend-volume-1 |
| 249 | + dnsPolicy: ClusterFirst |
| 250 | + restartPolicy: Always |
| 251 | + securityContext: {} |
| 252 | + terminationGracePeriodSeconds: 30 |
| 253 | + volumes: |
| 254 | + - emptyDir: {} |
| 255 | + name: wordpress-frontend-volume-1 |
| 256 | + test: false |
| 257 | + triggers: |
| 258 | + - type: ConfigChange |
| 259 | + - imageChangeParams: |
| 260 | + automatic: true |
| 261 | + containerNames: |
| 262 | + - wordpress-frontend |
| 263 | + from: |
| 264 | + kind: ImageStreamTag |
| 265 | + name: wordpress-frontend:latest |
| 266 | + type: ImageChange |
| 267 | + status: {} |
| 268 | +parameters: |
| 269 | +- description: GIT repository with Wordpress customizations |
| 270 | + displayName: User Wordpress GIT repository (can be empty repo) |
| 271 | + name: SITE_REPOSITORY |
| 272 | + value: 'https://github.com/mfojtik/wordpress-sample' |
| 273 | + required: true |
| 274 | +- description: Wordpress Docker image version to use |
| 275 | + displayName: Wordpress version (use 'latest' for latest version) |
| 276 | + name: WORDPRESS_VERSION |
| 277 | + value: '4.5' |
| 278 | + required: true |
| 279 | +- description: Database name |
| 280 | + displayName: MySQL database name |
| 281 | + name: MYSQL_DATABASE |
| 282 | + value: wordpress |
| 283 | + required: true |
| 284 | +- description: Database user name |
| 285 | + displayName: MySQL database user name |
| 286 | + name: MYSQL_USER |
| 287 | + value: wordpress |
| 288 | + required: true |
| 289 | +- description: Database user password |
| 290 | + displayName: MySQL database user password |
| 291 | + name: MYSQL_PASSWORD |
| 292 | + from: '[a-zA-Z0-9]{16}' |
| 293 | + generate: expression |
| 294 | + required: true |
0 commit comments