Skip to content

Commit

Permalink
Adjust memory_hard_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
simnalamburt committed Dec 27, 2020
1 parent 3405f34 commit cc93e51
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 44 deletions.
52 changes: 30 additions & 22 deletions nomad/development.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ job "mediawiki" {
volumes = [
"local/Caddyfile:/srv/femiwiki.com/Caddyfile"
]

memory_hard_limit = 400
}

resources {
memory = 80
}

template {
Expand Down Expand Up @@ -66,10 +72,6 @@ EOF

destination = "local/Caddyfile"
}

resources {
memory = 256
}
}

network {
Expand Down Expand Up @@ -120,17 +122,18 @@ EOF

config {
image = "ghcr.io/femiwiki/mediawiki:latest"
memory_hard_limit = 600
}

resources {
memory = 80
}

volume_mount {
volume = "configs"
destination = "/a"
read_only = true
}

resources {
memory = 256
}
}

network {
Expand Down Expand Up @@ -176,6 +179,11 @@ EOF
config {
image = "mysql:8.0"
args = ["--default-authentication-plugin=mysql_native_password"]
memory_hard_limit = 1000
}

resources {
memory = 500
}

env {
Expand All @@ -184,10 +192,6 @@ EOF
MYSQL_USER = "DB_USERNAME" // secret.php.example에 적힌 기본값
MYSQL_PASSWORD = "DB_PASSWORD" // secret.php.example에 적힌 기본값
}

resources {
memory = 1024
}
}

network {
Expand All @@ -210,10 +214,11 @@ EOF

config {
image = "memcached:1-alpine"
memory_hard_limit = 240
}

resources {
memory = 256
memory = 60
}
}

Expand All @@ -237,6 +242,11 @@ EOF

config {
image = "ghcr.io/femiwiki/parsoid:2020-09-05T10-03-ae442600"
memory_hard_limit = 400
}

resources {
memory = 120
}

env {
Expand All @@ -245,10 +255,6 @@ EOF
# Avoid using NOMAD_UPSTREAM_ADDR_http https://github.com/femiwiki/nomad/issues/1
MEDIAWIKI_APIS_URI = "http://localhost/api.php"
}

resources {
memory = 1024
}
}

network {
Expand Down Expand Up @@ -278,6 +284,11 @@ EOF

config {
image = "ghcr.io/femiwiki/restbase:2020-09-05T10-04-5dcdc8b6"
memory_hard_limit = 400
}

resources {
memory = 100
}

env {
Expand All @@ -287,10 +298,6 @@ EOF
PARSOID_URI = "http://${NOMAD_UPSTREAM_ADDR_parsoid}"
MATHOID_URI = "http://${NOMAD_UPSTREAM_ADDR_mathoid}"
}

resources {
memory = 1024
}
}

network {
Expand Down Expand Up @@ -331,10 +338,11 @@ EOF

config {
image = "wikimedia/mathoid:bad5ec8d4"
memory_hard_limit = 600
}

resources {
memory = 1024
memory = 150
}
}

Expand Down
54 changes: 32 additions & 22 deletions nomad/production.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@ job "mediawiki" {
readonly = false
}
]

memory_hard_limit = 400
}

resources {
memory = 80
}

env {
FASTCGI_ADDR = "${NOMAD_UPSTREAM_ADDR_fastcgi}"
RESTBASE_ADDR = "${NOMAD_UPSTREAM_ADDR_restbase}"
}

resources {
memory = 32
}
}

network {
Expand Down Expand Up @@ -122,6 +124,12 @@ job "mediawiki" {
readonly = false
}
]

memory_hard_limit = 600
}

resources {
memory = 80
}

artifact {
Expand All @@ -141,10 +149,6 @@ job "mediawiki" {
destination = "/a/secret.php"
read_only = true
}

resources {
memory = 110
}
}

network {
Expand Down Expand Up @@ -207,6 +211,11 @@ job "mediawiki" {
"--default-authentication-plugin=mysql_native_password",
"--datadir", "/srv/mysql"
]
memory_hard_limit = 1000
}

resources {
memory = 500
}

volume_mount {
Expand All @@ -224,10 +233,6 @@ job "mediawiki" {
env {
MYSQL_RANDOM_ROOT_PASSWORD = "yes"
}

resources {
memory = 512
}
}

network {
Expand Down Expand Up @@ -256,10 +261,11 @@ job "mediawiki" {

config {
image = "memcached:1.6.6-alpine"
memory_hard_limit = 240
}

resources {
memory = 80
memory = 60
}
}

Expand Down Expand Up @@ -289,6 +295,11 @@ job "mediawiki" {

config {
image = "ghcr.io/femiwiki/parsoid:2020-09-05T10-03-ae442600"
memory_hard_limit = 400
}

resources {
memory = 120
}

env {
Expand All @@ -297,10 +308,6 @@ job "mediawiki" {
# Avoid using NOMAD_UPSTREAM_ADDR_http https://github.com/femiwiki/nomad/issues/1
MEDIAWIKI_APIS_URI = "http://localhost/api.php"
}

resources {
memory = 150
}
}

network {
Expand Down Expand Up @@ -345,6 +352,12 @@ job "mediawiki" {
readonly = false
}
]

memory_hard_limit = 400
}

resources {
memory = 100
}

env {
Expand All @@ -354,10 +367,6 @@ job "mediawiki" {
PARSOID_URI = "http://${NOMAD_UPSTREAM_ADDR_parsoid}"
MATHOID_URI = "http://${NOMAD_UPSTREAM_ADDR_mathoid}"
}

resources {
memory = 128
}
}

network {
Expand Down Expand Up @@ -404,10 +413,11 @@ job "mediawiki" {

config {
image = "wikimedia/mathoid:bad5ec8d4"
memory_hard_limit = 600
}

resources {
memory = 128
memory = 150
}
}

Expand Down

0 comments on commit cc93e51

Please sign in to comment.