Welcome to the Wordpress example. It shows you how to deploy a Wordpress application using Deployment Manager.
Welcome to the Wordpress example. It shows you how to deploy a Wordpress application using Deployment Manager.
## Prerequisites
## Prerequisites
=======
Welcome to the Wordpress example. It shows you how to deploy a Wordpress application using Deployment Manager.
## Prerequisites
>>>>>>> 320a0e9... Adds Wordpress example
=======
Welcome to the Wordpress example. It shows you how to deploy a Wordpress application using Deployment Manager.
## Prerequisites
>>>>>>> eed0dda... Updates Wordpress README for Kubernetes 1.1 release
### Deployment Manager
### Deployment Manager
First, make sure DM is installed in your Kubernetes cluster by following the instructions in the top level
First, make sure DM is installed in your Kubernetes cluster by following the instructions in the top level
[README.md](../../README.md).
[README.md](../../README.md).
### Google Cloud Resources
### Google Cloud Resources
<<<<<<<HEAD
<<<<<<<HEAD
The Wordpress application will make use of several persistent disks, which we will host on Google Cloud. To create these disks we will create a deployment using Google Cloud Deployment Manager:
=======
The Wordpress application will make use of several persistent disks, which we will host on Google Cloud. To create these disks we will create a deployment using Google Cloud Deployment Manager:
>>>>>>> 320a0e9... Adds Wordpress example
=======
The Wordpress application will make use of several persistent disks, which we will host on Google Cloud. To create these disks we will create a deployment using Google Cloud Deployment Manager:
The Wordpress application will make use of several persistent disks, which we will host on Google Cloud. To create these disks we will create a deployment using Google Cloud Deployment Manager:
where `wordpress-resources.yaml` looks as follows:
where `wordpress-resources.yaml` looks as follows:
@ -50,29 +27,12 @@ resources:
```
```
### Privileged containers
### Privileged containers
<<<<<<<HEAD
<<<<<<<HEAD
To use NFS we need to be able to launch privileged containers. Since the release of Kubernetes 1.1 privileged container support is enabled by default. If your Kubernetes cluster doesn't support privileged containers you need to manually change this by setting the flag at `kubernetes/saltbase/pillar/privilege.sls` to true.
To use NFS we need to be able to launch privileged containers. Since the release of Kubernetes 1.1 privileged container support is enabled by default. If your Kubernetes cluster doesn't support privileged containers you need to manually change this by setting the flag at `kubernetes/saltbase/pillar/privilege.sls` to true.
### NFS Library
### NFS Library
Mounting NFS volumes requires NFS libraries. Since the release of Kubernetes 1.1 the NFS libraries are installed by default. If they are not installed on your Kubernetes cluster you need to install them manually.
Mounting NFS volumes requires NFS libraries. Since the release of Kubernetes 1.1 the NFS libraries are installed by default. If they are not installed on your Kubernetes cluster you need to install them manually.
## Understanding the Wordpress example template
## Understanding the Wordpress example template
=======
To use NFS we need to be able to launch privileged containers. If your Kubernetes cluster doesn't support this you can either manually change this in every Kubernetes minion or you could set the flag at `kubernetes/saltbase/pillar/privilege.sls` to true and (re)launch your Kubernetes cluster. Once Kubernetes 1.1 releases this should be enabled by default.
=======
To use NFS we need to be able to launch privileged containers. Since the release of Kubernetes 1.1 privileged container support is enabled by default. If your Kubernetes cluster doesn't support privileged containers you need to manually change this by setting the flag at `kubernetes/saltbase/pillar/privilege.sls` to true.
>>>>>>> eed0dda... Updates Wordpress README for Kubernetes 1.1 release
### NFS Library
Mounting NFS volumes requires NFS libraries. Since the release of Kubernetes 1.1 the NFS libraries are installed by default. If they are not installed on your Kubernetes cluster you need to install them manually.
## Understanding the Wordpress example template
<<<<<<<HEAD
>>>>>>> 320a0e9... Adds Wordpress example
=======
>>>>>>> eed0dda... Updates Wordpress README for Kubernetes 1.1 release
Let's take a closer look at the template used by the Wordpress example. The Wordpress application consists of 4 microservices: an nginx service, a wordpress-php service, a MySQL service, and an NFS service. The architecture looks as follows:
Let's take a closer look at the template used by the Wordpress example. The Wordpress application consists of 4 microservices: an nginx service, a wordpress-php service, a MySQL service, and an NFS service. The architecture looks as follows:


