Nomad
Hello World
@hashicorp
This deploys a simple applicaton as a service with an optional associated Nomad service.
- Official
- Pack
Updated 4 months ago
- GitHub(opens in new tab)
Hello World
This pack is a simple Nomad job that runs as a service and can be accessed via HTTP.
Changing the Message
To change the message this server responds with, change the "message" variable when running the pack.
nomad-pack run hello_world --var message="Hola Mundo!"
This tells Nomad Pack to tweak the MESSAGE environment variable that the service reads from.
Variables
message(string:"Hello World!") - The message your application will respond withcount(number:2) - The number of app instances to deployjob_name(string) - The name to use as the job name which overrides using the pack namedatacenters(list of strings:["*"]) - A list of datacenters in the region which are eligible for task placementregion(string) - The region where jobs will be deployedregister_service(bool: true) - If you want to register a Nomad service for the jobservice_tags(list of string) - The service tags for the hello_world applicationservice_name(string) - The service name for the hello_world application