Commit 489f3ab0 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Limpia, simplifica y actualiza configs de deploy

parent b81b88e4
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
ELASTICSEARCH_URL=http://elasticsearch
ELASTICSEARCH_AUTH=user:pass
ES_USER=user
ES_PASS=pass
ELASTICSEARCH_PORT=9200
CURATOR_TIMEOUT=60
LOG_INDEX_PREFIX=fluentd-
@@ -14,3 +15,12 @@ DELETE_OLD_LOGS_DISABLE=False
SNAPSHOT_DISABLE=False
DELETE_OLD_SNAPSHOTS_DISABLE=False
RESTORE_SNAPSHOT_DISABLE=True

CURATOR_CONFIG_PATH=/.curator/curator.yml
CURATOR_ACTIONS_PATH=/.curator/actions.yml

ELASTIC_NET_NAME=elastic6-net
ELASTIC_NET_DRIVER=overlay

CURATOR_CONFIG_CONFIG_NAME=curator-config
CURATOR_ACTIONS_CONFIG_NAME=curator-actions
+28 −24
Original line number Diff line number Diff line
@@ -2,50 +2,54 @@ version: '3.5'

services:
  curator-restore:
    image: bobrik/curator:${IMAGE_TAG:-latest}
    command: /.curator/actions.yml
    image: ${IMAGE_NAME:-bobrik/curator}:${IMAGE_TAG:-latest}
    command: ${CURATOR_ACTIONS_PATH}
    environment:
      - ELASTICSEARCH_URL
      - ELASTICSEARCH_AUTH
      - ELASTICSEARCH_PORT
      - CURATOR_TIMEOUT
      - SNAPSHOT_REPOSITORY
      - SNAPSHOT_RESTORE_NAME
      - SNAPSHOT_RESTORE_INDICES
      - SNAPSHOT_RESTORE_INCLUDE_ALIASES
      - DELETE_OLD_LOGS_DISABLE=True
      - SNAPSHOT_DISABLE=True
      - DELETE_OLD_SNAPSHOTS_DISABLE=True
      - RESTORE_SNAPSHOT_DISABLE=False
      ELASTICSEARCH_URL:
      ELASTICSEARCH_AUTH: ${ES_USER}:${ES_PASS}
      ELASTICSEARCH_PORT:
      CURATOR_TIMEOUT:
      SNAPSHOT_REPOSITORY:
      SNAPSHOT_RESTORE_NAME:
      SNAPSHOT_RESTORE_INDICES:
      SNAPSHOT_RESTORE_INCLUDE_ALIASES:
      DELETE_OLD_LOGS_DISABLE: 'True'
      SNAPSHOT_DISABLE: 'True'
      DELETE_OLD_SNAPSHOTS_DISABLE: 'True'
      RESTORE_SNAPSHOT_DISABLE: 'False'
    networks:
      - elastic-net
      elastic-net:
    configs:
      - source: curator-config
        target: /.curator/curator.yml
        target: ${CURATOR_CONFIG_PATH}
      - source: curator-actions
        target: /.curator/actions.yml
        target: ${CURATOR_ACTIONS_PATH}
    deploy:
      mode: replicated
      replicas: 1
      replicas: ${REPLICAS:-1}
      restart_policy:
        condition: none
      update_config:
        delay: ${UPDATE_DELAY:-1m}
      resources:
        limits:
          cpus: '0.1'
          memory: 64M
          cpus: '${RESOURCES_LIMITS_CPUS:-0.1}'
          memory: ${RESOURCES_LIMITS_MEMORY:-64M}
        reservations:
          memory: 32M
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-32M}

networks:
  elastic-net:
    name: ${ELASTIC_NET_NAME:-elastic6-net}
    name: ${ELASTIC_NET_NAME}
    driver: ${ELASTIC_NET_DRIVER}
    external: true

configs:
  curator-config:
    name: ${CURATOR_CONFIG_NAME:-curator-config}
    name: ${CURATOR_CONFIG_CONFIG_NAME}
    file: ./config/curator.yml

  curator-actions:
    name: ${CURATOR_ACTIONS_NAME:-curator-actions}
    name: ${CURATOR_ACTIONS_CONFIG_NAME}
    file: ./config/actions.yml
