<commit_before># Creating the staging environment

The staging environment is intended to be a replica of the production environment, where we are able to test new commits without harming production.

The intention is to build and deploy every master commit for each service to the staging environment. Therefore each master branch should always be in a working state, since other services may depend on it.

## Also see

 - [Current staging urls](./testing.md)
 - [Creating ssh keys for deployment](./ssh-keys-for-deployment-on-travis.md)

## Cluster information

The cluster is a Kubernetes-based one. It roughly mimics the k8s deploy.
  
## Installing the cluster

### Bastion

First, create a bastion host to create and manage the cluster. This machine will be used by the CI pipelines in order to deploy containers.

I would recommend a standard 14.04 Ubuntu instance, with few resources. Make sure you save the ssh key as others may need it to access the cluster.

### Cluster install method

Next, use the k8s AWS instructions to create a cluster. http://kubernetes.io/docs/getting-started-guides/aws/

Note that recent reports suggest using https://github.com/kubernetes/kops instead.

**All subsequent steps are installed from the bastion. Do not run on your own laptop. It will take all teh timez.**

### Download

This is actually the install script, but there's a bug. So only download for now.<commit_msg>fix link<commit_after># Creating the staging environment

The staging environment is intended to be a replica of the production environment, where we are able to test new commits without harming production.

The intention is to build and deploy every master commit for each service to the staging environment. Therefore each master branch should always be in a working state, since other services may depend on it.

## Also see

 - [Current staging urls](./testing.md#application-urls)
 - [Creating ssh keys for deployment](./ssh-keys-for-deployment-on-travis.md)

## Cluster information

The cluster is a Kubernetes-based one. It roughly mimics the k8s deploy.
  
## Installing the cluster

### Bastion

First, create a bastion host to create and manage the cluster. This machine will be used by the CI pipelines in order to deploy containers.

I would recommend a standard 14.04 Ubuntu instance, with few resources. Make sure you save the ssh key as others may need it to access the cluster.

### Cluster install method

Next, use the k8s AWS instructions to create a cluster. http://kubernetes.io/docs/getting-started-guides/aws/

Note that recent reports suggest using https://github.com/kubernetes/kops instead.

**All subsequent steps are installed from the bastion. Do not run on your own laptop. It will take all teh timez.**

### Download

This is actually the install script, but there's a bug. So only download for now.
{'fraction_non_alphanumeric': 0.060393258426966294, 'fraction_numerical': 0.004213483146067416, 'mean_word_length': 4.151898734177215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6520389', 'n_tokens_mistral': 749, 'n_tokens_neox': 693, 'n_words': 406}