-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,30 +6,30 @@ job "dir-auth-stage" { | |
namespace = "ator-network" | ||
|
||
group "dir-auth-stage-group" { | ||
count = 3 | ||
count = 7 | ||
|
||
spread { | ||
attribute = "${node.unique.id}" | ||
weight = 100 | ||
target "c8e55509-a756-0aa7-563b-9665aa4915ab" { | ||
percent = 34 | ||
percent = 14 | ||
} | ||
target "c2adc610-6316-cd9d-c678-cda4b0080b52" { | ||
percent = 33 | ||
percent = 43 | ||
} | ||
target "4aa61f61-893a-baf4-541b-870e99ac4839" { | ||
percent = 33 | ||
percent = 43 | ||
} | ||
} | ||
|
||
network { | ||
mode = "bridge" | ||
|
||
port "orport" { | ||
static = 9101 | ||
to = 9101 | ||
} | ||
port "dirport" { | ||
static = 9130 | ||
to = 9130 | ||
} | ||
} | ||
|
||
|
@@ -81,50 +81,50 @@ job "dir-auth-stage" { | |
template { | ||
change_mode = "noop" | ||
data = <<EOH | ||
{{ key (env `node.unique.id` | printf `ator-network/stage/dir-auth-%s/authority_certificate`) }} | ||
{{ key (printf `ator-network/stage/dir-auth-%s/authority_certificate` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }} | ||
EOH | ||
destination = "secrets/anon/keys/authority_certificate" | ||
} | ||
|
||
template { | ||
change_mode = "noop" | ||
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/stage/dir-auth-%s`) }}{{ .Data.data.authority_identity_key}}{{end}}" | ||
data = "{{ with secret (printf `kv/ator-network/stage/dir-auth-%s-%d` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }}{{ .Data.data.authority_identity_key}}{{end}}" | ||
destination = "secrets/anon/keys/authority_identity_key" | ||
} | ||
|
||
template { | ||
change_mode = "noop" | ||
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/stage/dir-auth-%s`) }}{{.Data.data.authority_signing_key}}{{end}}" | ||
data = "{{ with secret (printf `kv/ator-network/stage/dir-auth-%s-%d` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }}{{.Data.data.authority_signing_key}}{{end}}" | ||
destination = "secrets/anon/keys/authority_signing_key" | ||
} | ||
|
||
template { | ||
change_mode = "noop" | ||
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/stage/dir-auth-%s`) }}{{ base64Decode .Data.data.ed25519_master_id_secret_key_base64}}{{end}}" | ||
data = "{{ with secret (printf `kv/ator-network/stage/dir-auth-%s-%d` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }}{{ base64Decode .Data.data.ed25519_master_id_secret_key_base64}}{{end}}" | ||
destination = "secrets/anon/keys/ed25519_master_id_secret_key" | ||
} | ||
|
||
template { | ||
change_mode = "noop" | ||
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/stage/dir-auth-%s`) }}{{ base64Decode .Data.data.ed25519_signing_secret_key_base64}}{{end}}" | ||
data = "{{ with secret (printf `kv/ator-network/stage/dir-auth-%s-%d` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }}{{ base64Decode .Data.data.ed25519_signing_secret_key_base64}}{{end}}" | ||
destination = "secrets/anon/keys/ed25519_signing_secret_key" | ||
} | ||
|
||
template { | ||
change_mode = "noop" | ||
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/stage/dir-auth-%s`) }}{{ base64Decode .Data.data.secret_id_key_base64}}{{end}}" | ||
data = "{{ with secret (printf `kv/ator-network/stage/dir-auth-%s-%d` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }}{{ base64Decode .Data.data.secret_id_key_base64}}{{end}}" | ||
destination = "secrets/anon/keys/secret_id_key" | ||
} | ||
|
||
template { | ||
change_mode = "noop" | ||
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/stage/dir-auth-%s`) }}{{ base64Decode .Data.data.secret_onion_key_base64}}{{end}}" | ||
data = "{{ with secret (printf `kv/ator-network/stage/dir-auth-%s-%d` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }}{{ base64Decode .Data.data.secret_onion_key_base64}}{{end}}" | ||
destination = "secrets/anon/keys/secret_onion_key" | ||
} | ||
|
||
template { | ||
change_mode = "noop" | ||
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/stage/dir-auth-%s`) }}{{ base64Decode .Data.data.secret_onion_key_ntor_base64}}{{end}}" | ||
data = "{{ with secret (printf `kv/ator-network/stage/dir-auth-%s-%d` (env `node.unique.id`) (env `NOMAD_HOST_PORT_orport`)) }}{{ base64Decode .Data.data.secret_onion_key_ntor_base64}}{{end}}" | ||
destination = "secrets/anon/keys/secret_onion_key_ntor" | ||
} | ||
|
||
|
@@ -141,13 +141,13 @@ AuthoritativeDirectory 1 | |
V3AuthoritativeDirectory 1 | ||
# Server's public IP Address (usually automatic) | ||
Address {{ key (env "node.unique.id" | printf "ator-network/stage/dir-auth-%s/public_ipv4") }} | ||
Address {{ key (printf "ator-network/stage/dir-auth-%s-%d/public_ipv4" (env "node.unique.id") (env "NOMAD_HOST_PORT_orport")) }} | ||
# Port to advertise for incoming Tor connections. | ||
ORPort {{ env `NOMAD_PORT_orport` }} | ||
ORPort {{ env "NOMAD_PORT_orport" }} | ||
# Mirror directory information for others (optional, not used on bridge) | ||
DirPort {{ env `NOMAD_PORT_dirport` }} | ||
DirPort {{ env "NOMAD_PORT_dirport" }} | ||
# Run Tor only as a server (no local applications) | ||
SocksPort 0 | ||
|
@@ -171,7 +171,7 @@ ConsensusParams "CircuitPriorityHalflifeMsec=30000 DoSCircuitCreationBurst=60 Do | |
## If no Nickname or ContactInfo is set, docker-entrypoint will use | ||
## the environment variables to add Nickname/ContactInfo below | ||
Nickname {{ key (env "node.unique.id" | printf "ator-network/stage/dir-auth-%s/nickname") }} | ||
Nickname {{ key (printf "ator-network/stage/dir-auth-%s-%d/nickname" (env "node.unique.id") (env "NOMAD_HOST_PORT_orport")) }} | ||
ContactInfo [email protected] | ||
V3BandwidthsFile /var/lib/sbws/v3bw/latest.v3bw | ||
|