<commit_before># WIP Kubernetes setup instructions

1) Set up minikube (also see optional / experimental native Linux support
instructions below).
2) Start the mediawiki-containers Kubernetes cluster. From within the minikube
environment (native shell when using native Docker):

```
# Clone k8s branch of mediawiki-containers
git clone <EMAIL>:wikimedia/mediawiki-containers.git
cd mediawiki-containers
git checkout k8s

# Load the MediaWiki configuration into kubernetes
kubectl create configmap mediawiki-conf-1 --from-file=conf/mediawiki

# start cluster
kubectl create -f k8s-alpha.yml
# expose as service
kubectl expose deployment mediawiki-basic --type=LoadBalancer --name=mediawiki
# find the IP
kubectl get service

# Browse to http://<ip>/index.php/Main_Page
```

## Optional: Native docker / kubernetes on Debian sid

This [brand new
feature](https://github.com/kubernetes/minikube/commit/ccb0fb3bd2dddbb172e00197d7ba5e7d3aaf9e0f)
(as of May 31st, 2017) in minikube skips virtualization, and instead directly
uses docker & localkube on Linux hosts. As a result, resource utilization is
significantly reduced.

```
git clone https://github.com/kubernetes/minikube.git
cd minikube
make
sudo ln -s `pwd`/out/* /usr/local/bin
sudo ln -s /etc/systemd/system /usr/lib/systemd/system # minikube assumes non-etc location<commit_msg>Recommend exposing the service as NodePort<commit_after># WIP Kubernetes setup instructions

1) Set up minikube (also see optional / experimental native Linux support
instructions below).
2) Start the mediawiki-containers Kubernetes cluster. From within the minikube
environment (native shell when using native Docker):

```
# Clone k8s branch of mediawiki-containers
git clone <EMAIL>:wikimedia/mediawiki-containers.git
cd mediawiki-containers
git checkout k8s

# Load the MediaWiki configuration into kubernetes
kubectl create configmap mediawiki-conf-1 --from-file=conf/mediawiki

# start cluster
kubectl create -f k8s-alpha.yml
# expose as service
kubectl expose deployment mediawiki-basic --type=NodePort
# find the IP
kubectl get service

# Browse to http://<ip>/index.php/Main_Page
```

## Optional: Native docker / kubernetes on Debian sid

This [brand new
feature](https://github.com/kubernetes/minikube/commit/ccb0fb3bd2dddbb172e00197d7ba5e7d3aaf9e0f)
(as of May 31st, 2017) in minikube skips virtualization, and instead directly
uses docker & localkube on Linux hosts. As a result, resource utilization is
significantly reduced.

```
git clone https://github.com/kubernetes/minikube.git
cd minikube
make
sudo ln -s `pwd`/out/* /usr/local/bin
sudo ln -s /etc/systemd/system /usr/lib/systemd/system # minikube assumes non-etc location
{'fraction_non_alphanumeric': 0.08327109783420462, 'fraction_numerical': 0.021657953696788648, 'mean_word_length': 5.047404063205418, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1490391', 'n_tokens_mistral': 886, 'n_tokens_neox': 823, 'n_words': 283}