Enable running tusd behind the CloudFlare proxy for supporting HTTPS uploads

This commit is contained in:
Marius 2016-10-14 11:35:21 +02:00
parent c5d597aa36
commit 2f5bc77649
3 changed files with 37 additions and 15 deletions

View File

@ -1,7 +1,7 @@
{
"version": 3,
"terraform_version": "0.7.3",
"serial": 29,
"serial": 30,
"lineage": "deedcad1-a3e9-4e02-9135-c347bbbe0be0",
"modules": [
{
@ -79,6 +79,7 @@
"primary": {
"id": "infra-tusd-main",
"attributes": {
"fingerprint": "ef:50:7a:2b:49:88:0b:c5:ab:55:2c:83:16:e7:e5:0f",
"id": "infra-tusd-main",
"key_name": "infra-tusd-main",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCBRaeCTrJguFd7Ger1UNO4gY85dbwIKujzhG1U6UNmjMeLbZPrJXjNwOuAw2I6bo6rchtjH3pMAm0XfsAi1DWOaEv2Iu38xJom157b4Ihk23RLGRyzEWQF3XWIX6FGmOWuuy1YDojTVcKvdLXbgy8Kn/b3qBv3Qfrc0F5o6K/MrXbD5MvNqgJGaQUiIxgQllOB9fIq/5HfV1u1xlvih6VJLBx67HxQN+JMdeLifYOLGuJyF4ByqI+1DNjpf/Lu7wNUsoVFAdis5MQ11gT+rrOoMTeZxgj2XJAxl0tUEOBYd0S10kd0w2F9N8RJEI6Qv7Mdo/yIcYhb82tq3AFcGrkl kvz@tusd.freyproject.io"

View File

@ -1,7 +1,7 @@
{
"version": 3,
"terraform_version": "0.7.3",
"serial": 28,
"serial": 30,
"lineage": "deedcad1-a3e9-4e02-9135-c347bbbe0be0",
"modules": [
{
@ -17,38 +17,40 @@
"public_address": {
"sensitive": false,
"type": "string",
"value": "ec2-54-166-147-2.compute-1.amazonaws.com"
"value": "ec2-54-226-202-57.compute-1.amazonaws.com"
},
"public_addresses": {
"sensitive": false,
"type": "string",
"value": "ec2-54-166-147-2.compute-1.amazonaws.com"
"value": "ec2-54-226-202-57.compute-1.amazonaws.com"
}
},
"resources": {
"aws_instance.tusd": {
"type": "aws_instance",
"depends_on": [],
"depends_on": [
"aws_key_pair.infra-tusd-main"
],
"primary": {
"id": "i-16ef798d",
"id": "i-0321c9c5ee19ea8c3",
"attributes": {
"ami": "ami-9bce7af0",
"availability_zone": "us-east-1d",
"availability_zone": "us-east-1a",
"disable_api_termination": "false",
"ebs_block_device.#": "0",
"ebs_optimized": "false",
"ephemeral_block_device.#": "0",
"iam_instance_profile": "",
"id": "i-16ef798d",
"id": "i-0321c9c5ee19ea8c3",
"instance_state": "running",
"instance_type": "c3.large",
"key_name": "infra-tusd",
"key_name": "infra-tusd-main",
"monitoring": "false",
"network_interface_id": "",
"private_dns": "ip-10-99-128-27.ec2.internal",
"private_ip": "10.99.128.27",
"public_dns": "ec2-54-166-147-2.compute-1.amazonaws.com",
"public_ip": "54.166.147.2",
"private_dns": "ip-10-178-163-38.ec2.internal",
"private_ip": "10.178.163.38",
"public_dns": "ec2-54-226-202-57.compute-1.amazonaws.com",
"public_ip": "54.226.202.57",
"root_block_device.#": "1",
"root_block_device.0.delete_on_termination": "true",
"root_block_device.0.iops": "100",
@ -71,6 +73,25 @@
"deposed": [],
"provider": ""
},
"aws_key_pair.infra-tusd-main": {
"type": "aws_key_pair",
"depends_on": [],
"primary": {
"id": "infra-tusd-main",
"attributes": {
"fingerprint": "ef:50:7a:2b:49:88:0b:c5:ab:55:2c:83:16:e7:e5:0f",
"id": "infra-tusd-main",
"key_name": "infra-tusd-main",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCBRaeCTrJguFd7Ger1UNO4gY85dbwIKujzhG1U6UNmjMeLbZPrJXjNwOuAw2I6bo6rchtjH3pMAm0XfsAi1DWOaEv2Iu38xJom157b4Ihk23RLGRyzEWQF3XWIX6FGmOWuuy1YDojTVcKvdLXbgy8Kn/b3qBv3Qfrc0F5o6K/MrXbD5MvNqgJGaQUiIxgQllOB9fIq/5HfV1u1xlvih6VJLBx67HxQN+JMdeLifYOLGuJyF4ByqI+1DNjpf/Lu7wNUsoVFAdis5MQ11gT+rrOoMTeZxgj2XJAxl0tUEOBYd0S10kd0w2F9N8RJEI6Qv7Mdo/yIcYhb82tq3AFcGrkl kvz@tusd.freyproject.io"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"aws_route53_record.www": {
"type": "aws_route53_record",
"depends_on": [
@ -84,7 +105,7 @@
"id": "Z3IT8X6U91XY1P_master.tus.io_CNAME",
"name": "master.tus.io",
"records.#": "1",
"records.3871998453": "ec2-54-166-147-2.compute-1.amazonaws.com",
"records.2249160635": "ec2-54-226-202-57.compute-1.amazonaws.com",
"set_identifier": "",
"ttl": "300",
"type": "CNAME",

View File

@ -136,7 +136,7 @@ setup {
name = "Setup tusd"
roles {
role = "{{{init.paths.roles_dir}}}/upstart/v1.0.0"
upstart_command = "./tusd -port=8080 -dir=/mnt/tusd-data -store-size=10737418240"
upstart_command = "./tusd -port=8080 -dir=/mnt/tusd-data -store-size=10737418240 -behind-proxy"
upstart_description = "tusd server"
upstart_name = "{{{config.global.appname}}}"
upstart_pidfile_path = "{{{config.global.approot}}}/shared/{{{config.global.appname}}}.pid"