Skip to content

Commit

Permalink
Adjust memory_hard_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
simnalamburt authored and lens0021 committed Dec 27, 2020
1 parent 250c428 commit 6298faf
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 @@ -34,6 +34,12 @@ job "mediawiki" {
readonly = false
}
]

memory_hard_limit = 400
}

resources {
memory = 80
}

artifact {
Expand All @@ -46,10 +52,6 @@ job "mediawiki" {
FASTCGI_ADDR = "${NOMAD_UPSTREAM_ADDR_fastcgi}"
RESTBASE_ADDR = "${NOMAD_UPSTREAM_ADDR_restbase}"
}

resources {
memory = 32
}
}

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

memory_hard_limit = 600
}

resources {
memory = 80
}

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

resources {
memory = 110
}
}

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

resources {
memory = 500
}

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

resources {
memory = 512
}
}

network {
Expand Down Expand Up @@ -266,10 +271,11 @@ job "mediawiki" {

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

resources {
memory = 80
memory = 60
}
}

Expand Down Expand Up @@ -299,6 +305,11 @@ job "mediawiki" {

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

resources {
memory = 120
}

env {
Expand All @@ -307,10 +318,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 @@ -355,6 +362,12 @@ job "mediawiki" {
readonly = false
}
]

memory_hard_limit = 400
}

resources {
memory = 100
}

env {
Expand All @@ -364,10 +377,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 @@ -414,10 +423,11 @@ job "mediawiki" {

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

resources {
memory = 128
memory = 150
}
}

Expand Down

0 comments on commit 6298faf

Please sign in to comment.