mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Fine-tune the Terraform configurations. Rework the Docker Compose file for deploying containers onto the swarm cluster. Environment is still non-functional. Signed-off-by: Scott Lowe <scott.lowe@scottlowe.org>
33 lines
1.4 KiB
HCL
33 lines
1.4 KiB
HCL
# Launch a Fedora Atomic Host 26 instance to serve as a manager
|
|
resource "aws_instance" "manager" {
|
|
ami = "${data.aws_ami.f26_atomic_ami.id}"
|
|
instance_type = "${var.mgr_flavor}"
|
|
key_name = "${var.keypair}"
|
|
vpc_security_group_ids = ["${aws_security_group.mgmt_sg.id}"]
|
|
subnet_id = "${aws_subnet.traefik_pub_subnet.id}"
|
|
depends_on = ["aws_internet_gateway.traefik_gw"]
|
|
tags {
|
|
Name = "manager"
|
|
tool = "terraform"
|
|
demo = "traefik"
|
|
area = "compute"
|
|
role = "manager"
|
|
}
|
|
}
|
|
|
|
# Launch some Fedora Atomic Host 26 instances to serve as worker nodes
|
|
resource "aws_instance" "worker" {
|
|
ami = "${data.aws_ami.f26_atomic_ami.id}"
|
|
count = "${var.num_wkr_nodes}"
|
|
instance_type = "${var.wkr_flavor}"
|
|
key_name = "${var.keypair}"
|
|
vpc_security_group_ids = ["${aws_security_group.web_sg.id}"]
|
|
subnet_id = "${aws_subnet.traefik_pub_subnet.id}"
|
|
depends_on = ["aws_internet_gateway.traefik_gw"]
|
|
tags {
|
|
tool = "terraform"
|
|
demo = "traefik"
|
|
area = "compute"
|
|
role = "worker"
|
|
}
|
|
}
|