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

feat(cli): allow backend service to not expose any port #1478

Merged
merged 2 commits into from
Oct 10, 2020

Conversation

iamhopaul123
Copy link
Contributor

fix #1435.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@iamhopaul123 iamhopaul123 requested a review from a team as a code owner October 7, 2020 23:58
@iamhopaul123 iamhopaul123 requested a review from kohidave October 7, 2020 23:58
@iamhopaul123
Copy link
Contributor Author

Manual Test

Manifest

# The manifest for the "test" service.
# Read the full specification for the "Backend Service" type at:
#  https://github.com/aws/copilot-cli/wiki/Manifests#backend-svc

# Your service name will be used in naming your resources like log groups, ECS services, etc.
name: test
# Your service does not allow any traffic.
type: Backend Service

image:
  # Docker build arguments. You can specify additional overrides here. Supported: dockerfile, context, args
  build: Dockerfile

# Number of CPU units for the task.
cpu: 256
# Amount of memory in MiB used by the task.
memory: 512
# Number of tasks that should be running in your service.
count: 1

After deployment

✔ Deployed test.

svc show

Which service of my-project would you like to show? test
About

  Application       my-project
  Name              test
  Type              Backend Service

Configurations

  Environment       Tasks               CPU (vCPU)          Memory (MiB)        Port
  test              1                   0.25                512                 -

Service Discovery

  Environment       Namespace

Variables

  Name                                Environment         Value
  COPILOT_APPLICATION_NAME            test                my-project
  COPILOT_ENVIRONMENT_NAME            test                test
  COPILOT_LB_DNS                      test                my-pr-Publi-1UZT971FFE5I-1512931134.us-west-2.elb.amazonaws.com
  COPILOT_SERVICE_DISCOVERY_ENDPOINT  test                my-project.local
  COPILOT_SERVICE_NAME                test                test

@iamhopaul123 iamhopaul123 force-pushed the cli/backend-svc-no-port branch from dd880cc to 8b99efe Compare October 8, 2020 00:03
@efekarakus efekarakus requested review from huanjani and removed request for kohidave October 8, 2020 16:26
@kohidave
Copy link
Contributor

kohidave commented Oct 8, 2020

Can you ensure that you can add a port after the service is created w/o a port and that service discovery works, please?

@iamhopaul123
Copy link
Contributor Author

Can you ensure that you can add a port after the service is created w/o a port and that service discovery works, please?

It works! I tested on the multi-svc-app e2e suite (deploy frontend and backend with no port first, then redeploy backend with port 80)

Copy link
Contributor

@huanjani huanjani left a comment

Choose a reason for hiding this comment

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

LGTM!

@hnrc
Copy link
Contributor

hnrc commented Oct 9, 2020

As far as I'm concerned this also closes #1246 😄

@efekarakus
Copy link
Contributor

@hnrc yay! how do you do the "SNS <-> SQS <-> Service" integration today?

@hnrc
Copy link
Contributor

hnrc commented Oct 9, 2020

@efekarakus SNS and SQS is managed by Cloudformation and Service is just a dumb infinite loop polling SQS.

@iamhopaul123 iamhopaul123 force-pushed the cli/backend-svc-no-port branch from b5d8de4 to 630d4eb Compare October 10, 2020 04:25
@mergify mergify bot merged commit f9c8faf into aws:mainline Oct 10, 2020
thrau pushed a commit to localstack/copilot-cli-local that referenced this pull request Dec 9, 2022
<!-- Provide summary of changes -->
fix aws#1435.
<!-- Issue number, if available. E.g. "Fixes aws#31", "Addresses aws#42, 77" -->

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
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.

Shouldn't ask for port for backend service
5 participants