-
Notifications
You must be signed in to change notification settings - Fork 59
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
[KOGITO-7278][KSW-Guides] Building Workflow Images with Tekton Pipelines #333
Conversation
✅ Deploy Preview for tangerine-crostata-04a6bf ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
8b5090a
to
43067a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice, but this is not an Operator use case. It can me moved under "Quarkus" section, so users can use this guide to deploy their local projects to k8s via Tekton.
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/operator/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
20fa022
to
62ebf0b
Compare
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Show resolved
Hide resolved
Signed-off-by: desmax74 <[email protected]>
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
On OCP in the Pipeline menu, in the item PipelineRun, copy the following custom-workflow-image-pipeline-run.yaml file replacing the placeholder with your values. | ||
|
||
i.e. `image registry available at image-registry.openshift-image-registry.svc:5000/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does it mean ? is that the placeholder ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to indicate the the section to be replaced with the user values
- name: IMAGE value: "image-registry.openshift-image-registry.svc:5000/custom-namespace/<your-image-name>:latest"
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
Signed-off-by: desmax74 <[email protected]>
Signed-off-by: desmax74 <[email protected]>
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
serverlessworkflow/modules/ROOT/pages/cloud/quarkus/build-workflow-images-with-tekton.adoc
Outdated
Show resolved
Hide resolved
== Create the pipeline | ||
|
||
In the `custom-namespace` namespace, in the pipelines menu on Openshift UI, open the pipeline item, create it, and copy the following `custom-workflow-image-pipeline.yaml` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the `custom-namespace` namespace, in the pipelines menu on Openshift UI, open the pipeline item, create it, and copy the following `custom-workflow-image-pipeline.yaml` file. | |
In the `custom-namespace` namespace, in the pipelines menu on OpenShift UI, open the pipeline item, create it, and copy the following `custom-workflow-image-pipeline.yaml` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rephrase: "open the pipeline item, create it"
isn't these both options basically the same thing?
|
||
In the `custom-namespace` namespace, in the pipelines menu on Openshift UI, open the pipeline item, create it, and copy the following `custom-workflow-image-pipeline.yaml` file. | ||
It contains a pipeline to clone your git repo, build the image and push it to the local image registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It contains a pipeline to clone your git repo, build the image and push it to the local image registry. | |
It contains a pipeline that will clone your Git repository, build the Container Image and push it to the local image registry. |
name: deployment-name | ||
type: string | ||
- description: url of the git repo for the code of deployment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- description: url of the git repo for the code of deployment | |
- description: Git repository url. |
name: git-revision | ||
type: string | ||
- description: image to be built from the code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, "name of the built image"?
|
||
If you use the Tekton Dashboard on Minikube, Kind or on a Kubernetes cluster, copy the content of the yaml in the pipeline section. | ||
If you don't want to use the UI, replace the placeholder in the `custom-workflow-image-pipeline.yaml` (the previous yaml) and execute: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead using "replace placeholder", imho, it is better to use something like, "fill the required fields in the example file above and..."
== Create a PipelineRun to execute the pipeline | ||
|
||
The next step is to create a pipeline run with the details of your git repository and the desired name of the image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it PipelineRun or pipeline run?
The next step is to create a pipeline run with the details of your git repository and the desired name of the image. | ||
|
||
On OCP -> Pipeline menu -> PipelineRun, copy the following yaml file and replace the placeholders with your values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On OCP -> Pipeline menu -> PipelineRun, copy the following yaml file and replace the placeholders with your values. | |
On OpenShift -> Pipeline menu -> PipelineRun, copy the following yaml file and replace the placeholders with your values. |
image-registry.openshift-image-registry.svc:5000/custom-namespace/<your-image-name>:latest | ||
|
||
On Minikube, Kind or plain Kubernetes cluster you can install the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Minikube, Kind or plain Kubernetes cluster you can install the | |
On Minikube, Kind or Kubernetes cluster you can install the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or Vanilla Kubernetes
link:{https://tekton.dev/docs/dashboard/}[Tekton Dashboard] | ||
|
||
Otherwise replace the in the custom-workflow-image-pipeline-run.yaml and execute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace the...?
what is meant to be replaced?
If you have installed the Tekton CLI, you can run the pipeline with the following command: | ||
|
||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please take a look in the other adocs and use the same patter for yamls, shell commands, etc..
|
||
This command returns an id to check the execution with the cli in this way | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
|
||
At the end your image will be cluster's internal registry, like this example: | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made a few comments, please take a look.
…ines Signed-off-by: desmax74 <[email protected]>
= Building Workflows Images with Tekton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep it consistent.
= Building Workflows Images with Tekton | |
= Building Workflow Images with Tekton |
|
||
|
||
.Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason this is not in bold. Likely because the next line is not a list.
and a namespace where you can install Tekton i.e. `custom-namespace`. | ||
|
||
.OptionalPrerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Tekton CLI: | ||
|
||
- On Openshift in the Operator pipelines is available a link to download the correct cli from the operaotr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a screenshot?
|
||
If you are using OpenShift, you can install the Red Hat Pipeline Operator. | ||
If you are using Minikube, you can follow this link: {tekton_minikube}[[tekton guide for Minikube]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are using Minikube, you can follow this link: {tekton_minikube}[[tekton guide for Minikube]. | |
If you are using Minikube, you can follow this link: {tekton_minikube}[Tekton guide for Minikube]. |
If you are using Minikube, you can follow this link: {tekton_minikube}[[tekton guide for Minikube]. | ||
If you are using Kind you can follow this {tekton_kind}[Tekton guide for Kind]. | ||
If you want to use it on a plain kubernetes cluster, you can follow this {tekton_k8s}[Tekton guide for kubernetes]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use it on a plain kubernetes cluster, you can follow this {tekton_k8s}[Tekton guide for kubernetes]. | |
If you want to use it on a plain Kubernetes cluster, you can follow this {tekton_k8s}[Tekton guide for Kubernetes]. |
|
||
If you use the Tekton Dashboard on Minikube, Kind or on a Kubernetes cluster, copy the content of the yaml in the pipeline section. | ||
If you don't want to use the UI, replace the placeholder in the `custom-workflow-image-pipeline.yaml` (the previous yaml) and execute: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any explicit placeholders in that yaml.
On OCP -> Pipeline menu -> PipelineRun, copy the following yaml file and replace the placeholders with your values. | ||
|
||
i.e. `image registry available at image-registry.openshift-image-registry.svc:5000/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe clarify what is meant by this line.
|
||
On Minikube, Kind or plain Kubernetes cluster you can install the | ||
{tekton_dashboard}[Tekton Dashboard] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be mentioned and linked earlier.
---- | ||
|
||
At the end your image will be cluster's internal registry, like this example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end your image will be cluster's internal registry, like this example: | |
At the end your image will be in the cluster's internal registry, like this example: |
JIRA: https://issues.redhat.com/browse/KOGITO-7278
Description:
Building Workflow Images with Tekton Pipelines
Please make sure that your PR meets the following requirements:
KOGITO-XYZ Subject
[0.9.x] KOGITO-XYZ Subject
How to backport a pull request to a different branch?
In order to automatically create a backporting pull request please add one or more labels having the following format
backport-<branch-name>
, where<branch-name>
is the name of the branch where the pull request must be backported to (e.g.,backport-7.67.x
to backport the original PR to the7.67.x
branch).Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.