From ba2caab1725bd87e716cd035e67a4348177718e9 Mon Sep 17 00:00:00 2001 From: Diego Silva Date: Tue, 3 Feb 2026 13:24:10 -0500 Subject: [PATCH] Update artifact version in `from-github.nomad` and enhance README with environment setup instructions --- README.md | 20 ++++++++++++++++++++ from-github.nomad | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea2a2d7..a528c55 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,26 @@ Este es un ejemplo de cómo ejecutar el proyecto con Nomad con Java: * Descargando un compilado (que está en GitHub) * Ejecutando desde local (que está en la carpeta `target`) +## Preparando el entorno + +Antes de ejecutar `nomad` necesitamos preparar el servicio. Para ello, lo ejecutaremos en modo de **desarrollo**. (Ojo, en modo de producción tiene otro procedimiento) + +Bash (Linux/macOS): +```shell +ip link show # Primero, identificamos qué adaptador usaremos. En mi caso usaré "eth0" + +sudo nomad agent -dev -bind=0.0.0.0 -network-interface=eth0 -log-level=DEBUG # Aquí, se indica el adatador en el parámetro `network-interface` + +``` + +Powershell (Windows) +```powershell +Get-NetAdapter # Primero, identificamos qué adaptador usaremos. En mi caso usaré "Wi-Fi" + +nomad agent -dev -bind="0.0.0.0" -network-interface="Wi-Fi" -log-level=DEBUG # Aquí, se indica el adatador en el parámetro `network-interface` + +``` + ## Descargando un compilado Se puede ejecutar el comando nomad con el task `java`, pero tiene la restricción que solo puede ejecutar archivos que sean descargados, no desde local: diff --git a/from-github.nomad b/from-github.nomad index 65c37bc..4eed625 100644 --- a/from-github.nomad +++ b/from-github.nomad @@ -10,7 +10,7 @@ job "from-github" { task "api" { driver = "java" artifact { - source = "https://github.com/apuntesdejava/java-nomad-example/releases/download/4/java-nomad-example-runner.jar" + source = "https://github.com/apuntesdejava/java-nomad-example/releases/download/5/java-nomad-example-runner.jar" destination = "local" } config {