Skip to content

Commit

Permalink
Updates examples/wordpress-mysql (#578)
Browse files Browse the repository at this point in the history
Co-authored-by: marcinc <[email protected]>
  • Loading branch information
marcinc and marcinc authored Jun 18, 2021
1 parent 43e6677 commit 445c2ec
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 86 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ examples/node-app/docker-compose.kev*
examples/node-app/kev.yaml
examples/node-app/k8s

### Wordpress app example
examples/wordpress-mysql/k8s

### Go mod vendor ###
vendor

Expand Down
3 changes: 2 additions & 1 deletion examples/wordpress-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

This example defines one of the basic setups for Wordpress.

It also contains all the _Kev_ artefacts required to migrate the app from a Docker Compose Workflow to Kubernetes.
It also contains all the _Kev_ artefacts required to migrate the app from a Docker Compose Workflow to Kubernetes.

Project structure:
```
.
├── docker-compose.kev.dev.yaml
├── docker-compose.kev.local.yaml
├── docker-compose.kev.stage.yaml
├── docker-compose.yaml
Expand Down
26 changes: 26 additions & 0 deletions examples/wordpress-mysql/docker-compose.kev.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3.7"
services:
db:
x-k8s:
workload:
livenessProbe:
exec:
command:
- echo
- Define healthcheck command for service
type: exec
replicas: 1
wordpress:
x-k8s:
workload:
livenessProbe:
exec:
command:
- echo
- Define healthcheck command for service
type: exec
replicas: 1
volumes:
db_data:
x-k8s:
size: 100Mi
47 changes: 7 additions & 40 deletions examples/wordpress-mysql/docker-compose.kev.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,25 @@ version: "3.7"
services:
db:
x-k8s:
service:
type: ClusterIP
workload:
imagePull:
policy: IfNotPresent
livenessProbe:
type: exec
exec:
command:
- echo
- Define healthcheck command for service
failureThreshold: 3
successThreshold: 1
initialDelay: 1m0s
period: 1m0s
timeout: 10s
type: exec
replicas: 1
resource:
cpu: 0.1
maxCpu: 0.5
maxMemory: 500Mi
memory: 10Mi
rollingUpdateMaxSurge: 1
serviceAccountName: default
type: StatefulSet
wordpress:
x-k8s:
service:
type: LoadBalancer
workload:
imagePull:
policy: IfNotPresent
livenessProbe:
type: tcp
tcp:
port: 8000
failureThreshold: 3
successThreshold: 1
initialDelay: 1m0s
period: 1m0s
timeout: 10s
replicas: 5
resource:
cpu: 0.1
maxCpu: 0.5
maxMemory: 500Mi
memory: 10Mi
rollingUpdateMaxSurge: 1
serviceAccountName: default
type: Deployment
exec:
command:
- echo
- Define healthcheck command for service
type: exec
replicas: 1
volumes:
db_data:
x-k8s:
size: 100Mi
storageClass: standard
51 changes: 7 additions & 44 deletions examples/wordpress-mysql/docker-compose.kev.stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,25 @@ version: "3.7"
services:
db:
x-k8s:
service:
type: ClusterIP
workload:
imagePull:
policy: IfNotPresent
livenessProbe:
type: exec
exec:
command:
- echo
- Define healthcheck command for service
failureThreshold: 3
successThreshold: 1
initialDelay: 1m0s
period: 1m0s
timeout: 10s
readinessProbe:
type: tcp
tcp:
port: 3306
type: exec
replicas: 1
resource:
cpu: 0.1
maxCpu: 0.5
maxMemory: 500Mi
memory: 10Mi
rollingUpdateMaxSurge: 1
serviceAccountName: default
type: StatefulSet
wordpress:
x-k8s:
service:
type: LoadBalancer
workload:
imagePull:
policy: IfNotPresent
livenessProbe:
type: tcp
tcp:
port: 8000
failureThreshold: 3
successThreshold: 1
initialDelay: 1m0s
period: 1m0s
timeout: 10s
replicas: 5
resource:
cpu: 0.1
maxCpu: 0.5
maxMemory: 500Mi
memory: 10Mi
rollingUpdateMaxSurge: 1
serviceAccountName: default
type: Deployment
exec:
command:
- echo
- Define healthcheck command for service
type: exec
replicas: 1
volumes:
db_data:
x-k8s:
size: 100Mi
storageClass: standard
3 changes: 2 additions & 1 deletion examples/wordpress-mysql/kev.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
id: 10d61d9a-99c4-4721-9b80-dd6725c657cc
id: 98b5e7c9-4a40-4006-bb5e-57e496b183c4
compose:
- docker-compose.yaml
environments:
dev: docker-compose.kev.dev.yaml
local: docker-compose.kev.local.yaml
stage: docker-compose.kev.stage.yaml

0 comments on commit 445c2ec

Please sign in to comment.