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

On-cluster build: Enable custom buildpacks #984

Open
Tracked by #620
zroubalik opened this issue Apr 20, 2022 · 23 comments
Open
Tracked by #620

On-cluster build: Enable custom buildpacks #984

zroubalik opened this issue Apr 20, 2022 · 23 comments
Assignees
Labels
kind/enhancement pipelines issues related to on-cluster builds via Tekton Pipelines

Comments

@zroubalik
Copy link
Contributor

zroubalik commented Apr 20, 2022

Currently there's no way how we can build a funcion on cluster with a custom buildpack.
For example Go runtime specifies these additional builpacks:

buildpacks:
- paketo-buildpacks/go-dist
- ghcr.io/boson-project/go-function-buildpack:tip

pack library used for local build handles this properly and pulls those additional builpacks.

Though /cnb/lifecycle/* binaries used by buildpack Tekton Task has only access to builpacks that are copyied into the buillder image:

 /cnb/lifecycle/creator --help
Usage of lifecycle:
  -buildpacks string
    	path to buildpacks directory (default "/cnb/buildpacks")
...

We probably need to pull and copy these builpacks to this directory before we initiate the build.

@zroubalik zroubalik mentioned this issue Apr 20, 2022
29 tasks
@zroubalik zroubalik changed the title On-cluster build: enable custom buildpacks On-cluster build: Enable custom buildpacks Apr 20, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 20, 2022
@lance
Copy link
Member

lance commented Jul 20, 2022

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 20, 2022
@lance lance added this to the 0.99.0 Release milestone Jul 28, 2022
@lance
Copy link
Member

lance commented Jul 28, 2022

/kind feature-request

@grafvonb
Copy link
Contributor

/assign

@matejvasek
Copy link
Contributor

related: buildpacks/tekton-integration#30

@grafvonb
Copy link
Contributor

grafvonb commented Nov 8, 2022

Our challenge here, in my opinion, is that from a UX perspective, switching between local and on-cluster builds by simply adding the --remote flag should be seamless for the user, i.e. provide the same functionality.

However, we use the pack library locally, while buildpacks Tekton Task uses the lifecycle directly, as mentioned by @zroubalik above (https://github.com/tektoncd/catalog/blob/main/task/buildpacks/0.5/buildpacks.yaml#L136), which does not provide "the power" of pack.

If we look at the ways buildpacks can be specified for pack (https://buildpacks.io/docs/app-developer-guide/specify-buildpacks/) and the implementation behind it (https://github.com/buildpacks/pack/tree/main/pkg/buildpack), it will take some time to recreate even the loading and extracting functionality for all the cases.

So, how do we deal with this issue? Maybe we should start small and initially just support one (it's better than nothing), simple URI format, like URL for the custom buildbacks, and extend our func-buildpacks.yaml accordingly?

@zroubalik
Copy link
Contributor Author

zroubalik commented Nov 8, 2022

@grafvonb you are right, my idea was to extend func-buildpacks Tekton task, so it will pull, extract and copy (we can probably use skopeo for this?) buildpacks from theirs images to some directory mounted to a volume. The lifecycle binary has a parameter that can point to a directory that contains additional buildpacks (so we just need to copy/link the additional buildpacks there). I concur this is not the nicest solution, but I haven't found anything better.

Btw there's some ongoing work to improve buildpacks on this front, not sure about the current status though: https://cloud-native.slack.com/archives/C032UM9DZV4/p1654790078405669?thread_ts=1654718175.599989&cid=C032UM9DZV4

@grafvonb
Copy link
Contributor

grafvonb commented Nov 8, 2022

@zroubalik ok, I got it. Should I start with an initial implementation?

@zroubalik
Copy link
Contributor Author

@grafvonb it would be awesome if you can do so. Though might be worth checking that stuff I linked there ^, maybe there's some progress on that area that would enable us to use something nicer.

@grafvonb
Copy link
Contributor

grafvonb commented Nov 8, 2022

@zroubalik great, I'll do it. Could you please invite me to this slack workspace? Thx.

@grafvonb
Copy link
Contributor

grafvonb commented Nov 9, 2022

@grafvonb it would be awesome if you can do so. Though might be worth checking that stuff I linked there ^, maybe there's some progress on that area that would enable us to use something nicer.

@zroubalik very interesting, after 5 months the discussion about additional buildpacks support in Tekton's buildpacks task was started, yesterday came an update: https://cloud-native.slack.com/archives/C032UM9DZV4/p1667932092715799?thread_ts=1654718175.599989&cid=C032UM9DZV4. So there is no progress on this issue. Maybe we should take that over? Nevertheless, I will then start quite pragmatically with the first try for the scopeo solution.

@zroubalik
Copy link
Contributor Author

agree, thanks!

@grafvonb
Copy link
Contributor

Short update. The above discussion apparently ended a month ago with the sentence "I'll add the point to the agenda for the next one", which may simply mean "no-prio" status ;). As #1433 finally gets finalized I will get back to this topic.

@grafvonb
Copy link
Contributor

grafvonb commented Jan 9, 2023

I am back from vacation and continue to work on the solution.

@lance lance modified the milestones: 1.9.0 Release, Release 1.10 Feb 14, 2023
@lance
Copy link
Member

lance commented Mar 21, 2023

@grafvonb any updates here?

@grafvonb
Copy link
Contributor

@lance sorry, there's no progress there; I was blocked by #1598 but I think it's closed now from the standpoint of initial development so I can get back to this topic.

@grafvonb
Copy link
Contributor

grafvonb commented May 2, 2023

For testing purposes of this issue, it would be nice to have #1466 implemented, so I'm working on that issue first.

@lance
Copy link
Member

lance commented May 2, 2023

For testing purposes of this issue, it would be nice to have #1466 implemented, so I'm working on that issue first.

Thanks so much for your contributions @grafvonb!

@grafvonb
Copy link
Contributor

Depends on #1466. Still in evaluation.

@lkingland lkingland removed this from the Release 1.11 milestone Aug 23, 2023
@lkingland lkingland added kind/enhancement pipelines issues related to on-cluster builds via Tekton Pipelines and removed kind/feature-request labels Aug 23, 2023
Copy link
Contributor

github-actions bot commented Mar 6, 2024

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 6, 2024
@lkingland lkingland removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 21, 2024
Copy link
Contributor

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2024
@matejvasek
Copy link
Contributor

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement pipelines issues related to on-cluster builds via Tekton Pipelines
Projects
Status: 🏗 In progress
Development

No branches or pull requests

5 participants