Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC2LT #324

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

LC2LT #324

wants to merge 6 commits into from

Conversation

MariuszJozwiak
Copy link
Contributor

@MariuszJozwiak MariuszJozwiak commented Jan 25, 2023

In 2021 and 2022, AWS provided details on the timeline for the deprecation of Amazon EC2 Launch Configurations. In the 2022 communication, we announced that accounts created on or after April 1, 2023, would no longer be able to create launch configurations through the AWS Management console. That date has shifted and is now June 1, 2023. This means that new accounts created on or after June 1, 2023, will only be able to create launch configurations through our API, command line interface (CLI), CloudFormation (CFN), and Terraform. This is intended to ensure that automation scenarios that have yet to be migrated to use Launch Templates are not impacted.

Copy link
Member

@Szpadel Szpadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove .DS_Store files

roles/cs.aws-autoscaling/tasks/create.yml Show resolved Hide resolved
roles/cs.aws-ec2-cleanup/tasks/main.yml Outdated Show resolved Hide resolved
@krisdante
Copy link
Contributor

I will test it before merging

Copy link
Member

@Szpadel Szpadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update start stop jobs to not use Launch Configurations anymore

shell: |
aws ec2 describe-launch-templates \
--region '{{ aws_region }}' \
--filter "Name=tag:Project,Values={{ mageops_project }}" --filter "Name=tag:Environment,Values={{ mageops_environment }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filter using all tags, in the same way like it's done in roles/cs.aws-ec2-cleanup/tasks/main.yml


roles:
- role: cs.aws-ec2-cleanup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why cannot we reuse this role?

@@ -144,6 +151,8 @@
eni_id: "{{ item }}"
force_detach: true
with_items: "{{ _aws_eni_to_remove }}"
ignore_errors: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not ignore errors here,
this is failing because aws does not allow manually managing network interfaces for lambdas
https://aws.amazon.com/premiumsupport/knowledge-center/lambda-eni-find-delete/
This step should be removed as is not required anymore

@Szpadel
Copy link
Member

Szpadel commented Feb 1, 2023

userdata passing no longer works

@MariuszJozwiak MariuszJozwiak force-pushed the dev-LC2LT-flat branch 3 times, most recently from 1f02931 to 402641a Compare February 16, 2023 13:02
@Szpadel Szpadel force-pushed the dev-LC2LT-flat branch 2 times, most recently from f45cf22 to c43c4bf Compare February 16, 2023 21:28
Copy link
Member

@Szpadel Szpadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Mariusz Jóźwiak and others added 6 commits May 15, 2023 14:09
ec2_launch_template normally only support resource tags
  without possibility to tag launch template itselt
  this makes it much harder to manage them in fully automatic way
  without requiring very specific names
This modification makes resource_tags and tags parameter
  to have different meaning (originally those are aliases)
tags - those are tags that are assigned to Launch Template
resource_tags - those are tags that are assigned to ec2 instances and
  ebs volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants