From dfb0e1aa4b36597549cefabd09a85b44091b57d9 Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Wed, 30 Aug 2023 14:52:29 -0700 Subject: [PATCH 1/8] viewing logs how to --- docs/modules/ROOT/nav-how-to-guides.adoc | 1 + .../how-to-guides/proc_viewing_logs.adoc | 99 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc diff --git a/docs/modules/ROOT/nav-how-to-guides.adoc b/docs/modules/ROOT/nav-how-to-guides.adoc index 8a7aa6d6..8bb6662b 100644 --- a/docs/modules/ROOT/nav-how-to-guides.adoc +++ b/docs/modules/ROOT/nav-how-to-guides.adoc @@ -19,6 +19,7 @@ *** xref:how-to-guides/Secure-your-supply-chain/proc_inspect-slsa-provenance.adoc[Downloading your SLSA provenance] *** xref:how-to-guides/Secure-your-supply-chain/proc_java_dependencies.adoc[Configuring dependencies rebuild for Java apps in the CLI] ** xref:how-to-guides/proc_managing-compliance-with-the-enterprise-contract.adoc[Managing compliance with the Enterprise Contract] +** xref:how-to-guides/proc_viewing_logs.adoc[Viewing logs] ** xref:how-to-guides/proc_delete_application.adoc[Deleting an application] diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc new file mode 100644 index 00000000..be9de68a --- /dev/null +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -0,0 +1,99 @@ += Viewing logs + +{ProductName} generates logs when it builds, checks, and deploys components of your application. Reading logs can be your first step to understand why the build or checks failed. + +You can access pod and Task logs using both the UI and CLI, you can also download any logs to your local machine. We store logs for the 10 most recent PipelineRuns executed in the namespace but you can start a new build pipeline and {ProductName} will generate a new set of logs for you. + +== Types of logs + +* *Pod logs* show health and status of a running Kubernetes pod within your application. {ProductName} creates pod logs when it starts your application in a pod on an OpenShift cluster so you can watch how it boots your application in real time. +* *Task logs* are generated for all Tasks of a build pipeline. Both default and custom build pipelines have PipelineRuns of types *Build* and *Test*. ++ +Logs for *Test* PipelineRuns are the same for all pipelines, they log how a build is verified with an Enterprise Contract (EC). However logs for *Build* PipelineRuns differ for default and custom build pipelines: + +** Logs for default build pipelines log how {ProductName} clones a Git repository with your code or our sample code, builds container images with your application, checks the images, and generates a SBOM. +** Custom build pipelines have PipelineRuns that run on opening pull requests and on push to the Git repository, and logs for different PipelineRuns differ. On-push PipelineRuns clone a Git repo and build a container image with a component. On-pull-request PipelineRuns also run several advanced checks. + +== Viewing pod logs in the web UI + +.Prerequisites + +* You have created an application in {ProductName}. + +.Procedure + +To view pod logs for a component: + +* Navigate to the *Components* tab > *View pod logs*. +** A pop-up window allows you to view pod logs in the UI or download them to your machine using the *Download* button. + +== Viewing Task logs in the web UI + +In the UI you can view Task logs all together on one screen or choose to view each Task log separately, together with other Task details. + +.Prerequisites + +* You have created an application in {ProductName}. + +.Procedure + +To view all Task logs displayed together on one screen: + +. Navigate to the *Activity* tab > *Pipeline runs*. +. Select a PipelineRun you need > Navigate to the *Logs* tab. + +To view logs for a particular Task: + +. Navigate to the *Activity* tab > *Pipeline runs*. +. Select a PipelineRun you need. You have 2 options from here: +.. Navigate to the *Details* tab. In a graphic representation of a pipeline called *Pipeline run details* select a Task you need. A side panel will open that includes the *Logs* tab. ++ +OR ++ +.. Navigate to the *Task runs* tab > Select a TaskRun you need > Navigate to the *Logs* tab. + +== Viewing Task logs with the Tekton CLI + +.Prerequisites + +* You have installed the link:https://tekton.dev/docs/cli[Tekton CLI]. +* You have created an application in {ProductName}. + +.Procedure + +To view Task logs with the Tekton CLI: + +. List the existing PipelineRuns: ++ +[source] +-- +tkn pr list +-- + +. Copy a name of a PipelineRun you need logs for. +. Access logs for a particular PipelineRun: ++ +[source] +-- +tkn pr logs +-- + +[NOTE] +==== +In the Tekton CLI you can use `pr` as a shortcut for the PipelineRun commands. +==== + +== Troubleshooting + +{ProductName} allows you to view logs for the 10 most recent PipelineRuns executed in the namespace. When logs aren't available any longer you see the following message instead of logs: ++ +[source] +-- +Logs are no longer accessible for . +-- + +You can start a new build pipeline for your components and {ProductName} will generate a new set of logs. + +== Privacy notice + +There is currently no limitation on the data retention period. From 183ba01940f742745624c56caf5f7e5d1fac5ad5 Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:10:13 -0700 Subject: [PATCH 2/8] quick formatting fix --- docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc index be9de68a..74091ded 100644 --- a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -80,13 +80,13 @@ tkn pr logs [NOTE] ==== -In the Tekton CLI you can use `pr` as a shortcut for the PipelineRun commands. +In the Tekton CLI you can use `__pr__` as a shortcut for the PipelineRun commands. ==== == Troubleshooting {ProductName} allows you to view logs for the 10 most recent PipelineRuns executed in the namespace. When logs aren't available any longer you see the following message instead of logs: -+ + [source] -- Logs are no longer accessible for . From 3432fbceb8fe1cccd3ee5618a5f4fe8a3677a9ec Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:20:06 -0700 Subject: [PATCH 3/8] adding privacy notice --- .../pages/how-to-guides/proc_viewing_logs.adoc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc index 74091ded..b1ce596e 100644 --- a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -96,4 +96,18 @@ You can start a new build pipeline for your components and {ProductName} will ge == Privacy notice -There is currently no limitation on the data retention period. +{ProductName} stores pod logs on an OpenShift cluster until pods are pruned. + +For PipelineRuns and TaskRuns, we forward logs data to several locations: + +* Logs are stored on an OpenShift cluster and in its persistent storage volumes until pods are pruned. On the cluster, we store logs for the 10 most recent PipelineRuns executed in the namespace. +* Logs are sent to Amazon Relational Database Service (Amazon RDS). We store Tekton Results there that are a data source for logs, so you can access logs after they are pruned from the cluster. These logs are not automatically deleted. ++ +[NOTE] +==== +Deleting an application or a component will not delete its logs from the cluster or RDS. However, deleting a workspace will delete these logs. +==== + +* Logs are sent to Amazon Simple Storage Service (Amazon S3), Amazon CloudWatch, and Splunk, where we store them according to our data retention policy. These logs are for internal Red Hat usage, for support and security purposes. They are not pruned or deleted when a workspace is deleted. + +Logs data is also part of our back ups that we create for disaster recovery purposes. From f3f9196be06c8b4775f561fc78aee4e0dbbf7722 Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:10:24 -0700 Subject: [PATCH 4/8] peer review feedback --- .../how-to-guides/proc_viewing_logs.adoc | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc index b1ce596e..ffd591a0 100644 --- a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -2,51 +2,52 @@ {ProductName} generates logs when it builds, checks, and deploys components of your application. Reading logs can be your first step to understand why the build or checks failed. -You can access pod and Task logs using both the UI and CLI, you can also download any logs to your local machine. We store logs for the 10 most recent PipelineRuns executed in the namespace but you can start a new build pipeline and {ProductName} will generate a new set of logs for you. +You can access pod and Task logs with both the UI and CLI, and you can download these logs to your local machine. {ProductName} stores logs for the 10 most recent PipelineRuns that are executed in the namespace. However, you can also start a new build pipeline to generate a new set of logs. == Types of logs -* *Pod logs* show health and status of a running Kubernetes pod within your application. {ProductName} creates pod logs when it starts your application in a pod on an OpenShift cluster so you can watch how it boots your application in real time. +* *Pod logs* show the health and status of a running Kubernetes pod within your application. {ProductName} creates pod logs when it starts your application in a pod on an OpenShift cluster so you can watch how it boots your application in real time. * *Task logs* are generated for all Tasks of a build pipeline. Both default and custom build pipelines have PipelineRuns of types *Build* and *Test*. + Logs for *Test* PipelineRuns are the same for all pipelines, they log how a build is verified with an Enterprise Contract (EC). However logs for *Build* PipelineRuns differ for default and custom build pipelines: -** Logs for default build pipelines log how {ProductName} clones a Git repository with your code or our sample code, builds container images with your application, checks the images, and generates a SBOM. +** Logs for default build pipelines log how {ProductName} clones a Git repository with your code or our sample code, builds container images with your application, checks the images, and generates an SBOM. ** Custom build pipelines have PipelineRuns that run on opening pull requests and on push to the Git repository, and logs for different PipelineRuns differ. On-push PipelineRuns clone a Git repo and build a container image with a component. On-pull-request PipelineRuns also run several advanced checks. == Viewing pod logs in the web UI .Prerequisites -* You have created an application in {ProductName}. +You have created an application in {ProductName}. .Procedure To view pod logs for a component: -* Navigate to the *Components* tab > *View pod logs*. -** A pop-up window allows you to view pod logs in the UI or download them to your machine using the *Download* button. +* Navigate to *Components* > *View pod logs*. +* A pop-up window enables you to view pod logs in the UI or download them to your machine by selecting *Download*. == Viewing Task logs in the web UI -In the UI you can view Task logs all together on one screen or choose to view each Task log separately, together with other Task details. +In the UI, you can either view all Task logs on one screen, or each Task log separately, with other Task details. .Prerequisites -* You have created an application in {ProductName}. +You have created an application in {ProductName}. .Procedure To view all Task logs displayed together on one screen: -. Navigate to the *Activity* tab > *Pipeline runs*. -. Select a PipelineRun you need > Navigate to the *Logs* tab. +. Navigate to *Activity* > *Pipeline runs*. +. Select a PipelineRun. +. Navigate to *Logs*. To view logs for a particular Task: -. Navigate to the *Activity* tab > *Pipeline runs*. -. Select a PipelineRun you need. You have 2 options from here: -.. Navigate to the *Details* tab. In a graphic representation of a pipeline called *Pipeline run details* select a Task you need. A side panel will open that includes the *Logs* tab. +. Navigate to *Activity* > *Pipeline runs*. +. Select a PipelineRun. You then have 2 options: +.. Navigate to *Details*. In a graphic representation of a pipeline called *Pipeline run details* select a Task you need. A side panel will open that includes the *Logs* tab. + OR + @@ -63,7 +64,7 @@ OR To view Task logs with the Tekton CLI: -. List the existing PipelineRuns: +. List the existing PipelineRuns by running: + [source] -- @@ -71,7 +72,7 @@ tkn pr list -- . Copy a name of a PipelineRun you need logs for. -. Access logs for a particular PipelineRun: +. Access the logs for a particular PipelineRun by running: + [source] -- @@ -85,7 +86,7 @@ In the Tekton CLI you can use `__pr__` as a shortcut for the PipelineRun command == Troubleshooting -{ProductName} allows you to view logs for the 10 most recent PipelineRuns executed in the namespace. When logs aren't available any longer you see the following message instead of logs: +{ProductName} enables you to view logs for the 10 most recent PipelineRuns executed in the namespace. When logs aren't available any longer, you see the following message instead of logs: [source] -- From 35c91f8c77d1416fcdcc3d2f82f2e662e56afeee Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:19:37 -0700 Subject: [PATCH 5/8] more peer feedback --- .../pages/how-to-guides/proc_viewing_logs.adoc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc index ffd591a0..b5ba65da 100644 --- a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -1,17 +1,19 @@ = Viewing logs -{ProductName} generates logs when it builds, checks, and deploys components of your application. Reading logs can be your first step to understand why the build or checks failed. +{ProductName} generates logs when it builds, checks, and deploys the components of your application. Reading logs can be your first step to understand why the build or checks failed. You can access pod and Task logs with both the UI and CLI, and you can download these logs to your local machine. {ProductName} stores logs for the 10 most recent PipelineRuns that are executed in the namespace. However, you can also start a new build pipeline to generate a new set of logs. == Types of logs -* *Pod logs* show the health and status of a running Kubernetes pod within your application. {ProductName} creates pod logs when it starts your application in a pod on an OpenShift cluster so you can watch how it boots your application in real time. -* *Task logs* are generated for all Tasks of a build pipeline. Both default and custom build pipelines have PipelineRuns of types *Build* and *Test*. +{ProductName} generates the following types of logs: + +* *Pod logs* show the health and status of a Kubernetes pod where your application is running. {ProductName} creates pod logs when it starts your application in a pod on an OpenShift cluster so you can see how it starts your application in real time. +* *Task logs* are generated for all Tasks of a build pipeline. Both default and custom build pipelines have *Build* and *Test* PipelineRuns. + -Logs for *Test* PipelineRuns are the same for all pipelines, they log how a build is verified with an Enterprise Contract (EC). However logs for *Build* PipelineRuns differ for default and custom build pipelines: +Logs for *Test* PipelineRuns log how a build is verified with an Enterprise Contract (EC) and they are the same for all pipelines. However, logs for *Build* PipelineRuns differ between default and custom build pipelines in the following ways: -** Logs for default build pipelines log how {ProductName} clones a Git repository with your code or our sample code, builds container images with your application, checks the images, and generates an SBOM. +** Logs for default build pipelines log how {ProductName} clones a Git repository with your code or our sample code, builds container images with your application, checks the images, and generates a software bill of materials (SBOM). ** Custom build pipelines have PipelineRuns that run on opening pull requests and on push to the Git repository, and logs for different PipelineRuns differ. On-push PipelineRuns clone a Git repo and build a container image with a component. On-pull-request PipelineRuns also run several advanced checks. == Viewing pod logs in the web UI @@ -22,7 +24,7 @@ You have created an application in {ProductName}. .Procedure -To view pod logs for a component: +To view pod logs for a component, complete the following steps: * Navigate to *Components* > *View pod logs*. * A pop-up window enables you to view pod logs in the UI or download them to your machine by selecting *Download*. @@ -71,7 +73,7 @@ To view Task logs with the Tekton CLI: tkn pr list -- -. Copy a name of a PipelineRun you need logs for. +. Copy the name of a PipelineRun you need logs for. . Access the logs for a particular PipelineRun by running: + [source] From d277c4cf5f6cfd04c2a35ae091cf75172885af6a Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:22:03 -0700 Subject: [PATCH 6/8] unordered bullet points --- docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc index b5ba65da..95597427 100644 --- a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -49,11 +49,11 @@ To view logs for a particular Task: . Navigate to *Activity* > *Pipeline runs*. . Select a PipelineRun. You then have 2 options: -.. Navigate to *Details*. In a graphic representation of a pipeline called *Pipeline run details* select a Task you need. A side panel will open that includes the *Logs* tab. +** Navigate to *Details*. In a graphic representation of a pipeline called *Pipeline run details* select a Task you need. A side panel will open that includes the *Logs* tab. + OR + -.. Navigate to the *Task runs* tab > Select a TaskRun you need > Navigate to the *Logs* tab. +** Navigate to the *Task runs* tab > Select a TaskRun you need > Navigate to the *Logs* tab. == Viewing Task logs with the Tekton CLI From 76e9ef6ff4e005a96572442aeb56ae7bd6cb01c5 Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:02:32 -0700 Subject: [PATCH 7/8] small syntax fix --- docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc index 95597427..5236f28f 100644 --- a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -53,7 +53,7 @@ To view logs for a particular Task: + OR + -** Navigate to the *Task runs* tab > Select a TaskRun you need > Navigate to the *Logs* tab. +** Navigate to *Task runs* > Select a TaskRun you need > Navigate to *Logs*. == Viewing Task logs with the Tekton CLI From fd903d546be03c86fc9c2b693e08d18a6880aacd Mon Sep 17 00:00:00 2001 From: Olga Tikhomirova <85509260+missmesss@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:56:36 -0700 Subject: [PATCH 8/8] final peer feedback --- .../ROOT/pages/how-to-guides/proc_viewing_logs.adoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc index 5236f28f..0c620401 100644 --- a/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc +++ b/docs/modules/ROOT/pages/how-to-guides/proc_viewing_logs.adoc @@ -9,12 +9,11 @@ You can access pod and Task logs with both the UI and CLI, and you can download {ProductName} generates the following types of logs: * *Pod logs* show the health and status of a Kubernetes pod where your application is running. {ProductName} creates pod logs when it starts your application in a pod on an OpenShift cluster so you can see how it starts your application in real time. -* *Task logs* are generated for all Tasks of a build pipeline. Both default and custom build pipelines have *Build* and *Test* PipelineRuns. -+ -Logs for *Test* PipelineRuns log how a build is verified with an Enterprise Contract (EC) and they are the same for all pipelines. However, logs for *Build* PipelineRuns differ between default and custom build pipelines in the following ways: - -** Logs for default build pipelines log how {ProductName} clones a Git repository with your code or our sample code, builds container images with your application, checks the images, and generates a software bill of materials (SBOM). -** Custom build pipelines have PipelineRuns that run on opening pull requests and on push to the Git repository, and logs for different PipelineRuns differ. On-push PipelineRuns clone a Git repo and build a container image with a component. On-pull-request PipelineRuns also run several advanced checks. +* *Task logs* are generated for all Tasks of a build pipeline. Both default and custom build pipelines have *Build* and *Test* PipelineRuns: +** Logs for *Test* PipelineRuns log how a build is verified with an Enterprise Contract (EC) and they are the same for all pipelines. +** Logs for *Build* PipelineRuns differ between default and custom build pipelines in the following ways: +*** *Build* PipelineRuns logs for default build pipelines log how {ProductName} clones a Git repository with your code or our sample code, builds container images with your application, checks the images, and generates a software bill of materials (SBOM). +*** Custom build pipelines have *Build* PipelineRuns that run when a pull request is opened and when new changes are pushed to this PR, and logs for different PipelineRuns differ. On-push PipelineRuns clone a Git repo and build a container image with a component. On-pull-request PipelineRuns also run several advanced checks. == Viewing pod logs in the web UI