@ -81,26 +41,13 @@ Let's take a closer look at the template used by the Wordpress example. The Word
The template contains the following variables:
The template contains the following variables:
```
```
<<<<<<<HEAD
<<<<<<<HEAD
{% set PROPERTIES = properties or {} %}
{% set PROPERTIES = properties or {} %}
{% set PROJECT = PROPERTIES['project'] or 'dm-k8s-testing' %}
{% set PROJECT = PROPERTIES['project'] or 'dm-k8s-testing' %}
{% set NFS_SERVER = PROPERTIES['nfs-server'] or {} %}
{% set NFS_SERVER = PROPERTIES['nfs-server'] or {} %}
=======
{% set PROJECT = properties['project'] or 'dm-k8s-testing' %}
{% set NFS_SERVER = properties['nfs-server'] or {} %}
>>>>>>> 320a0e9... Adds Wordpress example
=======
{% set PROPERTIES = properties or {} %}
{% set PROJECT = PROPERTIES['project'] or 'dm-k8s-testing' %}
{% set NFS_SERVER = PROPERTIES['nfs-server'] or {} %}
>>>>>>> f7940f1... Updates Wordpress example
{% set NFS_SERVER_IP = NFS_SERVER['ip'] or '10.0.253.247' %}
{% set NFS_SERVER_IP = NFS_SERVER['ip'] or '10.0.253.247' %}
{% set NFS_SERVER_PORT = NFS_SERVER['port'] or 2049 %}
{% set NFS_SERVER_PORT = NFS_SERVER['port'] or 2049 %}
{% set NFS_SERVER_DISK = NFS_SERVER['disk'] or 'nfs-disk' %}
{% set NFS_SERVER_DISK = NFS_SERVER['disk'] or 'nfs-disk' %}
{% set NFS_SERVER_DISK_FSTYPE = NFS_SERVER['fstype'] or 'ext4' %}
{% set NFS_SERVER_DISK_FSTYPE = NFS_SERVER['fstype'] or 'ext4' %}
<<<<<<<HEAD
<<<<<<<HEAD
{% set NGINX = PROPERTIES['nginx'] or {} %}
{% set NGINX = PROPERTIES['nginx'] or {} %}
{% set NGINX_PORT = 80 %}
{% set NGINX_PORT = 80 %}
{% set NGINX_REPLICAS = NGINX['replicas'] or 2 %}
{% set NGINX_REPLICAS = NGINX['replicas'] or 2 %}
@ -108,26 +55,6 @@ The template contains the following variables:
{% set WORDPRESS_PHP_REPLICAS = WORDPRESS_PHP['replicas'] or 2 %}
{% set WORDPRESS_PHP_REPLICAS = WORDPRESS_PHP['replicas'] or 2 %}
{% set WORDPRESS_PHP_PORT = WORDPRESS_PHP['port'] or 9000 %}
{% set WORDPRESS_PHP_PORT = WORDPRESS_PHP['port'] or 9000 %}
{% set MYSQL = PROPERTIES['mysql'] or {} %} {% set MYSQL_PORT = MYSQL['port'] or 3306 %} {% set MYSQL_PASSWORD = MYSQL['password'] or 'mysql-password' %} {% set MYSQL_DISK = MYSQL['disk'] or 'mysql-disk' %} {% set MYSQL_DISK_FSTYPE = MYSQL['fstype'] or 'ext4' %}
{% set MYSQL = PROPERTIES['mysql'] or {} %} {% set MYSQL_PORT = MYSQL['port'] or 3306 %} {% set MYSQL_PASSWORD = MYSQL['password'] or 'mysql-password' %} {% set MYSQL_DISK = MYSQL['disk'] or 'mysql-disk' %} {% set MYSQL_DISK_FSTYPE = MYSQL['fstype'] or 'ext4' %}
=======
{% set NGINX = properties['nginx'] or {} %}
=======
{% set NGINX = PROPERTIES['nginx'] or {} %}
>>>>>>> f7940f1... Updates Wordpress example
{% set NGINX_PORT = 80 %}
{% set NGINX_REPLICAS = NGINX['replicas'] or 2 %}
{% set WORDPRESS_PHP = PROPERTIES['wordpress-php'] or {} %}
{% set WORDPRESS_PHP_REPLICAS = WORDPRESS_PHP['replicas'] or 2 %}
{% set WORDPRESS_PHP_PORT = WORDPRESS_PHP['port'] or 9000 %}
<<<<<<<HEAD
{% set MYSQL = properties['mysql'] or {} %}
{% set MYSQL_PORT = MYSQL['port'] or 3306 %}
{% set MYSQL_PASSWORD = MYSQL['password'] or 'mysql-password' %}
{% set MYSQL_DISK = MYSQL['disk'] or 'mysql-disk' %}
{% set MYSQL_DISK_FSTYPE = MYSQL['fstype'] or 'ext4' %}
>>>>>>> 320a0e9... Adds Wordpress example
=======
{% set MYSQL = PROPERTIES['mysql'] or {} %} {% set MYSQL_PORT = MYSQL['port'] or 3306 %} {% set MYSQL_PASSWORD = MYSQL['password'] or 'mysql-password' %} {% set MYSQL_DISK = MYSQL['disk'] or 'mysql-disk' %} {% set MYSQL_DISK_FSTYPE = MYSQL['fstype'] or 'ext4' %}
>>>>>>> f7940f1... Updates Wordpress example
```
```
### Nginx service
### Nginx service
@ -135,27 +62,7 @@ The nginx service is a replicated service with 2 replicas: