Commit 7a152fc9 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Cambia bloqueo de nodo por volumen NFS, actualiza

Elimina reestricción de nodo de despliegue, usando volumen NFS para la
configuración (el otro volumen sigue siendo local, no hace falta
cambiarlo).
Incrementa versión de docker-compose y refactoriza definiciones.
parent fca68872
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
IMAGE_NAME=gitlab/gitlab-runner
IMAGE_TAG=alpine
PLACEMENT_CONSTRAINTS_NODE_HOSTNAME=hostname

CONFIG_FILE=/etc/gitlab-runner/config.toml
CI_SERVER_URL=https://gitlab.com/
@@ -36,6 +35,10 @@ CACHE_S3_BUCKET_NAME=gitlab-runner-cache

CONFIG_VOL_NAME=gitlab-runner-config-vol
WORK_VOL_NAME=gitlab-runner-work-vol
VOL_TYPE=nfs4
VOL_ADDR=127.0.0.1
VOL_OPTIONS=rw,nolock,noatime,tcp,rsize=8192,wsize=8192,timeo=14
VOL_DEVICE=:/gitlab-runner-config-vol/

GITLAB_NET_NAME=gitlab-net
GITLAB_NET_DRIVER=overlay
+5 −11
Original line number Diff line number Diff line
version: '3.5'

services:
  gitlab-runner-registrar:
    deploy:
      placement:
        constraints:
          - node.hostname == ${PLACEMENT_CONSTRAINTS_NODE_HOSTNAME}
version: '3.8'

volumes:
  config-vol:
    name: ${CONFIG_VOL_NAME}

  work-vol:
    name: ${WORK_VOL_NAME}
    driver_opts:
      type: ${VOL_TYPE}
      o: addr=${VOL_ADDR},${VOL_OPTIONS}
      device: ${VOL_DEVICE}
+5 −1
Original line number Diff line number Diff line
version: '3.5'
version: '3.8'

services:
  gitlab-runner-registrar:
@@ -60,6 +60,10 @@ services:
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-16M}

volumes:
  work-vol:
    name: ${WORK_VOL_NAME}

networks:
  gitlab-net:
    name: ${GITLAB_NET_NAME}
+5 −11
Original line number Diff line number Diff line
version: '3.5'

services:
  gitlab-runner:
    deploy:
      placement:
        constraints:
          - node.hostname == ${PLACEMENT_CONSTRAINTS_NODE_HOSTNAME}
version: '3.8'

volumes:
  config-vol:
    name: ${CONFIG_VOL_NAME}

  work-vol:
    name: ${WORK_VOL_NAME}
    driver_opts:
      type: ${VOL_TYPE}
      o: addr=${VOL_ADDR},${VOL_OPTIONS}
      device: ${VOL_DEVICE}
+5 −1
Original line number Diff line number Diff line
version: '3.5'
version: '3.8'

services:
  gitlab-runner:
@@ -26,6 +26,10 @@ services:
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-32M}

volumes:
  work-vol:
    name: ${WORK_VOL_NAME}

networks:
  gitlab-net:
    name: ${GITLAB_NET_NAME}