Commit 87fe352c authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Configura primera versión de servicio y despliegue

parent d18e6c41
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+15 −0
Original line number Diff line number Diff line
include:
  - project: 'redmic-project/gitlab-ci-templates'
    ref: master
    file: '/deployment.yml'

stages:
  - deploy

variables:
  PROJECT_PARENT_NAME: auth

.deploy:
  variables:
    STACK: ${PROJECT_PARENT_NAME}
    SERVICES_TO_CHECK: ${PROJECT_PARENT_NAME}_${CI_PROJECT_NAME}

deploy/.env

0 → 100644
+7 −0
Original line number Diff line number Diff line
LDAP_ORGANISATION=Example Inc.
LDAP_DOMAIN=example.org
LDAP_ADMIN_PASSWORD=changeme
LDAP_CONFIG_PASSWORD=changeme
LDAP_TLS=false
DATA_VOL_NAME=openldap-data-vol
CONFIG_VOL_NAME=openldap-config-vol
+15 −0
Original line number Diff line number Diff line
version: '3.5'

services:
  openldap:
    deploy:
      placement:
        constraints:
          - node.hostname == ${PLACEMENT_CONSTRAINTS_NODE_HOSTNAME:-hostname}

volumes:
  data-vol:
    name: ${DATA_VOL_NAME}

  config-vol:
    name: ${CONFIG_VOL_NAME}
+14 −0
Original line number Diff line number Diff line
version: '3.5'

volumes:
  data-vol:
    name: ${DATA_VOL_NAME}
    driver: 'cloudstor:aws'
    driver_opts:
      backing: shared

  config-vol:
    name: ${CONFIG_VOL_NAME}
    driver: 'cloudstor:aws'
    driver_opts:
      backing: shared
+36 −0
Original line number Diff line number Diff line
version: '3.5'

services:
  openldap:
    image: ${IMAGE_NAME:-osixia/openldap}:${IMAGE_TAG:-latest}
    environment:
      LDAP_ORGANISATION:
      LDAP_DOMAIN:
      LDAP_ADMIN_PASSWORD:
      LDAP_CONFIG_PASSWORD:
      LDAP_TLS:
    networks:
      auth-net:
    volumes:
      - data-vol:/var/lib/ldap
      - config-vol:/etc/ldap/slapd.d
    deploy:
      mode: replicated
      replicas: ${REPLICAS:-1}
      restart_policy:
        delay: ${RESTART_DELAY:-10s}
      update_config:
        delay: ${UPDATE_DELAY:-1m}
      resources:
        limits:
          cpus: '${RESOURCES_LIMITS_CPUS:-0.1}'
          memory: ${RESOURCES_LIMITS_MEMORY:-64M}
        reservations:
          cpus: '${RESOURCES_RESERVATIONS_CPUS:-0.001}'
          memory: ${RESOURCES_RESERVATIONS_MEMORY:-32M}

networks:
  auth-net:
    name: ${AUTH_NET_NAME:-auth-net}
    driver: ${AUTH_NET_DRIVER:-overlay}
    attachable: ${AUTH_NET_ATTACHABLE:-true}