Skip to content

Commit

Permalink
feat(minio): enable redis cache and server name in Minio
Browse files Browse the repository at this point in the history
Signed-off-by: Bruce Becker <[email protected]>
  • Loading branch information
brucellino committed May 30, 2022
1 parent 9ef4d60 commit ad983f7
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions minio.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ variable "root_password" {
type = string
}

variable "access_key" {
description = "Access key for the root user"
type = string
}

variable "secret_key" {
description = "Secret key for the root user"
type = string
}

variable "minio_storage_size"{
description = "Size of the minio storage"
type = number
Expand Down Expand Up @@ -100,6 +90,7 @@ job "minio" {
command = "${NOMAD_ALLOC_DIR}/minio"
args = [
"server",
"--address=${NOMAD_ADDR_api}",
"--console-address=${NOMAD_ADDR_console}",
"${NOMAD_ALLOC_DIR}/data"]
}
Expand All @@ -111,9 +102,16 @@ job "minio" {
env {
MINIO_ROOT_USER = var.root_username
MINIO_ROOT_PASSWORD = var.root_password
MINIO_SERVER_URL = "http://minio-api.service.consul:9000"
MINIO_VOLUMES="http://${attr.unique.hostname}/${NOMAD_ALLOC_DIR}/data"
MINIO_ACCESS_KEY = var.access_key
MINIO_SECRET_KEY = var.secret_key
MINIO_NOTIFY_REDIS_ENABLE_PRIMARY = "on"
MINIO_NOTIFY_REDIS_REDIS_ADDRESS_PRIMARY = "http://redis-cache.service.consul:6379"
MINIO_NOTIFY_REDIS_KEY_PRIMARY="bucketevents"
MINIO_NOTIFY_REDIS_FORMAT_PRIMARY="namespace"
MINIO_NOTIFY_REDIS_ENABLE_SECONDARY="on"
MINIO_NOTIFY_REDIS_REDIS_ADDRESS_SECONDARY="https://redis-cache.service.consul:6379"
MINIO_NOTIFY_REDIS_KEY_SECONDARY="bucketevents"
MINIO_NOTIFY_REDIS_FORMAT_SECONDARY="namespace"
}

resources {
Expand Down Expand Up @@ -148,7 +146,7 @@ job "minio" {
}

service {
tags = ["minio", "s3", "console", "urlprefix-/minio-console"]
tags = ["minio", "s3", "console", "urlprefix-/minio-console redirect=9001,http://console.minio-console.service.consul"]
port = "console"
name = "minio-console"
check {
Expand Down

0 comments on commit ad983f7

Please sign in to comment.