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

[CES-607] Add pm2 support to AppService modules #188

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Krusty93
Copy link
Contributor

List of changes

Override app startup command if PM2 entry point file is provided in AppService modules

Motivation and context

More teams are using PM2 to exploit full hardware capacity

Type of changes

  • Add new resources
  • Update configuration to existing resources
  • Remove existing resources

Does this introduce a change to production resources with possible user impact?

  • Yes, users may be impacted applying this change
  • No

Other information

Copy link

changeset-bot bot commented Dec 12, 2024

⚠️ No Changeset found

Latest commit: 8ad47a6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@BurnedMarshal BurnedMarshal left a comment

Choose a reason for hiding this comment

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

LGTM, maybe we can add a validation limiting the property pm2_startup_file_name with node stack

@gunzip
Copy link
Contributor

gunzip commented Dec 12, 2024

Why not allow users to define any startup command instead of binding it specifically to PM2?

@Krusty93
Copy link
Contributor Author

Krusty93 commented Dec 12, 2024

Why not allow users to define any startup command instead of binding it specifically to PM2?

To keep things simple. I don't know if we ever need to add custom commands. What are your thoughts?

@gunzip
Copy link
Contributor

gunzip commented Dec 12, 2024

Why do you want to constraint users to a peculiar usage of pm2 ? One user may have a pm2.json configuration in its own codebase for example

@Krusty93
Copy link
Contributor Author

Why do you want to constraint users to a peculiar usage of pm2 ? One user may have a pm2.json configuration in its own codebase for example

What's your proposal then? Wrapping the TF property? Because I liked the idea where devs don't need to know anything about it, but just saying "here's the file". However, I could be wrong and going against devs preferences

@gunzip
Copy link
Contributor

gunzip commented Dec 14, 2024

I vote to just forward the TF command_line property without constraint it to pm2. Consider that this module works for java as well.

@BurnedMarshal
Copy link

I vote to just forward the TF command_line property without constraint it to pm2. Consider that this module works for java as well.

I understand your point, but the use of PM2 is not a suggestion it's recommended by Microsoft. You what to shift the responsibility to the team to use it or the capability to configure it, but they don't use it. A good module handle the resources on the good way giving awareness to the team.

@gunzip
Copy link
Contributor

gunzip commented Dec 16, 2024

@BurnedMarshal that's right, but in this case, if we want to make pm2 mandatory on every NodeJS App Service, then we should make pm2_startup_file_name mandatory, with a default value, when NodeJS is specified as runtime.

@Krusty93
Copy link
Contributor Author

@BurnedMarshal that's right, but in this case, if we want to make pm2 mandatory on every NodeJS App Service, then we should make pm2_startup_file_name mandatory, with a default value, when NodeJS is specified as runtime.

@BurnedMarshal Are we confident to enable PM2 everywhere? Consider that developers will find a drift in the terraform configuration and they will be more interested in fixing the breaking change rather than doing tests and fine tuning on the PM2 configuration

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