Giter Club home page Giter Club logo

docker-slapd's Introduction

Docker Slapd

Deployment

  1. Create persistent data volumes:

    docker volume create slapd-config
    docker volume create slapd-data
    docker volume create slapd-ssl
    
  2. Ensure desired DNS is pointed to target instance

  3. Get letsencrypt certs into slapd-ssl volume:

    docker run \
      --cap-add=NET_ADMIN \
      --name=letsencrypt \
      -v slapd-ssl:/config \
      -e [email protected] \
      -e URL=ldap.hashbang.sh \
      -e VALIDATION=http \
      -p 80:80 \
      -e TZ=UTC \
      linuxserver/letsencrypt
    

    Be sure the files are named: ldap.crt, ldap.key and ca.cert

    They may need to be renamed manually depending on live config expectations.

  4. Install/start systemd unit

    Use the unit file from the root of this repo:

    vim $PWD/docker-slapd.service
    sudo systemctl enable $PWD/docker-slapd.service
    sudo systemctl start docker-slapd.service
    

Configuration

Configuration is all managed within the ldap database itself so you will need to run LDIF files or ldapmodify alter live configuation of ldap rather than traditional configuration management.

Example to load arbitrary ldif file

ldapadd -h ldap.yourdomain.com -p 389 -c -x -D cn=admin,dc=mycorp,dc=com -W -f somefile.ldif

Look at raw state of ldap configuration on disk

docker exec -it slapd cat /etc/ldap/slapd.d/cn\=config.ldif

Backups

Backup all volumes

sudo tar \
  -cvpzf ldap-backup.tar.gz \
  --exclude=/backup.tar.gz \
  --one-file-system /var/lib/docker/volumes/

Restore all volumes

sudo tar  \
  -xvpzf /path/to/backup.tar.gz \
  -C /var/lib/docker/volumes \
  --numeric-owner

docker-slapd's People

Contributors

aagat avatar deleriux2 avatar kellerfuchs avatar lrvick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-slapd's Issues

Automated Testing

To be perfectly honest, I have literally no idea how this will be done.

Increase size limits

A few days ago, provisor started running into a too-low reply size limit.

@lrvick told me how to fix this, and I did, but the fix should also be integrated in the setup script here.

Prefix LDAP_ to the Environment Variables

Currently, this container is using the following

ADMIN_PASS
ROOT_PASS
DOMAIN
ORG

I have some conflicts, because those are fairly generic. I have seen that other containers (like the official MySQL container) use a prefix. I think that maybe it would be useful

LDAP_ADMIN_PASS
LDAP_ROOT_PASS
LDAP_DOMAIN
LDAP_ORG

Of course I could fork it and change it myself for my deployment, but I was thinking that maybe I am not the only one that would benefit from that. So I'm leaving it here just in case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.