<commit_before># Installing the Deis Platform

We will use the `helm` utility to provision the Deis platform to a kubernetes cluster. If you don't
have `helm` installed, see [installing helm][helm] for more info.

## Check Your Setup

First check that you have `helm` installed and the version is correct.

    $ helm --version
    0.2.0

Ensure your kubectl client is installed and ensure it can connect to your kubernetes cluster. This
is where `helm` will attempt to communicate with the cluster. You can test that it is working
properly by running

    $ helm target
    Kubernetes master is running at https://10.245.1.2
    Heapster is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/heapster
    KubeDNS is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-dns
    KubeUI is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-ui
    Grafana is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana
    InfluxDB is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb

If you see a list of targets like the one above, helm can communicate with the kubernetes master.

## Get the Helm Chart

The [Helm Deis Chart](https://github.com/deis/charts) contains everything you
need to install Deis onto your Kubernetes cluster, with a single `helm install` command.

Run the following commands to set up your Helm environment and install the chart:

```
$ helm update
$ helm repo add deis https://github.com/deis/charts
$ helm fetch deis/deis
```

## Set up the Deis Router

Now that you have the Deis chart, you'll need to make a minor edit to the
`deis-router-rc.yaml` Kubernetes manifest file to prepare the router to accept
incoming traffic on a domain of your choice. Follow the following steps to make
the edit:

1. Open the `$HELM_HOME/workspace/charts/deis/manifests/deis-router-rc.yaml`
file in your favorite editor. Note that if `HELM_HOME` is not in your environment,
it defaults to `~/.helm`
2. Replace `example.com` under `metadata.annotations.deis.io/routerConfig` with
the domain of your choice. This will be called the _platform domain_. You may choose
any domain, but the `Routing Traffic` section below details how to configure DNS or your
host to use that domain properly, so you may want to read that section before proceeding.

## Launch Your Deis Cluster

Now that you have it prepared, launch the Deis cluster with:

```
$ helm install deis/deis
```

This command will launch a variety of Kubernetes resources in the `deis` namespace.
You'll need to wait for the pods that it launched to be ready. Monitor their status
by running:

```
$ kubectl get pods --namespace=deis
```

Once you see all of the pods in the `READY` state, your Deis platform is running on a cluster!

## A Note on Routing Traffic

As mentioned above, the Deis router component is responsible for accepting traffic
from outside the Kubernetes cluster and directing appropriately. It uses the<commit_msg>doc(installing-the-dies-platform.md): fix HELM_HOME language<commit_after># Installing the Deis Platform

We will use the `helm` utility to provision the Deis platform to a kubernetes cluster. If you don't
have `helm` installed, see [installing helm][helm] for more info.

## Check Your Setup

First check that you have `helm` installed and the version is correct.

    $ helm --version
    0.2.0

Ensure your kubectl client is installed and ensure it can connect to your kubernetes cluster. This
is where `helm` will attempt to communicate with the cluster. You can test that it is working
properly by running

    $ helm target
    Kubernetes master is running at https://10.245.1.2
    Heapster is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/heapster
    KubeDNS is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-dns
    KubeUI is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-ui
    Grafana is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana
    InfluxDB is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb

If you see a list of targets like the one above, helm can communicate with the kubernetes master.

## Get the Helm Chart

The [Helm Deis Chart](https://github.com/deis/charts) contains everything you
need to install Deis onto your Kubernetes cluster, with a single `helm install` command.

Run the following commands to set up your Helm environment and install the chart:

```
$ helm update
$ helm repo add deis https://github.com/deis/charts
$ helm fetch deis/deis
```

## Set up the Deis Router

Now that you have the Deis chart, you'll need to make a minor edit to the
`deis-router-rc.yaml` Kubernetes manifest file to prepare the router to accept
incoming traffic on a domain of your choice. Follow the following steps to make
the edit:

1. Open the `$(helm home)/workspace/charts/deis/manifests/deis-router-rc.yaml`
file in your favorite editor. Note that `$(helm home)` executes the command to get
the directory that helm uses to store its config and all its charts. See
http://helm.readthedocs.org/en/latest/workspace/ for details.
2. Replace `example.com` under `metadata.annotations.deis.io/routerConfig` with
the domain of your choice. This will be called the _platform domain_. You may choose
any domain, but the `Routing Traffic` section below details how to configure DNS or your
host to use that domain properly, so you may want to read that section before proceeding.

## Launch Your Deis Cluster

Now that you have it prepared, launch the Deis cluster with:

```
$ helm install deis/deis
```

This command will launch a variety of Kubernetes resources in the `deis` namespace.
You'll need to wait for the pods that it launched to be ready. Monitor their status
by running:

```
$ kubectl get pods --namespace=deis
```

Once you see all of the pods in the `READY` state, your Deis platform is running on a cluster!

## A Note on Routing Traffic

As mentioned above, the Deis router component is responsible for accepting traffic
from outside the Kubernetes cluster and directing appropriately. It uses the
{'fraction_non_alphanumeric': 0.07621320604614161, 'fraction_numerical': 0.01654733492442323, 'mean_word_length': 4.0368589743589745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 12, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '133699', 'n_tokens_mistral': 1915, 'n_tokens_neox': 1797, 'n_words': 830}