diff options
author | Kelley Spoon <kelley.spoon@linaro.org> | 2022-11-22 14:01:53 -0600 |
---|---|---|
committer | Kelley Spoon <kelley.spoon@linaro.org> | 2022-11-22 14:01:53 -0600 |
commit | 2d9ac7b790ea02074b46834c806b9fb1f3d8fb15 (patch) | |
tree | 306dce496f3dd6002e821a137d64884fd6756250 | |
parent | 6c7a9b315b45f0595f4972ed4748f7aeea84079f (diff) |
obs: retire obs
EOL for the obs.linaro.org server
Signed-off-by: Kelley Spoon <kelley.spoon@linaro.org>
Change-Id: I8e3d05a4fbeb53ef1a3fa193abcddcc5b21b05eb
l--------- | obs/.role.conf | 1 | ||||
-rw-r--r-- | obs/obs-net.tf | 115 | ||||
-rw-r--r-- | obs/obs.tf | 83 | ||||
-rw-r--r-- | obs/obs.tfvars | 6 |
4 files changed, 0 insertions, 205 deletions
diff --git a/obs/.role.conf b/obs/.role.conf deleted file mode 120000 index 7ba25d6..0000000 --- a/obs/.role.conf +++ /dev/null @@ -1 +0,0 @@ -../.role.conf
\ No newline at end of file diff --git a/obs/obs-net.tf b/obs/obs-net.tf deleted file mode 100644 index 5d16b99..0000000 --- a/obs/obs-net.tf +++ /dev/null @@ -1,115 +0,0 @@ -# Web and and ssh, extend with OBS service ports later - -variable "route53_zone_id" { type = "string" } - -resource "aws_security_group" "obs-server-sg" { - name = "obs.linaro.org" - description = "Security group for OBS" - vpc_id = "${var.vpc_id}" - - # SSH access from anywhere - ingress { - from_port = 22 - to_port = 22 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - # HTTP access from anywhere - ingress { - from_port = 80 - to_port = 80 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - # HTTPS access from anywhere - ingress { - from_port = 443 - to_port = 443 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - # HTTP access from anywhere - ingress { - from_port = 5252 - to_port = 5252 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - # HTTPS access from anywhere - ingress { - from_port = 5352 - to_port = 5352 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - # incoming ping - ingress { - from_port = 8 - to_port = 0 - protocol = "icmp" - cidr_blocks = ["0.0.0.0/0"] - } - # outbound internet access - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_security_group" "obs-worker-sg" { - name = "obs-worker" - description = "Security group for obs-worker" - vpc_id = "${var.vpc_id}" - - # SSH access from anywhere - ingress { - from_port = 22 - to_port = 22 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - # OBS access from obs server - ingress { - from_port = 5454 - to_port = 5454 - protocol = "tcp" - cidr_blocks = ["34.203.111.54/32"] - } - # Any access from jenkins-master - ingress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["88.99.136.175/32"] - } - # Incoming ping - ingress { - from_port = 8 - to_port = 0 - protocol = "icmp" - cidr_blocks = ["0.0.0.0/0"] - } - # outbound internet access - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_eip" "obs-ip" { - instance = "${aws_instance.obs.id}" - vpc = true -} - -resource "aws_route53_record" "obs-dns" { - zone_id = "${var.route53_zone_id}" - name = "obs" - type = "A" - ttl = "60" - records = ["${aws_eip.obs-ip.public_ip}"] -} - diff --git a/obs/obs.tf b/obs/obs.tf deleted file mode 100644 index c61a0c7..0000000 --- a/obs/obs.tf +++ /dev/null @@ -1,83 +0,0 @@ -variable "ami_key_pair_name" {} -variable "subnet_id" { type = "string" } -variable "vpc_id" { type = "string" } - -provider "aws" { - region = "us-east-1" -} - -terraform { - backend "s3" { - bucket = "linaro-terraform-state" - key = "lss/production/obs.tfstate" - region = "us-east-1" - } -} - -resource "aws_s3_bucket" "bucket" { - bucket = "linaro-obs-downloads" - acl = "public-read" - - cors_rule { - allowed_headers = ["*"] - allowed_methods = ["PUT","POST"] - allowed_origins = ["*"] - expose_headers = ["ETag"] - max_age_seconds = 3000 - } - - policy = <<EOF -{ - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "PublicReadForGetBucketObjects", - "Effect": "Allow", - "Principal": { - "AWS": "*" - }, - "Action": "s3:GetObject", - "Resource": "arn:aws:s3:::linaro-obs-downloads/*" - } - ] -} -EOF -} - -data "aws_ami" "ubuntu" { - most_recent = true - - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-arm64-server-*"] - } - - owners = ["099720109477"] # Official Canonical ID -} - -resource "aws_instance" "obs" { - ami = "ami-0c1481f2732d82982" # "${data.aws_ami.ubuntu.id}" - instance_type = "a1.xlarge" - subnet_id = "${var.subnet_id}" - vpc_security_group_ids = ["${aws_security_group.obs-server-sg.id}"] - key_name = "${var.ami_key_pair_name}" - tags = { - Name = "OBS server" - } -} - -resource "aws_volume_attachment" "obs_data_att" { - device_name = "/dev/xvdb" - volume_id = "${aws_ebs_volume.obs_data.id}" - instance_id = "${aws_instance.obs.id}" -} - -resource "aws_ebs_volume" "obs_data" { - availability_zone = "us-east-1a" - size = 800 - type = "st1" - tags { - Backup = "yes" - Name = "OBS server DATA" - } -} diff --git a/obs/obs.tfvars b/obs/obs.tfvars deleted file mode 100644 index d36e189..0000000 --- a/obs/obs.tfvars +++ /dev/null @@ -1,6 +0,0 @@ -route53_zone_id = "Z27NRA2FV79C84" -route53_zone_name = "ctt.linaro.org" -region = "us-east-1" -vpc_id = "vpc-097c92bf21a7082e9" # 172.31.0.0/16 -subnet_id = "subnet-08375ce285b190f06" -ami_key_pair_name = "systems-bot-ssh" |