Day 3. Hashicorp Nomad: Server configuration for production

Hashicorp Nomad: Server configuration for production

刚开始建置PRD环境时,总会怕漏设定了甚麽,一段时间的经验累积後,总算有个样子了,纪录让想使用的人参考。

datacenter = "Nomad-PRD"
data_dir = "/nomad/data"

name = "nomad-server-1"
bind_addr = "10.x.x.x"

acl {
  enabled = true
  token_ttl = "1h"
  policy_ttl = "24h"
}

log_level = "DEBUG"
log_file = "/nomad/logs/nomad.log"
log_rotate_duration = "24h"


server {
  enabled = true
  bootstrap_expect = 3
  server_join {
    retry_join = [ "10.x.x.x","10.x.x.x","10.x.x.x" ]
    retry_max = 3
    retry_interval = "15s"
  }
  
  license_path = /nomad/license.hclic
}


tls {
  http = true
  ca_file   = "/nomad/ssl/ca.cer"
  cert_file = "/nomad/ssl/cert.cer"
  key_file  = "/nomad/ssl/key.key"
}

telemetry {
  prometheus_metrics = true
}

consul {
  address = "10.x.x.x:8500
  server_service_name = "nomad-server"
  server_auto_join = true
  client_auto_join = true
  allow_unauthenticated = false
  
  ssl = true
  verify_ssl = true
  ca_file = "/nomad/ssl/consul-ca.cer"
  cert_file = "/nomad/ssl/consul-cer.cer"
  key_file = "/nomad/ssl/consul-key.key"
  
  token   = "xxx-xxxx-xxx"
}


vault {
  enabled     = true
  address     = "https://vault.com:8200"
  ca_path     = "/nomad/ssl/vault-ca.cer"
  cert_file   = "/nomad/ssl/vault-cer.crt"
  key_file    = "/nomad/ssl/vault-key.key"
  
  token       = "xxx-xxxx-xxx"
}


<<:  Day3. Ruby的数字、字串,以及 ===

>>:  #3 CSS Introduction x Foodie

Day13 流程控制之条件判断

了解流程控制 PHP程序设计中,很重要的环节就是条件判断! 条件判断能根据不同的情况执行不同的程序码...

Ruby幼幼班--Majority Element

偶尔分享一下新歌... Majority Element 题目连结:https://leetcod...

JS 参数 DAY62

参数 函式包含哪些参数?? var globalVariable = '全域变数'; var obj...

D3JsDay04一同来见识 D3起手式—用D3写Helloworld

如何开始D3js 方法一 使用CDN 请google搜寻D3Js到D3Js的官方网站。 滑鼠滚轮到下...

Day-13-Express 公测与产品的环境切分

Env 在部署的时候都会有切分环境的需求 後端部分依照需求不同会切分不同的环境 Dev - 提供前端...