@@ -31,7 +31,7 @@ You should already have turned up a Kubernetes cluster. To get the most of this
...
@@ -31,7 +31,7 @@ You should already have turned up a Kubernetes cluster. To get the most of this
The Celery task queue will need to communicate with the RabbitMQ broker. RabbitMQ will eventually appear on a separate pod, but since pods are ephemeral we need a service that can transparently route requests to RabbitMQ.
The Celery task queue will need to communicate with the RabbitMQ broker. RabbitMQ will eventually appear on a separate pod, but since pods are ephemeral we need a service that can transparently route requests to RabbitMQ.
Use the file `examples/celery-rabbitmq/rabbitmq-service.yaml`:
Use the file [`examples/celery-rabbitmq/rabbitmq-service.yaml`](rabbitmq-service.yaml):
```yaml
```yaml
apiVersion:v1beta3
apiVersion:v1beta3
...
@@ -63,7 +63,7 @@ This service allows other pods to connect to the rabbitmq. To them, it will be s
...
@@ -63,7 +63,7 @@ This service allows other pods to connect to the rabbitmq. To them, it will be s
## Step 2: Fire up RabbitMQ
## Step 2: Fire up RabbitMQ
A RabbitMQ broker can be turned up using the file `examples/celery-rabbitmq/rabbitmq-controller.yaml`:
A RabbitMQ broker can be turned up using the file [`examples/celery-rabbitmq/rabbitmq-controller.yaml`](rabbitmq-controller.yaml):
Use the file `examples/cluster-dns/dns-frontend-pod.yaml` to create a client pod in dev namespace. The client pod will make a connection to backend and exit. Specifically, it tries to connect to address `http://dns-backend.development.kubernetes.local:8000`.
Use the file [`examples/cluster-dns/dns-frontend-pod.yaml`](dns-frontend-pod.yaml) to create a client pod in dev namespace. The client pod will make a connection to backend and exit. Specifically, it tries to connect to address `http://dns-backend.development.kubernetes.local:8000`.
@@ -9,7 +9,8 @@ The example assumes that you have already set up a Glusterfs server cluster and
...
@@ -9,7 +9,8 @@ The example assumes that you have already set up a Glusterfs server cluster and
Set up Glusterfs server cluster; install Glusterfs client package on the Kubernetes nodes. ([Guide](https://www.howtoforge.com/high-availability-storage-with-glusterfs-3.2.x-on-debian-wheezy-automatic-file-replication-mirror-across-two-storage-servers))
Set up Glusterfs server cluster; install Glusterfs client package on the Kubernetes nodes. ([Guide](https://www.howtoforge.com/high-availability-storage-with-glusterfs-3.2.x-on-debian-wheezy-automatic-file-replication-mirror-across-two-storage-servers))
### Create endpoints
### Create endpoints
Here is a snippet of glusterfs-endpoints.json,
Here is a snippet of [glusterfs-endpoints.json](glusterfs-endpoints.json),
@@ -63,7 +63,7 @@ Now that the persistent disks are defined, the Kubernetes pods can be launched.
...
@@ -63,7 +63,7 @@ Now that the persistent disks are defined, the Kubernetes pods can be launched.
### Start the Mysql pod
### Start the Mysql pod
First, **edit `mysql.yaml`**, the mysql pod definition, to use a database password that you specify.
First, **edit [`mysql.yaml`](mysql.yaml)**, the mysql pod definition, to use a database password that you specify.
`mysql.yaml` looks like this:
`mysql.yaml` looks like this:
```yaml
```yaml
...
@@ -133,7 +133,7 @@ We will specifically name the service `mysql`. This will let us leverage the su
...
@@ -133,7 +133,7 @@ We will specifically name the service `mysql`. This will let us leverage the su
So if we label our Kubernetes mysql service `mysql`, the wordpress pod will be able to use the Docker-links-compatible environment variables, defined by Kubernetes, to connect to the database.
So if we label our Kubernetes mysql service `mysql`, the wordpress pod will be able to use the Docker-links-compatible environment variables, defined by Kubernetes, to connect to the database.
The `mysql-service.yaml` file looks like this:
The [`mysql-service.yaml`](mysql-service.yaml) file looks like this:
```yaml
```yaml
apiVersion:v1beta3
apiVersion:v1beta3
...
@@ -167,7 +167,7 @@ $ <kubernetes>/cluster/kubectl.sh get services
...
@@ -167,7 +167,7 @@ $ <kubernetes>/cluster/kubectl.sh get services
## Start the WordPress Pod and Service
## Start the WordPress Pod and Service
Once the mysql service is up, start the wordpress pod, specified in
Once the mysql service is up, start the wordpress pod, specified in
`wordpress.yaml`. Before you start it, **edit `wordpress.yaml`** and **set the database password to be the same as you used in `mysql.yaml`**.
[`wordpress.yaml`](wordpress.yaml). Before you start it, **edit `wordpress.yaml`** and **set the database password to be the same as you used in `mysql.yaml`**.
Note that this config file also defines a volume, this one using the `wordpress-disk` persistent disk that you created.
Note that this config file also defines a volume, this one using the `wordpress-disk` persistent disk that you created.
```yaml
```yaml
...
@@ -216,7 +216,7 @@ $ <kubernetes>/cluster/kubectl.sh get pods
...
@@ -216,7 +216,7 @@ $ <kubernetes>/cluster/kubectl.sh get pods
### Start the WordPress service
### Start the WordPress service
Once the wordpress pod is running, start its service, specified by `wordpress-service.yaml`.
Once the wordpress pod is running, start its service, specified by [`wordpress-service.yaml`](wordpress-service.yaml).
@@ -21,7 +21,7 @@ In the remaining part of this example we will assume that your instance is named
...
@@ -21,7 +21,7 @@ In the remaining part of this example we will assume that your instance is named
### Step Two: Turn up the phabricator
### Step Two: Turn up the phabricator
To start Phabricator server use the file `examples/phabricator/phabricator-controller.json` which describes a replication controller with a single pod running an Apache server with Phabricator PHP source:
To start Phabricator server use the file [`examples/phabricator/phabricator-controller.json`](phabricator-controller.json) which describes a replication controller with a single pod running an Apache server with Phabricator PHP source:
```js
```js
{
{
...
@@ -113,7 +113,7 @@ This is because the host on which this container is running is not authorized in
...
@@ -113,7 +113,7 @@ This is because the host on which this container is running is not authorized in
To automate this process and make sure that a proper host is authorized even if pod is rescheduled to a new machine we need a separate pod that periodically lists pods and authorizes hosts. Use the file `examples/phabricator/authenticator-controller.json`:
To automate this process and make sure that a proper host is authorized even if pod is rescheduled to a new machine we need a separate pod that periodically lists pods and authorizes hosts. Use the file [`examples/phabricator/authenticator-controller.json`](authenticator-controller.json):
```js
```js
{
{
...
@@ -169,7 +169,7 @@ NAME REGION ADDRESS STATUS
...
@@ -169,7 +169,7 @@ NAME REGION ADDRESS STATUS
phabricator us-central1 107.178.210.6 RESERVED
phabricator us-central1 107.178.210.6 RESERVED
```
```
Use the file `examples/phabricator/phabricator-service.json`:
Use the file [`examples/phabricator/phabricator-service.json`](phabricator-service.json):