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

ECS needs AppMesh proxy configuration support #4162

Closed
gary-cowell opened this issue Sep 19, 2019 · 6 comments
Closed

ECS needs AppMesh proxy configuration support #4162

gary-cowell opened this issue Sep 19, 2019 · 6 comments
Assignees
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container feature-request A feature should be added or improved. language/python Related to Python bindings

Comments

@gary-cowell
Copy link

❓ How do I configure AppMesh Proxy Configuration using Python CDK for ECS

The Question

Referencing this issue:

#2297 ((AppMesh): Create L2 Construct for AWS AppMesh)

I can see it uses a property override to configure the envoy proxy

I cannot see how I can leverage this technique using the Python CDK which appears not to support the same type of override, and I cannot find Python documentation on this matter.

I have tried the add_override method of CfnCustomResource, but this does not appear to be the same thing.

So, pending an expansion of the CDK to allow L1 access to the Proxy settings in a task definition, is it possible to achieve the above workaround in the Python CDK please? If so, how might this be done?

Environment

  • CDK CLI Version: 1.8.0 (build 5244f97)
  • Module Version: 1.8.0
  • OS: debian 10
  • Language: Python

Other information

@gary-cowell gary-cowell added the needs-triage This issue or PR still needs to be triaged. label Sep 19, 2019
@tsykora-verimatrix
Copy link

@gary-cowell afaik in CDK 1.8.0 (Python) AppMesh is not fully integrated.
In fact I have the same issue. I created the AppMesh, Virtual services, Virtual nodes, Virtual Routers and routes. I've the envoy side car container running, but without the proxy configuration it is not possible to pass traffic to it.
L2 constructs or options to enable proxy functionality is missing.
Only way that I'm aware of is to create own L2 construct but I haven't tried it yet.

@SomayaB SomayaB added language/python Related to Python bindings @aws-cdk/aws-ecs Related to Amazon Elastic Container guidance Question that needs advice or information. labels Sep 19, 2019
@rix0rrr rix0rrr changed the title Unable to configure AppMesh Proxy Configuration using Python CDK for ECS ECS needs AppMesh proxy configuration support Sep 20, 2019
@rix0rrr rix0rrr added feature-request A feature should be added or improved. and removed guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Sep 20, 2019
@rix0rrr
Copy link
Contributor

rix0rrr commented Sep 20, 2019

You're right, this requires more feature support on ECS' end. Tagging in @pkandasamy91.

In the mean time, I'm not sure what you mean by "I cannot see how I can leverage this technique using the Python CDK which appears not to support the same type of override".

The TypeScript code you linked should translate over to Python according to the language translation rules.

Something like the following should work:

cfn_def = task_definition.node.find_child('Resource')
cfn_def.add_property_override('ProxyConfiguration', {
    'Type': 'APPMESH',
    'ContainerName': 'envoy',
    'ProxyConfigurationProperties': [
    {
        'Name': 'IgnoredUID',
        'Value': '1337',
    },
    {
        'Name': 'ProxyIngressPort',
        'Value': '15000',
    },
    {
        'Name': 'ProxyEgressPort',
        'Value': '15001',
    },
    {
        'Name': 'AppPorts',
        'Value': [YOUR-APP-PORTS],
    },
    {
        'Name': 'EgressIgnoredIPs',
        'Value': '169.254.170.2,169.254.169.254',
    },
    ],
});

Does it not? And if it doesn't, can you please be more specific about the errors or behavior you're seeing?

@gary-cowell
Copy link
Author

Yes sorry , I was [and still am a bit] getting bogged down in the typescript->Python language translation and missed how to leverage the add_property_override. This did in fact solve my problem in the short term of being able to enable ProxyConfiguration on my task definitions, pending a cleaner way.

Thank you.

@RomainMuller RomainMuller removed their assignment Sep 20, 2019
@tsykora-verimatrix
Copy link

@rix0rrr (and @gary-cowell fyi) the override above will accept just a single app port.

@piradeepk
Copy link
Contributor

@gary-cowell proxyConfiguration support should now be available in the CDK: https://github.com/aws/aws-cdk/pull/4007/files. Please let us know if this does not solve your issue.

@piradeepk
Copy link
Contributor

Closing this issue. Please reopen if PR: #4007 does not solve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container feature-request A feature should be added or improved. language/python Related to Python bindings
Projects
None yet
Development

No branches or pull requests

6 participants