Remove frey files @Acconut
This commit is contained in:
parent
02cfb33054
commit
5393631386
|
@ -1,175 +0,0 @@
|
|||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.7.3",
|
||||
"serial": 31,
|
||||
"lineage": "deedcad1-a3e9-4e02-9135-c347bbbe0be0",
|
||||
"modules": [
|
||||
{
|
||||
"path": [
|
||||
"root"
|
||||
],
|
||||
"outputs": {
|
||||
"endpoint": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "http://master.tus.io:80/"
|
||||
},
|
||||
"public_address": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "ec2-54-226-202-57.compute-1.amazonaws.com"
|
||||
},
|
||||
"public_addresses": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "ec2-54-226-202-57.compute-1.amazonaws.com"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"aws_instance.tusd": {
|
||||
"type": "aws_instance",
|
||||
"depends_on": [
|
||||
"aws_key_pair.infra-tusd-main"
|
||||
],
|
||||
"primary": {
|
||||
"id": "i-0321c9c5ee19ea8c3",
|
||||
"attributes": {
|
||||
"ami": "ami-9bce7af0",
|
||||
"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-0321c9c5ee19ea8c3",
|
||||
"instance_state": "running",
|
||||
"instance_type": "c3.large",
|
||||
"key_name": "infra-tusd-main",
|
||||
"monitoring": "false",
|
||||
"network_interface_id": "",
|
||||
"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",
|
||||
"root_block_device.0.volume_size": "8",
|
||||
"root_block_device.0.volume_type": "gp2",
|
||||
"security_groups.#": "1",
|
||||
"security_groups.1898427277": "fw-tusd-main",
|
||||
"source_dest_check": "true",
|
||||
"subnet_id": "",
|
||||
"tags.%": "1",
|
||||
"tags.Name": "master.tus.io",
|
||||
"tenancy": "default",
|
||||
"vpc_security_group_ids.#": "0"
|
||||
},
|
||||
"meta": {
|
||||
"schema_version": "1"
|
||||
},
|
||||
"tainted": false
|
||||
},
|
||||
"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": [
|
||||
"aws_instance.tusd"
|
||||
],
|
||||
"primary": {
|
||||
"id": "Z3IT8X6U91XY1P_master.tus.io_CNAME",
|
||||
"attributes": {
|
||||
"fqdn": "master.tus.io",
|
||||
"health_check_id": "",
|
||||
"id": "Z3IT8X6U91XY1P_master.tus.io_CNAME",
|
||||
"name": "master.tus.io",
|
||||
"records.#": "1",
|
||||
"records.2249160635": "ec2-54-226-202-57.compute-1.amazonaws.com",
|
||||
"set_identifier": "",
|
||||
"ttl": "300",
|
||||
"type": "CNAME",
|
||||
"zone_id": "Z3IT8X6U91XY1P"
|
||||
},
|
||||
"meta": {
|
||||
"schema_version": "2"
|
||||
},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": ""
|
||||
},
|
||||
"aws_security_group.fw-tusd-main": {
|
||||
"type": "aws_security_group",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "sg-60cc290d",
|
||||
"attributes": {
|
||||
"description": "Infra tusd",
|
||||
"egress.#": "0",
|
||||
"id": "sg-60cc290d",
|
||||
"ingress.#": "4",
|
||||
"ingress.2214680975.cidr_blocks.#": "1",
|
||||
"ingress.2214680975.cidr_blocks.0": "0.0.0.0/0",
|
||||
"ingress.2214680975.from_port": "80",
|
||||
"ingress.2214680975.protocol": "tcp",
|
||||
"ingress.2214680975.security_groups.#": "0",
|
||||
"ingress.2214680975.self": "false",
|
||||
"ingress.2214680975.to_port": "80",
|
||||
"ingress.2541437006.cidr_blocks.#": "1",
|
||||
"ingress.2541437006.cidr_blocks.0": "0.0.0.0/0",
|
||||
"ingress.2541437006.from_port": "22",
|
||||
"ingress.2541437006.protocol": "tcp",
|
||||
"ingress.2541437006.security_groups.#": "0",
|
||||
"ingress.2541437006.self": "false",
|
||||
"ingress.2541437006.to_port": "22",
|
||||
"ingress.2617001939.cidr_blocks.#": "1",
|
||||
"ingress.2617001939.cidr_blocks.0": "0.0.0.0/0",
|
||||
"ingress.2617001939.from_port": "443",
|
||||
"ingress.2617001939.protocol": "tcp",
|
||||
"ingress.2617001939.security_groups.#": "0",
|
||||
"ingress.2617001939.self": "false",
|
||||
"ingress.2617001939.to_port": "443",
|
||||
"ingress.516175195.cidr_blocks.#": "1",
|
||||
"ingress.516175195.cidr_blocks.0": "0.0.0.0/0",
|
||||
"ingress.516175195.from_port": "8080",
|
||||
"ingress.516175195.protocol": "tcp",
|
||||
"ingress.516175195.security_groups.#": "0",
|
||||
"ingress.516175195.self": "false",
|
||||
"ingress.516175195.to_port": "8080",
|
||||
"name": "fw-tusd-main",
|
||||
"owner_id": "402421253186",
|
||||
"tags.%": "0",
|
||||
"vpc_id": ""
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": ""
|
||||
}
|
||||
},
|
||||
"depends_on": []
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,168 +0,0 @@
|
|||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.7.3",
|
||||
"serial": 30,
|
||||
"lineage": "deedcad1-a3e9-4e02-9135-c347bbbe0be0",
|
||||
"modules": [
|
||||
{
|
||||
"path": [
|
||||
"root"
|
||||
],
|
||||
"outputs": {
|
||||
"endpoint": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "http://master.tus.io:80/"
|
||||
},
|
||||
"public_address": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "ec2-54-226-202-57.compute-1.amazonaws.com"
|
||||
},
|
||||
"public_addresses": {
|
||||
"sensitive": false,
|
||||
"type": "string",
|
||||
"value": "ec2-54-226-202-57.compute-1.amazonaws.com"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"aws_instance.tusd": {
|
||||
"type": "aws_instance",
|
||||
"depends_on": [
|
||||
"aws_key_pair.infra-tusd-main"
|
||||
],
|
||||
"primary": {
|
||||
"id": "i-0321c9c5ee19ea8c3",
|
||||
"attributes": {
|
||||
"ami": "ami-9bce7af0",
|
||||
"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-0321c9c5ee19ea8c3",
|
||||
"instance_state": "running",
|
||||
"instance_type": "c3.large",
|
||||
"key_name": "infra-tusd-main",
|
||||
"monitoring": "false",
|
||||
"network_interface_id": "",
|
||||
"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",
|
||||
"root_block_device.0.volume_size": "8",
|
||||
"root_block_device.0.volume_type": "gp2",
|
||||
"security_groups.#": "1",
|
||||
"security_groups.1898427277": "fw-tusd-main",
|
||||
"source_dest_check": "true",
|
||||
"subnet_id": "",
|
||||
"tags.%": "1",
|
||||
"tags.Name": "master.tus.io",
|
||||
"tenancy": "default",
|
||||
"vpc_security_group_ids.#": "0"
|
||||
},
|
||||
"meta": {
|
||||
"schema_version": "1"
|
||||
},
|
||||
"tainted": false
|
||||
},
|
||||
"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": [
|
||||
"aws_instance.tusd"
|
||||
],
|
||||
"primary": {
|
||||
"id": "Z3IT8X6U91XY1P_master.tus.io_CNAME",
|
||||
"attributes": {
|
||||
"fqdn": "master.tus.io",
|
||||
"health_check_id": "",
|
||||
"id": "Z3IT8X6U91XY1P_master.tus.io_CNAME",
|
||||
"name": "master.tus.io",
|
||||
"records.#": "1",
|
||||
"records.2249160635": "ec2-54-226-202-57.compute-1.amazonaws.com",
|
||||
"set_identifier": "",
|
||||
"ttl": "300",
|
||||
"type": "CNAME",
|
||||
"zone_id": "Z3IT8X6U91XY1P"
|
||||
},
|
||||
"meta": {
|
||||
"schema_version": "2"
|
||||
},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": ""
|
||||
},
|
||||
"aws_security_group.fw-tusd-main": {
|
||||
"type": "aws_security_group",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "sg-60cc290d",
|
||||
"attributes": {
|
||||
"description": "Infra tusd",
|
||||
"egress.#": "0",
|
||||
"id": "sg-60cc290d",
|
||||
"ingress.#": "3",
|
||||
"ingress.2214680975.cidr_blocks.#": "1",
|
||||
"ingress.2214680975.cidr_blocks.0": "0.0.0.0/0",
|
||||
"ingress.2214680975.from_port": "80",
|
||||
"ingress.2214680975.protocol": "tcp",
|
||||
"ingress.2214680975.security_groups.#": "0",
|
||||
"ingress.2214680975.self": "false",
|
||||
"ingress.2214680975.to_port": "80",
|
||||
"ingress.2541437006.cidr_blocks.#": "1",
|
||||
"ingress.2541437006.cidr_blocks.0": "0.0.0.0/0",
|
||||
"ingress.2541437006.from_port": "22",
|
||||
"ingress.2541437006.protocol": "tcp",
|
||||
"ingress.2541437006.security_groups.#": "0",
|
||||
"ingress.2541437006.self": "false",
|
||||
"ingress.2541437006.to_port": "22",
|
||||
"ingress.516175195.cidr_blocks.#": "1",
|
||||
"ingress.516175195.cidr_blocks.0": "0.0.0.0/0",
|
||||
"ingress.516175195.from_port": "8080",
|
||||
"ingress.516175195.protocol": "tcp",
|
||||
"ingress.516175195.security_groups.#": "0",
|
||||
"ingress.516175195.self": "false",
|
||||
"ingress.516175195.to_port": "8080",
|
||||
"name": "fw-tusd-main",
|
||||
"owner_id": "402421253186",
|
||||
"tags.%": "0",
|
||||
"vpc_id": ""
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": ""
|
||||
}
|
||||
},
|
||||
"depends_on": []
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,267 +0,0 @@
|
|||
global {
|
||||
appname = "tusd"
|
||||
approot = "/srv/tusd"
|
||||
ssh {
|
||||
key_dir = "./ssh"
|
||||
}
|
||||
ansiblecfg {
|
||||
privilege_escalation {
|
||||
become = true
|
||||
}
|
||||
defaults {
|
||||
host_key_checking = false
|
||||
ansible_managed = "Ansible managed"
|
||||
}
|
||||
ssh_connection {
|
||||
pipelining = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
infra provider aws {
|
||||
access_key = "${var.FREY_AWS_ACCESS_KEY}"
|
||||
region = "us-east-1"
|
||||
secret_key = "${var.FREY_AWS_SECRET_KEY}"
|
||||
}
|
||||
|
||||
infra variable {
|
||||
amis {
|
||||
type = "map"
|
||||
default {
|
||||
"us-east-1" = "ami-9bce7af0"
|
||||
}
|
||||
}
|
||||
region {
|
||||
default = "us-east-1"
|
||||
}
|
||||
}
|
||||
|
||||
infra output {
|
||||
public_address {
|
||||
value = "${aws_instance.tusd.0.public_dns}"
|
||||
}
|
||||
public_addresses {
|
||||
value = "${join("\n", aws_instance.tusd.*.public_dns)}"
|
||||
}
|
||||
endpoint {
|
||||
value = "http://${aws_route53_record.www.name}:80/"
|
||||
}
|
||||
}
|
||||
|
||||
infra resource aws_key_pair "infra-tusd-main" {
|
||||
key_name = "infra-tusd-main"
|
||||
public_key = "${file("{{{config.global.ssh.publickey_file}}}")}"
|
||||
}
|
||||
|
||||
infra resource aws_instance tusd {
|
||||
ami = "${lookup(var.amis, var.region)}"
|
||||
instance_type = "c3.large"
|
||||
key_name = "${aws_key_pair.infra-tusd-main.key_name}"
|
||||
|
||||
security_groups = ["fw-tusd-main"]
|
||||
connection {
|
||||
key_file = "{{{config.global.ssh.privatekey_file}}}"
|
||||
user = "{{{config.global.ssh.user}}}"
|
||||
}
|
||||
tags {
|
||||
"Name" = "${var.FREY_DOMAIN}"
|
||||
}
|
||||
}
|
||||
|
||||
infra resource "aws_route53_record" www {
|
||||
name = "${var.FREY_DOMAIN}"
|
||||
records = ["${aws_instance.tusd.public_dns}"]
|
||||
ttl = "300"
|
||||
type = "CNAME"
|
||||
zone_id = "${var.FREY_AWS_ZONE_ID}"
|
||||
}
|
||||
|
||||
infra resource aws_security_group "fw-tusd-main" {
|
||||
description = "Infra tusd"
|
||||
name = "fw-tusd-main"
|
||||
ingress {
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
from_port = 8080
|
||||
protocol = "tcp"
|
||||
to_port = 8080
|
||||
}
|
||||
ingress {
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
from_port = 80
|
||||
protocol = "tcp"
|
||||
to_port = 80
|
||||
}
|
||||
ingress {
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
from_port = 443
|
||||
protocol = "tcp"
|
||||
to_port = 443
|
||||
}
|
||||
ingress {
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
from_port = 22
|
||||
protocol = "tcp"
|
||||
to_port = 22
|
||||
}
|
||||
}
|
||||
|
||||
install {
|
||||
playbooks {
|
||||
hosts = "tusd"
|
||||
name = "Install tusd"
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/apt/1.4.0"
|
||||
apt_install = [
|
||||
"apg",
|
||||
"build-essential",
|
||||
"curl",
|
||||
"git-core",
|
||||
"htop",
|
||||
"iotop",
|
||||
"libpcre3",
|
||||
"logtail",
|
||||
"mlocate",
|
||||
"mtr",
|
||||
"psmisc",
|
||||
"telnet",
|
||||
"vim",
|
||||
"wget"
|
||||
]
|
||||
}
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/unattended-upgrades/1.3.1"
|
||||
}
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/fqdn/1.2.1"
|
||||
}
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/timezone/1.0.0"
|
||||
}
|
||||
tasks {
|
||||
lineinfile = "dest=/home/{{{config.global.ssh.user}}}/.bashrc line=\"alias wtf='sudo tail -f /var/log/*{log,err} /var/log/{dmesg,messages,*{,/*}{log,err}}'\" owner={{{config.global.ssh.user}}} group={{{config.global.ssh.user}}} mode=0644 backup=yes"
|
||||
name = "Common | Add convenience shortcut wtf"
|
||||
}
|
||||
tasks {
|
||||
lineinfile = "dest=/home/{{{config.global.ssh.user}}}/.bashrc line=\"cd {{{config.global.approot}}}/current || true\" owner={{{config.global.ssh.user}}} group={{{config.global.ssh.user}}} mode=0644 backup=yes"
|
||||
name = "Common | Install login"
|
||||
}
|
||||
tasks {
|
||||
name = "Common | Set motd"
|
||||
copy = "content='Welcome to {{lookup('env', 'FREY_DOMAIN')}}' dest=/etc/motd owner=root group=root mode=0644 backup=yes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setup {
|
||||
playbooks {
|
||||
hosts = "tusd"
|
||||
name = "Setup tusd"
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/upstart/1.0.0"
|
||||
upstart_command = "./tusd -port=8080 -dir=/mnt/tusd-data -max-size=1000000000 -behind-proxy"
|
||||
upstart_description = "tusd server"
|
||||
upstart_name = "{{{config.global.appname}}}"
|
||||
upstart_pidfile_path = "{{{config.global.approot}}}/shared/{{{config.global.appname}}}.pid"
|
||||
upstart_respawn = true
|
||||
upstart_respawn_limit = true
|
||||
upstart_runtime_root = "{{{config.global.approot}}}/current/tusd_linux_amd64"
|
||||
upstart_user = "www-data"
|
||||
}
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/rsyslog/3.1.1"
|
||||
rsyslog_rsyslog_d_files "49-tusd" {
|
||||
directives = ["& stop"]
|
||||
rules {
|
||||
rule = ":programname, startswith, \"{{{config.global.appname}}}\""
|
||||
logpath = "{{{config.global.approot}}}/shared/logs/{{{config.global.appname}}}.log"
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks {
|
||||
file = "path=/mnt/tusd-data state=directory owner=www-data group=ubuntu mode=ug+rwX,o= recurse=yes"
|
||||
name = "tusd | Create tusd data dir"
|
||||
}
|
||||
tasks {
|
||||
name = "tusd | Create purger crontab (clean up >24h (1400minutes) files)"
|
||||
cron {
|
||||
name = "purger"
|
||||
special_time = "hourly"
|
||||
job = "find /mnt/tusd-data -type f -mmin +1440 -print0 | xargs -n 200 -r -0 rm || true"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
playbooks {
|
||||
hosts = "tusd"
|
||||
name = "Setup nginx"
|
||||
tasks {
|
||||
name = "nginx | Add nginx PPA"
|
||||
apt_repository = "repo='ppa:ondrej/nginx'"
|
||||
}
|
||||
tasks {
|
||||
name = "nginx | Create public www directory"
|
||||
file = "path=/mnt/nginx-www state=directory owner=www-data group=ubuntu mode=ug+rwX,o= recurse=yes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deploy {
|
||||
playbooks {
|
||||
hosts = "tusd"
|
||||
name = "Deploy tusd"
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/deploy/2.0.0"
|
||||
ansistrano_deploy_from = "./files/tusd_linux_amd64.tar.gz"
|
||||
ansistrano_deploy_to = "{{{config.global.approot}}}"
|
||||
ansistrano_deploy_via = "copy_unarchive"
|
||||
ansistrano_group = "ubuntu"
|
||||
}
|
||||
tasks {
|
||||
file = "path=/srv/tusd/shared/logs state=directory owner=syslog group=ubuntu mode=ug+rwX,o= recurse=yes"
|
||||
name = "tusd | Create and chown shared log dir"
|
||||
}
|
||||
tasks {
|
||||
name = "tusd | Set file attributes"
|
||||
file = "path={{{config.global.approot}}}/current/tusd_linux_amd64/tusd mode=0755 owner=www-data group=www-data"
|
||||
}
|
||||
}
|
||||
playbooks {
|
||||
hosts = "tusd"
|
||||
name = "Deploy nginx"
|
||||
roles {
|
||||
role = "{{{init.paths.roles_dir}}}/apt/1.4.0"
|
||||
apt_install = ["nginx-light"]
|
||||
}
|
||||
tasks {
|
||||
name = "nginx | Create nginx configuration"
|
||||
copy = "src=./files/nginx.conf dest=/etc/nginx/sites-enabled/default"
|
||||
}
|
||||
tasks {
|
||||
name = "nginx | Create DH parameters"
|
||||
command = "openssl dhparam -out /etc/nginx/dhparams.pem 2048 creates=/etc/nginx/dhparams.pem"
|
||||
}
|
||||
tasks {
|
||||
name = "nginx | Start service"
|
||||
service = "name=nginx state=started"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
restart {
|
||||
playbooks {
|
||||
hosts = "tusd"
|
||||
name = "Restart tusd"
|
||||
tasks {
|
||||
action = "service name=tusd state=restarted"
|
||||
name = "tusd | Restart"
|
||||
}
|
||||
}
|
||||
playbooks {
|
||||
hosts = "tusd"
|
||||
name = "Restart nginx"
|
||||
tasks {
|
||||
name = "nginx | Restart"
|
||||
service = "name=nginx state=restarted"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
# Licensed under MIT.
|
||||
# Copyright (2016) by Kevin van Zonneveld https://twitter.com/kvz
|
||||
#
|
||||
# https://www.npmjs.com/package/fakefile
|
||||
#
|
||||
# This Makefile offers convience shortcuts into any Node.js project that utilizes npm scripts.
|
||||
# It functions as a wrapper around the actual listed in `package.json`
|
||||
# So instead of typing:
|
||||
#
|
||||
# $ npm script build:assets
|
||||
#
|
||||
# you could also type:
|
||||
#
|
||||
# $ make build-assets
|
||||
#
|
||||
# Notice that colons (:) are replaced by dashes for Makefile compatibility.
|
||||
#
|
||||
# The benefits of this wrapper are:
|
||||
#
|
||||
# - You get to keep the the scripts package.json, which is more portable
|
||||
# (Makefiles & Windows are harder to mix)
|
||||
# - Offer a polite way into the project for developers coming from different
|
||||
# languages (npm scripts is obviously very Node centric)
|
||||
# - Profit from better autocomplete (make <TAB><TAB>) than npm currently offers.
|
||||
# OSX users will have to install bash-completion
|
||||
# (http://davidalger.com/development/bash-completion-on-os-x-with-brew/)
|
||||
|
||||
define npm_script_targets
|
||||
TARGETS := $(shell node -e 'for (var k in require("./package.json").scripts) {console.log(k.replace(/:/g, "-"));}')
|
||||
$$(TARGETS):
|
||||
npm run $(subst -,:,$(MAKECMDGOALS))
|
||||
|
||||
.PHONY: $$(TARGETS)
|
||||
endef
|
||||
|
||||
$(eval $(call npm_script_targets))
|
||||
|
||||
# These npm run scripts are available, without needing to be mentioned in `package.json`
|
||||
install:
|
||||
npm run install
|
|
@ -1,3 +0,0 @@
|
|||
This folder is charge of launching master.tus.io via [Frey](https://github.com/kvz/frey).
|
||||
You could re-use bits of this, but you could also run tusd any other way you want.
|
||||
It's not a requirement for running a tusd server.
|
|
@ -1,10 +0,0 @@
|
|||
# Rename this file to env.sh, it will be kept out of Git.
|
||||
# So suitable for adding secret keys and such
|
||||
|
||||
# export DEBUG="frey:*"
|
||||
# export FREY_DOMAIN="master.tus.io"
|
||||
# export FREY_ENCRYPTION_SECRET="***"
|
||||
|
||||
# source env.sh
|
||||
# travis encrypt --add env.global "FREY_DOMAIN=${FREY_DOMAIN}"
|
||||
# travis encrypt --add env.global "FREY_ENCRYPTION_SECRET=${FREY_ENCRYPTION_SECRET}"
|
|
@ -1,6 +0,0 @@
|
|||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "${__dir}/env.sh"
|
||||
|
||||
# export FREY_AWS_ACCESS_KEY="***"
|
||||
# export FREY_AWS_SECRET_KEY="***"
|
||||
# export FREY_AWS_ZONE_ID="***"
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"name": "tusd-infra",
|
||||
"version": "0.0.1",
|
||||
"description": "This folder is charge of launching master.tus.io via [Frey](https://github.com/kvz/frey). You could re-use bits of this, but you could also run tusd any other way you want. It's not a requirement for running a tusd server.",
|
||||
"dependencies": {
|
||||
"frey": "0.3.31"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT"
|
||||
}
|
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCBRaeCTrJguFd7Ger1UNO4gY85dbwIKujzhG1U6UNmjMeLbZPrJXjNwOuAw2I6bo6rchtjH3pMAm0XfsAi1DWOaEv2Iu38xJom157b4Ihk23RLGRyzEWQF3XWIX6FGmOWuuy1YDojTVcKvdLXbgy8Kn/b3qBv3Qfrc0F5o6K/MrXbD5MvNqgJGaQUiIxgQllOB9fIq/5HfV1u1xlvih6VJLBx67HxQN+JMdeLifYOLGuJyF4ByqI+1DNjpf/Lu7wNUsoVFAdis5MQ11gT+rrOoMTeZxgj2XJAxl0tUEOBYd0S10kd0w2F9N8RJEI6Qv7Mdo/yIcYhb82tq3AFcGrkl kvz@tusd.freyproject.io
|
1303
.infra/yarn.lock
1303
.infra/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue