#airship (2019-09)
Home of Airship ECS Modules ( https://github.com/blinkist/terraform-aws-airship-ecs-service / https://github.com/blinkist/terraform-aws-airship-ecs-cluster )
Archive: https://archive.sweetops.com/airship/
2019-09-03
Looks like a breaking change from https://github.com/blinkist/terraform-aws-airship-ecs-service/pull/73 ?
I added support for deploying ECS scheduled tasks based on CloudWatch event rules, and I updated the website documentation.
Any ideas @Mads Hvelplund?
I’ll have a look tomorrow after work.
2019-09-04
hello everyone, I am finding a way to do CI/CD for the ECS services created by the Airship module. Ideally, I would like to make it work with Gitlab CI. Looking forward to hearing your suggestions/experience. Thanks!
Hey guys I’m having an issue with ecs service
module "prod-ecs-cluster" {
source = "blinkist/airship-ecs-cluster/aws"
version = "0.5.1"
name = "production"
create_roles = false
create_autoscalinggroup = false
tags = "${var.prod-account-tags}"
}
module "prod_xxx_fargate" {
source = "blinkist/airship-ecs-service/aws"
version = "0.9.8"
name = "heartbeat"
region = "eu-west-1"
fargate_enabled = true
ecs_cluster_id = "${data.aws_ssm_parameter.prod_ecs_cluster_id.value}"
awsvpc_enabled = true
awsvpc_subnets = "${split(",", data.aws_ssm_parameter.prod_private_subnets.value)}"
awsvpc_security_group_ids = ["${aws_security_group.prod_heartbeat.id}"]
load_balancing_type = "none"
load_balancing_properties_route53_record_type = "NONE"
container_cpu = "512"
container_memory = "1024"
container_memory_reservation = "1024"
container_name = "heartbeat"
capacity_properties_desired_capacity = "1"
capacity_properties_desired_min_capacity = "1"
capacity_properties_desired_max_capacity = "1"
bootstrap_container_image = "XXXX.dkr.ecr.eu-west-1.amazonaws.com/XXXX/heartbeat:latest"
tags = "${var.prod-tags}"
}
When applying I get this error
module.prod_heartbeat_fargate.aws_cloudwatch_event_target.scheduled_task: Creating...
arn: "" => "arn:aws:ecs:eu-west-1:XXXX:cluster/production"
ecs_target.#: "" => "1"
ecs_target.0.group: "" => "default"
ecs_target.0.launch_type: "" => "FARGATE"
ecs_target.0.network_configuration.#: "" => "1"
ecs_target.0.network_configuration.0.assign_public_ip: "" => "false"
ecs_target.0.network_configuration.0.security_groups.#: "" => "1"
ecs_target.0.network_configuration.0.security_groups.2188918090: "" => "sg-01fc127021b5c06e2"
ecs_target.0.network_configuration.0.subnets.#: "" => "3"
ecs_target.0.network_configuration.0.subnets.1208029751: "" => "subnet-009c1eef5052c165e"
ecs_target.0.network_configuration.0.subnets.1240492469: "" => "subnet-016c5d63421f2b356"
ecs_target.0.network_configuration.0.subnets.3423134812: "" => "subnet-0b7f0f0a1f22789ec"
ecs_target.0.task_count: "" => "1"
ecs_target.0.task_definition_arn: "" => "arn:aws:ecs:eu-west-1:XXXX:task-definition/production-heartbeat:1"
rule: "" => "heartbeat_scheduled_task"
target_id: "" => "<computed>"
Releasing state lock. This may take a few moments...
Error: Error applying plan:
1 error occurred:
* module.prod_heartbeat_fargate.aws_cloudwatch_event_target.scheduled_task: 1 error occurred:
* aws_cloudwatch_event_target.scheduled_task: Creating CloudWatch Event Target failed: ValidationException: RoleArn is required for target arn:aws:ecs:eu-west-1:XXXX:cluster/production.
status code: 400, request id: ab07b8c1-342d-4b5b-a00d-604cfe95de5c
as a solution I reverted back to blinkist/airship-ecs-service/aws
v 0.9.4
and set
load_balancing_properties_lb_arn = "aXXXX"
i can reproduce your bug report with this snippet. i’ll try to fix it.
@IvanM & @joshmyers: I think I found the problem. stuff related to scheduled tasks added in PR #73 was being created even for non-scheduled tasks. I can run your example now with my fix. I’ll go over it a final time and create a pull request with the fix.
Awesome :)
let’s not celebrate until you can see it works I’ve sent you a link to the PR
cool!
i’ll take a look now
2019-09-05
0.9.9: Fixed a bug where scheduled task resources were created by accident (… …#76) Added example of headless service
Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service
Guys is there pls a way how to in blinkist/airship-ecs-service/aws
enable to access ECR from Fargate service in public subnets?
I have a fargate service without ALB/NLB in public subnets. I see that it does not assign public IP - I guess that is the issue
even if I assign ALB and have it deployed in public subnet I still can’t pull image from ECR
2019-09-08
guys I would have a PR for the https://github.com/blinkist/terraform-aws-airship-ecs-service however, I can’t push to new branch Who should I contact in order to push it?
Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service
2019-09-16
0.6.1: Removed the default use of detailed monitoring. (#17) Reduces CloudWatch costs for metrics by 80%
Terraform module which creates an ECS Cluster with integrated instance scaling and EFS mounting capability - blinkist/terraform-aws-airship-ecs-cluster
@maarten Hi Maarten I created a pull request regarding to Scheduled tasks. I wonder if you would like to use it. I created it because we have a situation, where we have multiple clusters, with the same service in each cluster. Therfore we needed an unique name for the cloudwatch event rule: https://github.com/blinkist/terraform-aws-airship-ecs-service/pull/77
In case you need the same service name in multiple clusters. In case event rule can’t be named the same as the service.
2019-09-20
hey everyone any change of supporting multiple target groups for ecs service? https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecs-services-now-support-multiple-load-balancer-target-groups/
Hi @IvanM, I can take a look. What is your use-case, have both internal and external lb connected ?
My use case is to have one Fargate service running and one NLB that will be listening on multiple ports - that means multiple target groups
2019-09-23
Hello - I believe there is a problem with scaling in services in https://github.com/blinkist/terraform-aws-airship-ecs-service ; scale out works as expected but scaling in fails with an empty error message when triggered. There is little more details here https://github.com/blinkist/terraform-aws-airship-ecs-service/issues/79 . I have created the pull request https://github.com/blinkist/terraform-aws-airship-ecs-service/pull/78 which sets a metric_lower_bound
for scaling in events and a metric_upper_bound
for scaling out. This seem to fix the problem in our case at least.
Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service
what We are consistently seeing that scale down events are not respected as Cloudwatch reports an error with an empty string as error message. We need scale downs to work to ensure we can gain true…
… correctly but caused an exception with an empty error message, when scale downs were attempted.
Thanks Morten, I’ve merged it.
Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service
what We are consistently seeing that scale down events are not respected as Cloudwatch reports an error with an empty string as error message. We need scale downs to work to ensure we can gain true…
… correctly but caused an exception with an empty error message, when scale downs were attempted.
0.9.9.0: Health port variable (#80) health check port as variable for alb_handling
health port as variable
Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service
0.9.9.1: Fixing autoscaling for ECS services: The previous policy did scale up… … correctly but caused an exception with an empty error message, when scale downs were attempted. (<a class=”issue-link js-issue-link” data-error-text=”Failed to load issue title” data-id=”496833286” data-permission-text=”Issue title is private” data-url=”https://github.com/blinkist/terraform-aws-airship-ecs-service/issues/78” data-hovercard-type=”pull_request” data-hovercard-url=”/blinkist/terraform-aws-airship-ecs-service/pull/78/hovercard”…
Terraform module which creates an ECS Service, IAM roles, Scaling, ALB listener rules.. Fargate & AWSVPC compatible - blinkist/terraform-aws-airship-ecs-service
… correctly but caused an exception with an empty error message, when scale downs were attempted.