Commit Graph

51 Commits

Author SHA1 Message Date
Kate Taggart
6ea156b565 responding to feedback on PR: remove Region from Node struct, some grammatical niceties. 2017-05-03 12:45:59 -07:00
Kate Taggart
4a4417d556 I think I did it. 2017-05-03 12:45:59 -07:00
Kate Taggart
530cf03177 allow region to also be interpolated, like datacenter. 2017-05-03 12:45:59 -07:00
Kate Taggart
a5c4663efb add helper functions to set and clear dc, region names. 2017-05-03 12:45:59 -07:00
Kate Taggart
aeec7b3591 add dc and region to task env building function. flipped order of a couple functions to be consistent with the ordering of the rest of that section. 2017-05-03 12:45:59 -07:00
Kate Taggart
cf1b298f72 starting the jelly bean trail for two new env vars 2017-05-03 12:45:59 -07:00
Robert Neumayer
46dcbc5c5e Fix typo and be consistent in naming 2017-03-29 09:33:54 +02:00
Michael Schurter
7f2bbe70c1 Merge branch 'master' into b-2491-task-env 2017-03-28 11:28:00 -07:00
Alex Dadgar
d1562194a9 feedback 2017-03-28 11:10:11 -07:00
Michael Schurter
1ead3cae6e Make test more accurate and add changelog entry 2017-03-28 10:53:26 -07:00
Michael Schurter
24d27fce83 Don't take a reference a var in a loop
Fixes #2491
2017-03-28 10:16:27 -07:00
Alex Dadgar
63978511be Access Node Meta and Attrs in template
This PR allows accessing the Node's attributes and metadata as in a
template.

```
template {
    data = "{{ env \"attr.unique.network.ip-address\" }}"
    destination = "local/out"
}
```
2017-03-27 15:15:33 -07:00
Michael Schurter
cae20ba1d1 Add NOMAD_{IP,PORT}_<task>_<label> env vars 2017-03-10 12:17:43 -08:00
Michael Schurter
2452f32476 Round two of env var cleaning
Should bring us into conformance with IEEE Std 1003.1, 2004 Edition:
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html

1 alloc/op and ~80ns/op on my machine.
2017-03-08 16:46:13 -08:00
Michael Schurter
a9e3f2cf3e Replace "-" in env var keys with "_"
Fixes #2405
2017-03-06 19:57:44 -08:00
Alex Dadgar
07f7e19578 Fix vet script and fix vet problems
This PR fixes our vet script and fixes all the missed vet changes.

It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Alex Dadgar
eaa57878d9 Vendor + test fixes 2017-02-22 15:55:33 -08:00
Alex Dadgar
bfd34bb1e8 Don't force uppercase meta keys in env vars 2017-02-20 19:51:24 -08:00
Alex Dadgar
938b04e99a Fix fsm/env test 2017-01-24 09:36:22 -08:00
Diptanu Choudhury
d1bef523a9 Setting the Addrs of sibling tasks in the env 2017-01-20 14:15:53 -08:00
Alex Dadgar
248c069652 Merge pull request #2128 from hashicorp/f-dispatch
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Alex Dadgar
cb10b277eb Use new combined meta data function in env 2016-12-16 10:45:09 -08:00
Michael Schurter
4eb30022b2 Use net.JoinHostPort instead of fmt.Sprintf
Using fmt.Sprintf breaks IPv6 addresses.
2016-11-28 10:38:54 -08:00
Alex Dadgar
9b18008ccd Agent 2016-11-01 10:39:15 -07:00
Michael Schurter
2ae0c85290 Add NOMAD_JOB_NAME to environment 2016-10-11 11:20:42 -07:00
Alex Dadgar
bec6adb2ee Vault token threaded 2016-09-14 13:30:01 -07:00
Alex Dadgar
4bae54741e Secret dir materialized in alloc/task directory 2016-09-02 12:44:05 -07:00
Alex Dadgar
335cababe1 Revert "Introduce a Secret/ directory" 2016-09-01 17:23:15 -07:00
Alex Dadgar
dfab22cd9f environment variables 2016-08-31 13:56:11 -07:00
Diptanu Choudhury
0769e41982 Fixed the client tests 2016-07-08 17:49:58 -07:00
Diptanu Choudhury
29f099cf9d Fixed the host port environment variable 2016-07-08 15:37:44 -07:00
Sean Chittenden
29be52f762 Speling police 2016-05-15 09:41:34 -07:00
Alex Dadgar
c730fe8db7 Fix splitting on equals to return maximum of two strings 2016-04-21 17:08:47 -07:00
Alex Dadgar
636c3fc82f Add IP and PORT environment variables 2016-04-15 11:01:32 -07:00
Alex Dadgar
9643d63c6e add test for precedence 2016-03-25 10:16:04 -07:00
Alex Dadgar
bb81d2ebd0 add job and task group meta 2016-03-24 17:39:09 -07:00
Alex Dadgar
5352bab6dc Comment and don't override 2016-03-23 14:07:12 -07:00
Alex Dadgar
4f923f14b9 Pass environment variables from host to exec based tasks 2016-03-23 13:01:45 -07:00
Alex Dadgar
495d0e6dc2 Add allocation index environment variable 2016-03-09 18:09:51 -08:00
Alex Dadgar
e0b1d7a963 Add Alloc ID/Name and Task Name to environment variables 2016-03-01 16:08:21 -08:00
Alex Dadgar
c242612a2f Merge pull request #775 from hashicorp/d-interpreted-vars
Documentation for interpreted variables
2016-02-11 08:40:31 -08:00
Alex Dadgar
3e24cd1910 interpreted variable docs 2016-02-06 15:35:07 -08:00
Diptanu Choudhury
49226c4a9c Fixing merge conflicts 2016-02-04 22:55:38 -08:00
Alex Dadgar
0c46a0ec1d Fix tests 2016-02-04 17:27:58 -08:00
Diptanu Choudhury
b53cf69448 Using the plugin to spawn processes from the raw_exec driver 2016-02-04 17:00:37 -08:00
Alex Dadgar
9779e9aa59 Merge pull request #704 from iverberk/f-env-ports
Pass a combination of ip and port to the task environment.
2016-01-29 08:53:47 -08:00
Alex Dadgar
c4f1952a08 Update the interpretation of node.id/name on the client 2016-01-26 17:38:36 -08:00
Ivo Verberk
b9de8704ee Rename IPPort env variable and add a mapped host port to the env. 2016-01-25 20:46:01 +01:00
Ivo Verberk
f71db5e645 Pass a combination of ip and port to the task environment.
The different labels can be on different IPs.
2016-01-24 10:31:03 +01:00
Alex Dadgar
e91abac0f6 Fix a bunch of tests
Up timeouts

trusty travis beta

Increase timeouts
2016-01-20 16:03:53 -08:00