Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sh3b0/gitlab-ldap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitlab-ldap

Configuring local GitLab server with LDAPS authentication and Grafana dashboards.

Overview

Features

  • GitLab-CE and LLDAP containers communicating over LDAPS (LDAP over TLS).
  • Provisioned Grafana dashboards for monitoring GitLab-exported Prometheus metrics
  • Nginx config for enforcing HTTPS to web services.

Screenshots

gitlab-lldap

grafana

Local testing

  1. Clone project

    git clone https://github.com/sh3b0/gitlab-ldap
    cd gitlab-ldap
  2. Create locally-trusted certs quickly with mkcert

    mkdir certs
    cd certs/
    mkcert "*.internal.test"
    mkcert -install
    
    # Shorter file names used in configs
    mv _wildcard.internal.test-key.pem tls.key
    mv _wildcard.internal.test.pem tls.crt
  3. Update /etc/hosts with domains for internal services

    127.0.0.1       grafana.internal.test
    127.0.0.1       ldap.internal.test
    127.0.0.1       gitlab.internal.test
  4. As per docs, you need to copy tls.crt and tls.key content into ./conf/gitlab.rb.

    • Tweak other properties as desired [template]

      # conf/gitlab.rb:29
      ...
      tls_options:
        ssl_version: 'TLSv1_2'
        cert: '-----BEGIN CERTIFICATE----- <REDACTED> -----END CERTIFICATE -----'
        key: '-----BEGIN PRIVATE KEY----- <REDACTED> -----END PRIVATE KEY -----'
      ...
      
      # Update permissions for mounting into gitlab-ce container
      chmod root:root ./conf/gitlab.rb
  5. Create secrets for LLDAP server

    ./scripts/generate_secrets.sh > .env
  6. Run services with docker compose

    docker compose up -d

References

About

Configuring local GitLab server with LDAPS authentication and Grafana dashboards

Topics

Resources

License

Stars

Watchers

Forks