+29 −26
Original line number Diff line number Diff line
@@ -3,52 +3,55 @@ version: '3.5'
services:
  curator:
    image: ${IMAGE_NAME:-bobrik/curator}:${IMAGE_TAG:-latest}
    command: /.curator/actions.yml
    command: ${CURATOR_ACTIONS_PATH}
    environment:
      - ELASTICSEARCH_URL
      - ELASTICSEARCH_AUTH
      - ELASTICSEARCH_PORT
      - CURATOR_TIMEOUT
      - LOG_INDEX_PREFIX
      - DELETE_OLD_LOGS_TIMESTRING
      - DELETE_OLD_LOGS_MONTHS_COUNT
      - SNAPSHOT_REPOSITORY
      - DELETE_OLD_SNAPSHOTS_DAYS_COUNT
      - DELETE_OLD_LOGS_DISABLE
      - SNAPSHOT_DISABLE
      - DELETE_OLD_SNAPSHOTS_DISABLE
      - RESTORE_SNAPSHOT_DISABLE
      ELASTICSEARCH_URL:
      ELASTICSEARCH_AUTH: ${ES_USER}:${ES_PASS}
      ELASTICSEARCH_PORT:
      CURATOR_TIMEOUT:
      LOG_INDEX_PREFIX:
      DELETE_OLD_LOGS_TIMESTRING:
      DELETE_OLD_LOGS_MONTHS_COUNT:
      SNAPSHOT_REPOSITORY:
      DELETE_OLD_SNAPSHOTS_DAYS_COUNT:
      DELETE_OLD_LOGS_DISABLE:
      SNAPSHOT_DISABLE:
      DELETE_OLD_SNAPSHOTS_DISABLE:
      RESTORE_SNAPSHOT_DISABLE:
    networks:
      - elastic-net
      elastic-net:
    configs:
      - source: curator-config
        target: /.curator/curator.yml
        target: ${CURATOR_CONFIG_PATH}
      - source: curator-actions
        target: /.curator/actions.yml
        target: ${CURATOR_ACTIONS_PATH}
    deploy:
      mode: replicated
      replicas: 1
      replicas: ${REPLICAS:-1}
      restart_policy:
        condition: on-failure
        delay: 10s
        window: 1m
        delay: ${RESTART_DELAY:-10s}
      update_config:
        delay: ${UPDATE_DELAY:-1m}
      resources:
        limits:
          cpus: '0.1'
          memory: 64M
          cpus: '${RESOURCES_LIMITS_CPUS:-0.1}'
          memory: ${RESOURCES_LIMITS_MEMORY:-64M}
        reservations:
          memory: 32M
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-32M}

networks:
  elastic-net:
    name: ${ELASTIC_NET_NAME:-elastic6-net}
    name: ${ELASTIC_NET_NAME}
    driver: ${ELASTIC_NET_DRIVER}
    external: true

configs:
  curator-config:
    name: ${CURATOR_CONFIG_NAME:-curator-config}
    name: ${CURATOR_CONFIG_CONFIG_NAME}
    file: ./config/curator.yml

  curator-actions:
    name: ${CURATOR_ACTIONS_NAME:-curator-actions}
    name: ${CURATOR_ACTIONS_CONFIG_NAME}
    file: ./config/actions.yml
+26 −26
Original line number Diff line number Diff line
@@ -2,52 +2,52 @@ version: '3.5'

services:
  old-curator:
    image: bobrik/curator:${IMAGE_TAG:-latest}
    command: /.curator/actions.yml
    image: ${IMAGE_NAME:-bobrik/curator}:${IMAGE_TAG:-latest}
    command: ${CURATOR_ACTIONS_PATH}
    environment:
      - ELASTICSEARCH_URL
      - ELASTICSEARCH_AUTH
      - ELASTICSEARCH_PORT
      - CURATOR_TIMEOUT
      - LOG_INDEX_PREFIX
      - DELETE_OLD_LOGS_MONTHS_COUNT
      - SNAPSHOT_REPOSITORY
      - DELETE_OLD_SNAPSHOTS_DAYS_COUNT
      - DELETE_OLD_LOGS_DISABLE
      - SNAPSHOT_DISABLE
      - DELETE_OLD_SNAPSHOTS_DISABLE
      - RESTORE_SNAPSHOT_DISABLE
      ELASTICSEARCH_URL:
      ELASTICSEARCH_AUTH: ${ES_USER}:${ES_PASS}
      ELASTICSEARCH_PORT:
      CURATOR_TIMEOUT:
      SNAPSHOT_REPOSITORY:
      DELETE_OLD_LOGS_DISABLE: 'True'
      SNAPSHOT_DISABLE: 'False'
      DELETE_OLD_SNAPSHOTS_DISABLE: 'True'
      RESTORE_SNAPSHOT_DISABLE: 'True'
    networks:
      - elastic-net
      elastic-net:
    configs:
      - source: curator-config
        target: /.curator/curator.yml
        target: ${CURATOR_CONFIG_PATH}
      - source: curator-actions
        target: /.curator/actions.yml
        target: ${CURATOR_ACTIONS_PATH}
    deploy:
      mode: replicated
      replicas: 1
      replicas: ${REPLICAS:-1}
      restart_policy:
        condition: on-failure
        delay: 10s
        window: 1m
        delay: ${RESTART_DELAY:-10s}
      update_config:
        delay: ${UPDATE_DELAY:-1m}
      resources:
        limits:
          cpus: '0.1'
          memory: 64M
          cpus: '${RESOURCES_LIMITS_CPUS:-0.1}'
          memory: ${RESOURCES_LIMITS_MEMORY:-64M}
        reservations:
          memory: 32M
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-32M}

networks:
  elastic-net:
    name: ${ELASTIC_NET_NAME:-elastic-net}
    name: ${ELASTIC_NET_NAME}
    driver: ${ELASTIC_NET_DRIVER}
    external: true

configs:
  curator-config:
    name: ${CURATOR_CONFIG_NAME:-curator-config}
    name: ${CURATOR_CONFIG_CONFIG_NAME}
    file: ./config/curator.yml

  curator-actions:
    name: ${CURATOR_ACTIONS_NAME:-curator-actions}
    name: ${CURATOR_ACTIONS_CONFIG_NAME}
    file: ./config/actions.yml