diff --git a/public-site/docs/src/.vuepress/config.ts b/public-site/docs/src/.vuepress/config.ts index 9e02d83e..9cd387f9 100644 --- a/public-site/docs/src/.vuepress/config.ts +++ b/public-site/docs/src/.vuepress/config.ts @@ -124,6 +124,7 @@ export default defineUserConfig({ '/docs/topic-concepts/', '/docs/topic-docker/', '/docs/topic-runtime-env/', + '/docs/topic-logs/', '/docs/topic-security/', '/docs/topic-vulnerabilities/', '/docs/topic-monitoring/', diff --git a/public-site/docs/src/docs/topic-logs/component-active-replicas.png b/public-site/docs/src/docs/topic-logs/component-active-replicas.png new file mode 100644 index 00000000..1d526fa9 Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/component-active-replicas.png differ diff --git a/public-site/docs/src/docs/topic-logs/component-replica-log.png b/public-site/docs/src/docs/topic-logs/component-replica-log.png new file mode 100644 index 00000000..9f89442f Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/component-replica-log.png differ diff --git a/public-site/docs/src/docs/topic-logs/index.md b/public-site/docs/src/docs/topic-logs/index.md new file mode 100644 index 00000000..0c2478cc --- /dev/null +++ b/public-site/docs/src/docs/topic-logs/index.md @@ -0,0 +1,61 @@ +--- +title: Logs +--- + +# Logs + +Application logs can help you understand what is happening inside your application. The logs are particularly useful for debugging problems and monitoring activity. + +Log entries written to the `stdout` and `stderr` streams are stored for 30 days and can be accessed through Radix Web Console or Radix CLI. + +## Radix Web Console + +Radix Web Console provides access to logs for `components`, `jobs` and `pipeline jobs`. + +### Components + +To view the current log for running replicas, click on a replica `name` in the `Replicas` list. The log page shows the last 1000 entries from the replica's container. To download the entire log, click the `Download` button. + +![Replica list](component-active-replicas.png) +![Replica container log](component-replica-log.png) + +When a pipeline job succeeds and deploy a new version of your application, or when you restart a component, Radix creates new replicas with new names. The old replicas are removed once the new replicas are running. If the container for an active replica crashes or is killed, Kubernetes will start a new container, and the previous container's log will no longer be available in the replica's log page. + +`Replica Logs` lists all replicas and containers, both active and historical, for the component from the last 30 days. Replicas and containers in this list is sorted descending by their creation date, and containers are grouped within their respective replicas. + +You can download the log for all containers belonging to a replica _[1]_, or for a specific container _[2]_ within the replica. + +![Replica log](replica-log.png) + +### Jobs + +A job is an on-demand and short-lived workload, in the sense that it performs a set of tasks, and exits when the tasks are completed. + +To view the log for a job, click the `name` of the job in the `Jobs` list. + +![Job running](job-list-running.png) + +For jobs with status `Running`, the last 1000 entries is shown on the job page. To download the entire log, click the `Download` button. The log may also be available for completed jobs (succeeded or failed), as long as Kubernetes has not garbage collected the log resources. + +![Job log](job-with-log.png) + +If the log is no longer available in Kubernetes, or the job has restarted one or more times, a `Job Logs History` list is shown on the botton of the page. Each row represents an attempt to run the job (the initial, or a retry if backoffLimit is set) and is sorted descending by creation date. You can download the log for a specific run by clicking on its download icon. + +![Job run log](job-run-log.png) + +### Pipeline jobs + +Similar to on-demand jobs described in the previous section, a pipeline job is also a set of short-lived tasks (called steps in the Radix Web Console). +You can view the log for each step in a pipeline job by clicking on the step name. For completed steps (succeeded or failed), the log will be unavailable if the underlying log resources are garbage collected by Kubernetes. + +![Job steps](job-steps.png) +![Step log](step-log.png) + + + +## Radix CLI + +[Radix CLI](../topic-radix-cli/) provides access to component and job logs by using the `rx get log` command. + +For components, only logs for active replicas can be read, and for jobs the log from the last run, as long as Kubernetes has not garbage collected the log resources. + diff --git a/public-site/docs/src/docs/topic-logs/job-list-running.png b/public-site/docs/src/docs/topic-logs/job-list-running.png new file mode 100644 index 00000000..356628c2 Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/job-list-running.png differ diff --git a/public-site/docs/src/docs/topic-logs/job-run-log.png b/public-site/docs/src/docs/topic-logs/job-run-log.png new file mode 100644 index 00000000..bd4ac962 Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/job-run-log.png differ diff --git a/public-site/docs/src/docs/topic-logs/job-steps.png b/public-site/docs/src/docs/topic-logs/job-steps.png new file mode 100644 index 00000000..3b5721c3 Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/job-steps.png differ diff --git a/public-site/docs/src/docs/topic-logs/job-with-log.png b/public-site/docs/src/docs/topic-logs/job-with-log.png new file mode 100644 index 00000000..84b3f391 Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/job-with-log.png differ diff --git a/public-site/docs/src/docs/topic-logs/replica-log.png b/public-site/docs/src/docs/topic-logs/replica-log.png new file mode 100644 index 00000000..62700cf7 Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/replica-log.png differ diff --git a/public-site/docs/src/docs/topic-logs/step-log.png b/public-site/docs/src/docs/topic-logs/step-log.png new file mode 100644 index 00000000..63ce5a45 Binary files /dev/null and b/public-site/docs/src/docs/topic-logs/step-log.png differ diff --git a/public-site/docs/src/features/index.md b/public-site/docs/src/features/index.md index e151839b..04e3500d 100644 --- a/public-site/docs/src/features/index.md +++ b/public-site/docs/src/features/index.md @@ -130,11 +130,13 @@ Stop, Start and Restart of a running component or all components in an environme Radix offers a command line interface - Radix CLI, which uses the command rx. -[Radix CLI](https://github.com/equinor/radix-cli/blob/master/README.md) +[Docs](../docs/topic-radix-cli/) ## Container logs in Radix console and Radix CLI -To be updated +Container logs can be accessed using Radix Web Console or Radix CLI. + +[Docs](../docs/topic-logs/) ## Code editor integrations - radixconfig.yaml schema validation