Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATOR-190 - Live bandwidth authority #45

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions operations/anon-da-node-live.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

job "ator-dir-auth-live" {
datacenters = ["ator-fin"]
type = "service"
type = "service"
namespace = "ator-network"

group "dir-auth-live-group" {
count = 3

spread {
attribute = "${node.unique.id}"
weight = 100
Expand Down Expand Up @@ -38,15 +38,27 @@ job "ator-dir-auth-live" {
source = "dir-auth-live"
}

volume "sbws-live" {
type = "host"
read_only = false
source = "sbws-live"
}

task "dir-auth-live-task" {
driver = "docker"

volume_mount {
volume = "dir-auth-live"
destination = "/var/lib/anon/"
read_only = false
}

}

volume_mount {
volume = "sbws-live"
destination = "/var/lib/sbws/"
read_only = false
}

config {
image = "svforte/anon:PLACEIMAGETAGHERE"
ports = ["orport", "dirport"]
Expand All @@ -63,7 +75,7 @@ job "ator-dir-auth-live" {
resources {
cpu = 256
memory = 256
}
}

template {
change_mode = "noop"
Expand All @@ -72,7 +84,7 @@ job "ator-dir-auth-live" {
EOH
destination = "secrets/anon/keys/authority_certificate"
}

template {
change_mode = "noop"
data = "{{ with secret (env `node.unique.id` | printf `kv/ator-network/live/dir-auth-%s`) }}{{ .Data.data.authority_identity_key}}{{end}}"
Expand Down Expand Up @@ -152,7 +164,7 @@ AuthDirMaxServersPerAddr 8
#RelayBandwidthRate 512 KB # Throttle traffic to
#RelayBandwidthBurst 1024 KB # But allow bursts up to
#MaxMemInQueues 512 MB # Limit Memory usage to

## 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/live/dir-auth-%s/nickname") }}
Expand All @@ -175,6 +187,6 @@ ContactInfo [email protected]
}
}
}
}
}
}
}
30 changes: 21 additions & 9 deletions operations/anon-da-node-stage.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

job "ator-dir-auth-stage" {
datacenters = ["ator-fin"]
type = "service"
type = "service"
namespace = "ator-network"

group "dir-auth-stage-group" {
count = 3

spread {
attribute = "${node.unique.id}"
weight = 100
Expand Down Expand Up @@ -38,15 +38,27 @@ job "ator-dir-auth-stage" {
source = "dir-auth-stage"
}

volume "sbws-stage" {
type = "host"
read_only = false
source = "sbws-stage"
}

task "dir-auth-stage-task" {
driver = "docker"

volume_mount {
volume = "dir-auth-stage"
destination = "/var/lib/anon/"
read_only = false
}

}

volume_mount {
volume = "sbws-stage"
destination = "/var/lib/sbws/"
read_only = false
}

config {
image = "svforte/anon-stage:PLACEIMAGETAGHERE"
ports = ["orport", "dirport"]
Expand All @@ -63,7 +75,7 @@ job "ator-dir-auth-stage" {
resources {
cpu = 256
memory = 256
}
}

template {
change_mode = "noop"
Expand All @@ -72,7 +84,7 @@ job "ator-dir-auth-stage" {
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}}"
Expand Down Expand Up @@ -156,7 +168,7 @@ AuthDirMaxServersPerAddr 8
#RelayBandwidthRate 512 KB # Throttle traffic to
#RelayBandwidthBurst 1024 KB # But allow bursts up to
#MaxMemInQueues 512 MB # Limit Memory usage to

## 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") }}
Expand All @@ -179,6 +191,6 @@ ContactInfo [email protected]
}
}
}
}
}
}
}