Revert "Hostname should be part of freyfile"

This reverts commit 19a6611a89.
This commit is contained in:
Kevin van Zonneveld 2016-09-28 16:00:15 +02:00
parent 785248765d
commit db6c11d6f5
2 changed files with 17 additions and 7 deletions

View File

@ -33,9 +33,15 @@ infra variable {
} }
infra output { infra output {
public_address { value = "${aws_instance.tusd.0.public_dns}" } public_address {
public_addresses { value = "${join("\n", aws_instance.tusd.*.public_dns)}" } value = "${aws_instance.tusd.0.public_dns}"
endpoint { value = "http://${aws_route53_record.www.name}:80/" } }
public_addresses {
value = "${join("\n", aws_instance.tusd.*.public_dns)}"
}
endpoint {
value = "http://${aws_route53_record.www.name}:80/"
}
} }
infra resource aws_instance tusd { infra resource aws_instance tusd {
@ -47,11 +53,13 @@ infra resource aws_instance tusd {
key_file = "{{{config.global.ssh.privatekey_file}}}" key_file = "{{{config.global.ssh.privatekey_file}}}"
user = "{{{config.global.ssh.user}}}" user = "{{{config.global.ssh.user}}}"
} }
tags { Name = "master.tus.io" } tags {
"Name" = "${var.FREY_DOMAIN}"
}
} }
infra resource "aws_route53_record" www { infra resource "aws_route53_record" www {
name = "master.tus.io" name = "${var.FREY_DOMAIN}"
records = ["${aws_instance.tusd.public_dns}"] records = ["${aws_instance.tusd.public_dns}"]
ttl = "300" ttl = "300"
type = "CNAME" type = "CNAME"
@ -102,7 +110,7 @@ install {
} }
tasks { tasks {
name = "Common | Set motd" name = "Common | Set motd"
copy = "content='Welcome to master.tus.io' dest=/etc/motd owner=root group=root mode=0644 backup=yes" copy = "content='Welcome to {{lookup('env', 'FREY_DOMAIN')}}' dest=/etc/motd owner=root group=root mode=0644 backup=yes"
} }
tasks { tasks {
name = "Common | Set timezone variables" name = "Common | Set timezone variables"
@ -143,7 +151,7 @@ setup {
} }
roles { roles {
role = "{{{init.paths.roles_dir}}}/fqdn/v1.0.0" role = "{{{init.paths.roles_dir}}}/fqdn/v1.0.0"
fqdn = "master.tus.io" fqdn = "{{lookup('env', 'FREY_DOMAIN')}}"
} }
tasks { tasks {
file = "path=/mnt/tusd-data state=directory owner=www-data group=ubuntu mode=ug+rwX,o= recurse=yes" file = "path=/mnt/tusd-data state=directory owner=www-data group=ubuntu mode=ug+rwX,o= recurse=yes"

View File

@ -2,7 +2,9 @@
# So suitable for adding secret keys and such # So suitable for adding secret keys and such
# export DEBUG="frey:*" # export DEBUG="frey:*"
# export FREY_DOMAIN="master.tus.io"
# export FREY_ENCRYPTION_SECRET="***" # export FREY_ENCRYPTION_SECRET="***"
# source env.sh # source env.sh
# travis encrypt --add env.global "FREY_DOMAIN=${FREY_DOMAIN}"
# travis encrypt --add env.global "FREY_ENCRYPTION_SECRET=${FREY_ENCRYPTION_SECRET}" # travis encrypt --add env.global "FREY_ENCRYPTION_SECRET=${FREY_ENCRYPTION_SECRET}"