github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/plugins/drivers/community/lightrun.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Drivers: Lightrun' 4 description: The Lightrun driver is used to run your Java application with Lightrun. 5 --- 6 7 # Lightrun Driver 8 9 Name: `lightrun-java` 10 11 The Lightrun Nomad driver is used to execute Java applications packaged into a 12 Java Jar file and automatically add the Lightrun agent to them. 13 14 [Lightrun][lightrun_website] is a developer-native observability platform. With 15 Lightrun you can add logs, snapshots (virtual breakpoints), and metrics to 16 production applications without the need for redeployments or restarts. You can 17 use Lightrun directly from your IDE or CLI to observe, understand and debug 18 your application at runtime. 19 20 Refer to the [Lightrun documentation][lightrun_docs] for more information about 21 Lightrun. 22 23 ## Prerequisites 24 25 1. Download or clone the [Lightrun driver repository][repo]. 26 1. Find the `lightrun-java-driver` driver in the repository's root folder. 27 1. Copy the driver to your Nomad plugins directory (or create one if it doesn't 28 exist). 29 1. Grant executable permissions to the driver file: 30 31 ```shell-session 32 $ chmod +x ./plugins/lightrun-java-driver 33 ``` 34 35 1. When running the Nomad agent, make sure to specify the path to your plugins 36 directory: 37 38 ```shell-session 39 $ sudo nomad agent -dev -bind 0.0.0.0 -log-level DEBUG -plugin-dir=<path_to_plugins_directory> 40 ``` 41 42 ## Task Configuration 43 44 ```hcl 45 task "run-with-lightrun" { 46 driver = "lightrun-java" 47 48 config { 49 lightrun_server = "https://app.lightrun.com/company/<COMPANY-NAME>" 50 lightrun_secret = "<COMPANY-SECRET>" 51 lightrun_certificate = "ee80811b38e7e6c2dc4cc372cbea86bd86b446b012e427f2e19bf094afba5d12" 52 } 53 } 54 ``` 55 56 The `lightrun-java` driver accepts all configuration options of the Nomad 57 [`java`] driver. 58 59 Additionaly, the `lightrun-java` driver requires the following configuration in 60 the job spec. To find these configurations, log into the 61 [Lightrun Management Portal][lightrun_portal] and refer to the **Download the 62 Agent** section: 63 64 - `lightrun_server` - The Lightrun server you are working against, including 65 your company name. 66 67 - `lightrun_secret` - Lightrun secret is used for authorization against the 68 Lightrun server. 69 70 - `lightrun_certificate` - Used for certificate pinning. 71 72 A full job file example can be found in the repo at [`example/example.driver.nomad`][example-config]. 73 74 [lightrun_docs]: https://docs.lightrun.com 75 [lightrun_website]: https://www.lightrun.com 76 [lightrun_portal]: https://app.lightrun.com 77 [repo]: https://github.com/lightrun-platform/lightrun-n-nomad 78 [example-config]: https://github.com/lightrun-platform/lightrun-n-nomad/blob/main/example/example.driver.nomad 79 [`java`]: /docs/drivers/java