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

feature request: running pipelines locally #235

Open
BenTheElder opened this issue Nov 10, 2018 · 12 comments
Open

feature request: running pipelines locally #235

BenTheElder opened this issue Nov 10, 2018 · 12 comments
Labels
area/roadmap Issues that are part of the project (or organization) roadmap (usually an epic) design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@BenTheElder
Copy link

Hello from kubernetes/test-infra! 👋 -- We think the pipeline is really interesting and we'd like to use it more, and we (I) have a feature request which we get a lot with our current "jobs" system:

how do I test this [job definition] on my machine

and

how do I run this test job [to test code for some repo using the jobs for ci]

We've considered solving this for "ProwJobs" and while looking at prior art I found https://github.com/GoogleCloudPlatform/cloud-build-local, which has an implementation of this for GCB which looks a bit similar ...

I'd like to start a discussion around how we could potentially accomplish this for the build pipeline.

For the first case just being able to run it locally in some form is sufficient, for the second case users would likely want to be able to mount not-yet-pushed code to the job and build / test that.

If you all are interested, I'd like to help with this.

I think it could be a "killer" feature to be able to iterate on running and testing your containerized pipelines locally before submitting them to whatever CI you will use in production. I know Prow users would love this.

cc @bobcatfish

@bobcatfish bobcatfish added design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Nov 10, 2018
@imjasonh
Copy link
Member

I think we should recommend minikube for local development/iteration of pipelines, and have good documentation to cover this use case.

cloud-build-local effectively packages GCB's custom container orchestration into a locally runnable binary, but if I could go back in time I'd prefer to use K8s' container orchestration rather than building a minimal bespoke one ourselves. (This repo hopefully moves us toward resolving this long-standing annoyance 😉)

If minikube is too heavy a dependency to take, it might be possible to do minimal local orchestration with docker run calls, but then the prod implementation won't match the local development implementation, so you're not really buying much.

@BenTheElder
Copy link
Author

... and have good documentation to cover this use case.

That would be great.

If minikube is too heavy a dependency to take, it might be possible to do minimal local orchestration with docker run calls, ...

That's what I was thinking. Running a cluster is a little bit heavy, this is coming from someone working on another "light" local cluster (sigs.k8s.io/kind).

... but then the prod implementation won't match the local development implementation, so you're not really buying much.

Your minikube deployment won't look quite like prod either. 🙃
On the other hand, getting your test / build tools / scripts running in a container and figuring out how to write a pipeline spec is pretty different vs running them without a pipeline or a container.

I understand not wanting to implement that though :-)


To the other point, what is the expectation around iterating on the code under build / test rather than the pipeline? This seems further heavy handed at the moment, it looks like we need to tell people to push their code first and then tweak the pipeline to download their branch / fork instead ...?

@bobcatfish
Copy link
Collaborator

To the other point, what is the expectation around iterating on the code under build / test rather than the pipeline? This seems further heavy handed at the moment, it looks like we need to tell people to push their code first and then tweak the pipeline to download their branch / fork instead ...?

That's a great point, I think this is
a) not something we've thought through yet and also
b) way too much to ask folks to push their code first

We should definitely push for being able to try this locally without pushing anything!

As far as our roadmap is concerned we probably won't have this (#235) prioritized for our current milestone but I think we could look at it for the next one! (Unless one of our contributors wants to take a look in the meantime!!)

@bobcatfish
Copy link
Collaborator

@ndeloof's https://github.com/ndeloof/kitten could be a super promising answer to part of this :D

@bobcatfish
Copy link
Collaborator

Quick update: I think this is looking more and more promising as we add features like workspaces and also as the CLI matures - the CLI could be an interesting way to explore a local execution mode (+ @sbwsg )

@carltonmason
Copy link

FYI, I've been happily running Tekton locally on my Mac with Rancher's k3d.

k3d is very lightweight compared to minikube.

I recently created a gist for how I set it up https://gist.github.com/carltonmason/72a494080887175245a8abb7d3dc14f7.

@tekton-robot
Copy link
Collaborator

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 14, 2020
@tekton-robot
Copy link
Collaborator

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Collaborator

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@bobcatfish
Copy link
Collaborator

This is currently in our roadmap but also under debate in tektoncd/community#145

/lifecycle frozen

@bobcatfish bobcatfish reopened this Aug 14, 2020
@tekton-robot tekton-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Aug 14, 2020
@bobcatfish bobcatfish added the area/roadmap Issues that are part of the project (or organization) roadmap (usually an epic) label Aug 24, 2020
@jerop jerop added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Apr 20, 2021
@afrittoli afrittoli added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 17, 2021
@jerop
Copy link
Member

jerop commented Feb 17, 2023

There's a solution from @vdemeester - https://github.com/vdemeester/buildkit-tekton

Maybe we can consider this done after adopting the project? tektoncd/community#674
@vdemeester can we discuss the adoption of buildkit in the next governance/community meeting?

@vdemeester
Copy link
Member

@jerop I need to update the project a bit, but yes, this is definitely something we could discuss 👼🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/roadmap Issues that are part of the project (or organization) roadmap (usually an epic) design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: Todo
Status: Todo
Development

No branches or pull requests

8 participants