From 215bf04bc65006499721e0d728e15eb508adbd93 Mon Sep 17 00:00:00 2001 From: Amit Shuster <33126908+amit-shuster@users.noreply.github.com> Date: Wed, 6 Oct 2021 22:34:34 +0300 Subject: [PATCH] Lightrun Integration - External task driver (#11203) --- .../content/docs/drivers/external/index.mdx | 2 + .../docs/drivers/external/lightrun.mdx | 79 +++++++++++++++++++ website/data/docs-nav-data.json | 4 + 3 files changed, 85 insertions(+) create mode 100644 website/content/docs/drivers/external/lightrun.mdx diff --git a/website/content/docs/drivers/external/index.mdx b/website/content/docs/drivers/external/index.mdx index 6f12c805b..f3ed7821e 100644 --- a/website/content/docs/drivers/external/index.mdx +++ b/website/content/docs/drivers/external/index.mdx @@ -23,6 +23,7 @@ Below is a list of community-supported task drivers you can use with Nomad: - [containerd][nomad-driver-containerd] - [Firecracker][firecracker-task-driver] - [Jail task driver][jail-task-driver] +- [Lightrun][lightrun] - [LXC][lxc] - [Podman][podman] - [Pot][pot] @@ -44,3 +45,4 @@ Below is a list of community-supported task drivers you can use with Nomad: [nspawn-driver]: /docs/drivers/external/nspawn [nomad-driver-iis]: /docs/drivers/external/iis [nomad-driver-containerd]: /docs/drivers/external/containerd +[lightrun]: /docs/drivers/external/lightrun diff --git a/website/content/docs/drivers/external/lightrun.mdx b/website/content/docs/drivers/external/lightrun.mdx new file mode 100644 index 000000000..930816615 --- /dev/null +++ b/website/content/docs/drivers/external/lightrun.mdx @@ -0,0 +1,79 @@ +--- +layout: docs +page_title: 'Drivers: Lightrun' +description: The Lightrun driver is used to run your Java application with Lightrun. +--- + +# Lightrun Driver + +Name: `lightrun-java` + +The Lightrun Nomad driver is used to execute Java applications packaged into a +Java Jar file and automatically add the Lightrun agent to them. + +[Lightrun][lightrun_website] is a developer-native observability platform. With +Lightrun you can add logs, snapshots (virtual breakpoints), and metrics to +production applications without the need for redeployments or restarts. You can +use Lightrun directly from your IDE or CLI to observe, understand and debug +your application at runtime. + +Refer to the [Lightrun documentation][lightrun_docs] for more information about +Lightrun. + +## Prerequisites + +1. Download or clone the [Lightrun driver repository][repo]. +1. Find the `lightrun-java-driver` driver in the repository's root folder. +1. Copy the driver to your Nomad plugins directory (or create one if it doesn't + exist). +1. Grant executable permissions to the driver file: + + ```shell-session + $ chmod +x ./plugins/lightrun-java-driver + ``` + +1. When running the Nomad agent, make sure to specify the path to your plugins + directory: + + ```shell-session + $ sudo nomad agent -dev -bind 0.0.0.0 -log-level DEBUG -plugin-dir= + ``` + +## Task Configuration + +```hcl +task "run-with-lightrun" { + driver = "lightrun-java" + + config { + lightrun_server = "https://app.lightrun.com/company/" + lightrun_secret = "" + lightrun_certificate = "ee80811b38e7e6c2dc4cc372cbea86bd86b446b012e427f2e19bf094afba5d12" + } +} +``` + +The `lightrun-java` driver accepts all configuration options of the Nomad +[`java`] driver. + +Additionaly, the `lightrun-java` driver requires the following configuration in +the job spec. To find these configurations, log into the +[Lightrun Management Portal][lightrun_portal] and refer to the **Download the +Agent** section: + +- `lightrun_server` - The Lightrun server you are working against, including + your company name. + +- `lightrun_secret` - Lightrun secret is used for authorization against the + Lightrun server. + +- `lightrun_certificate` - Used for certificate pinning. + +A full job file example can be found in the repo at [`example/example.driver.nomad`][example-config]. + +[lightrun_docs]: https://docs.lightrun.com +[lightrun_website]: https://www.lightrun.com +[lightrun_portal]: https://app.lightrun.com +[repo]: https://github.com/lightrun-platform/lightrun-n-nomad +[example-config]: https://github.com/lightrun-platform/lightrun-n-nomad/blob/main/example/example.driver.nomad +[`java`]: /docs/drivers/java diff --git a/website/data/docs-nav-data.json b/website/data/docs-nav-data.json index b15e7b36e..656c917c0 100644 --- a/website/data/docs-nav-data.json +++ b/website/data/docs-nav-data.json @@ -1389,6 +1389,10 @@ "title": "Jailtask driver", "path": "drivers/external/jail-task-driver" }, + { + "title": "Lightrun", + "path": "drivers/external/lightrun" + }, { "title": "LXC", "path": "drivers/external/lxc"