<commit_before>variable "hostname" {}
variable "region" {}
variable "size" {}
variable "ssh_fingerprint" {}
variable "ssh_key_file" {}
variable "authorized_keys_file" {}

variable "image" {
	default = "debian-8-x64"
}

variable "user" {
	default = "peter"
}

variable "private_networking" {
	default = "true"
}

resource "digitalocean_droplet" "droplet" {
	image = "${var.image}"
	name = "${var.hostname}"
	region = "${var.region}"
	size = "${var.size}"
	private_networking = "${var.private_networking}"
	ssh_keys = ["${var.ssh_fingerprint}"]

	connection {
		user = "root"
		key_file = "${var.ssh_key_file}"
	}

	provisioner "remote-exec" {
		inline = [
			# apt-get
			"echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/2/Debian_8.0/ /' > /etc/apt/sources.list.d/fish.list",
			"apt-get update",
			"apt-get install -y --force-yes sudo make vim git mercurial mosh fish curl wget unzip htop jq binutils gcc libpcap-dev",

			# locale-gen, for mosh
			"echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen", # >:|
			"locale-gen",

			# Go
			"wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz",
			"tar -C /usr/local -xzf go1.5.1.linux-amd64.tar.gz",
			"rm go1.5.1.linux-amd64.tar.gz",

			# sudo permissions and add user
			"sed -i.bak 's/sudo\tALL=(ALL:ALL) ALL/sudo\tALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers",
			"adduser --shell /usr/bin/fish --ingroup sudo --disabled-password --gecos '' ${var.user}",
			"mkdir -p /home/${var.user}/.ssh",
			"chown ${var.user}:sudo /home/${var.user}/.ssh",

			# Weave likes to `go install -tags netgo`, which will fail unless we...
			"chown -R ${var.user}:sudo /usr/local/go/pkg",

			# Docker
			"curl -SsL https://get.docker.com/ | sh",
			"usermod -aG docker ${var.user}",
			"curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-Linux-x86_64 > /usr/local/bin/docker-compose",<commit_msg>Docker 1.9 is poop with Kubernetes components<commit_after>variable "hostname" {}
variable "region" {}
variable "size" {}
variable "ssh_fingerprint" {}
variable "ssh_key_file" {}
variable "authorized_keys_file" {}

variable "image" {
	default = "debian-8-x64"
}

variable "user" {
	default = "peter"
}

variable "private_networking" {
	default = "true"
}

resource "digitalocean_droplet" "droplet" {
	image = "${var.image}"
	name = "${var.hostname}"
	region = "${var.region}"
	size = "${var.size}"
	private_networking = "${var.private_networking}"
	ssh_keys = ["${var.ssh_fingerprint}"]

	connection {
		user = "root"
		key_file = "${var.ssh_key_file}"
	}

	provisioner "remote-exec" {
		inline = [
			# apt-get
			"echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/2/Debian_8.0/ /' > /etc/apt/sources.list.d/fish.list",
			"apt-get update",
			"apt-get install -y --force-yes sudo make vim git mercurial mosh fish curl wget unzip htop jq binutils gcc libpcap-dev",

			# locale-gen, for mosh
			"echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen", # >:|
			"locale-gen",

			# Go
			"wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz",
			"tar -C /usr/local -xzf go1.5.1.linux-amd64.tar.gz",
			"rm go1.5.1.linux-amd64.tar.gz",

			# sudo permissions and add user
			"sed -i.bak 's/sudo\tALL=(ALL:ALL) ALL/sudo\tALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers",
			"adduser --shell /usr/bin/fish --ingroup sudo --disabled-password --gecos '' ${var.user}",
			"mkdir -p /home/${var.user}/.ssh",
			"chown ${var.user}:sudo /home/${var.user}/.ssh",

			# Weave likes to `go install -tags netgo`, which will fail unless we...
			"chown -R ${var.user}:sudo /usr/local/go/pkg",

			# Docker
			"curl -SsL https://get.docker.com/ | sed -e 's/docker-engine/docker-engine=1.8.4~jessie/' | sh",
			"usermod -aG docker ${var.user}",
			"curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-Linux-x86_64 > /usr/local/bin/docker-compose",
{'fraction_non_alphanumeric': 0.19028027770635125, 'fraction_numerical': 0.01671380817690923, 'mean_word_length': 3.430523917995444, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 6, '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': '6503422', 'n_tokens_mistral': 1706, 'n_tokens_neox': 1503, 'n_words': 300}