Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- job "segment-processing-test" {
- datacenters = ["dc1"]
- type = "service"
- update {
- max_parallel = 1
- min_healthy_time = "30s"
- healthy_deadline = "5m"
- auto_revert = true
- }
- group "segment-service" {
- count = 1
- task "segment-service" {
- driver = "docker"
- config {
- image = "artifactory.setmachine.ru:5001/dbapi/dbapi-service:1.0.0"
- auth {
- username = "docker-segment-ro"
- password = "Gf$6f7W*4K32"
- }
- args = [
- "java",
- "-Dspring.profiles.active=production,cloud",
- "-jar",
- "/app/dbapi-service.jar"
- ]
- port_map = {
- http = 8080,
- debug = 8787
- }
- force_pull = true
- dns_servers = ["${NOMAD_IP_http}"]
- }
- env {
- "spring.application.name" = "segment-service-test"
- "spring.cloud.consul.host" = "${NOMAD_IP_http}"
- "spring.cloud.consul.port" = "8500"
- "spring.cloud.consul.config.format" = "properties"
- }
- resources {
- cpu = 1000
- memory = 1000
- network {
- port "http" {
- static = "8080"
- }
- port "tcp" {}
- }
- }
- }
- task "log" {
- driver = "docker"
- template {
- data = "{{ key \"config/filebeat\" }}"
- destination = "local/filebeat.yml"
- change_mode = "restart"
- }
- config {
- image = "artifactory.setmachine.ru:5000/filebeat:6.6.1"
- auth {
- username = "developer"
- password = "tc324012"
- }
- args = ["filebeat", "-e", "-c", "/local/filebeat.yml"]
- dns_servers = ["${NOMAD_IP_http}"]
- }
- resources {
- cpu = 200
- memory = 200
- }
- }
- }
- group "segments-proxy" {
- count = 1
- task "segments-proxy" {
- driver = "docker"
- config {
- image = "artifactory.setmachine.ru:5001/segmentation-processing/proxy:1.0.0"
- auth {
- username = "docker-segment-ro"
- password = "Gf$6f7W*4K32"
- }
- port_map = {
- http = 8090
- http_nonsecure = 9999
- stats = 3333
- }
- }
- template {
- data = <<EOH
- {{range service "dbapi-service-test"}}server {{.Node}}-{{.Port}} {{.Address}}:{{.Port}},{{end}}
- EOH
- destination = "local/dbapi-endpoints"
- }
- service {
- name = "segments-proxy"
- port = "http"
- address_mode = "host"
- check {
- name = "alive"
- type = "tcp"
- interval = "10s"
- timeout = "2s"
- }
- }
- resources {
- cpu = 1000
- memory = 100
- network {
- port "http" {
- }
- port "http_nonsecure" {
- }
- port "stats" {
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement