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

Extending resource management to include build containers #3826

Open
philm opened this issue Jan 21, 2020 · 6 comments
Open

Extending resource management to include build containers #3826

philm opened this issue Jan 21, 2020 · 6 comments

Comments

@philm
Copy link
Contributor

philm commented Jan 21, 2020

Feature request / discussion - we've been using the docker-options subcommands to set CPU and memory constraints on build containers, e.g.

dokku docker-options:add my-app-name build "--cpus='0.5' -m='512m'"

Would be great if we could manage it through the newer resource:limit subcommand.

Perhaps setting --process-type to "build" would have a special meaning here. Thoughts?

@josegonzalez
Copy link
Member

What if you actually had a build process type?

@philm
Copy link
Contributor Author

philm commented Jan 24, 2020

Would you need to define a command in the Procfile or could there be a system default based on the deployment method chosen (buildpack, Dockerfile, etc)? But I like this idea as it would work with the existing resource management interface.

@josegonzalez
Copy link
Member

I wonder if we could do a github search of all Procfiles that have a build process type. We already treat web and release as special process types, so maybe adding build wouldn't be too bad?

I think bigquery has github as a dataset, but not sure if the above is something we can query...

@josegonzalez
Copy link
Member

Some resources on Procfiles:

Only the web process is consistently unique across platforms. release is supported by Dokku and Heroku, while cmd is a special construct on Deis.

Based on the above procfiles, it seems safe to say that those are helper entries for building apps, so we could definitely special-case it in Dokku and have caveats around it's usage in our docs.

@josegonzalez
Copy link
Member

Okay finally getting back to this, we can definitely support it at the build process-type. That will be special for the resource plugin (other plugins can add it later) and we'll want to add a warning to the docs regarding using it in your Procfile for anything else.

We'll want to expose this via the docker-args-process-build hook, which is then consumed by the various builders.

We also need to filter out certain resources from anything but the herokuish builder, as the specific builders don't always support each resources. It looks like really the only universal one is memory - though the lambda builder doesn't support anything - and the rest are variable in what they do support.

We should add resources limits to the lambda builder (it should support anything the dockerfile builder supports) and add memory support to the pack builder.

Finally, we should use resource limits, not resource reservations.

@josegonzalez josegonzalez modified the milestones: v0.33.0, v0.34.0 Oct 16, 2023
@josegonzalez josegonzalez modified the milestones: v0.34.0, v0.35.0 Mar 13, 2024
@josegonzalez josegonzalez modified the milestones: v0.35.0, v0.36.0 Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants