Merge pull request #11828 from owncloud/ldap_deployment_replace_image
fix: replace obsolete docker image for the ldap example
This commit is contained in:
6 files changed
+52
-28
No files matched your search
@@ -0,0 +1,10 @@
|
||||
Bugfix: Replace obsolete docker image in the deployment example
|
||||
|
||||
In the ocis_ldap deployment example, we were using the bitnami/openldap docker
|
||||
image. This image isn't available any longer, so the example couldn't be
|
||||
deployed as intended.
|
||||
|
||||
We've replaced the docker image with the osixia/openldap image and we've
|
||||
adjusted some of the configuration of the openldap image.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/11828
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
printenv
|
||||
|
||||
if [ ! -f /opt/bitnami/openldap/share/openldap.key ]
|
||||
then
|
||||
openssl req -x509 -newkey rsa:4096 -keyout /opt/bitnami/openldap/share/openldap.key -out /opt/bitnami/openldap/share/openldap.crt -sha256 -days 365 -batch -nodes
|
||||
fi
|
||||
# run original docker-entrypoint
|
||||
/opt/bitnami/scripts/openldap/entrypoint.sh "$@"
|
||||
@@ -0,0 +1,8 @@
|
||||
# groupOfNames requires at least one member to be present
|
||||
# The refint will use this dn if the last member of the group
|
||||
# has been removed
|
||||
dn: cn=nobody,dc=owncloud,dc=com
|
||||
objectClass: top
|
||||
objectClass: organizationalRole
|
||||
description: to be used for refint in empty groups
|
||||
cn: nobody
|
||||
@@ -0,0 +1,14 @@
|
||||
# configure memberof overlay to use groupOfNames and member attributes
|
||||
dn: olcOverlay={0}memberof,olcDatabase={1}mdb,cn=config
|
||||
changetype: modify
|
||||
replace: olcMemberOfGroupOC
|
||||
olcMemberOfGroupOC: groupOfNames
|
||||
-
|
||||
replace: olcMemberOfMemberAD
|
||||
olcMemberOfMemberAD: member
|
||||
|
||||
# configure refint overlay to use nobody if no member is present
|
||||
dn: olcOverlay={1}refint,olcDatabase={1}mdb,cn=config
|
||||
changetype: modify
|
||||
replace: olcRefintNothing
|
||||
olcRefintNothing: cn=nobody,dc=owncloud,dc=com
|
||||
@@ -1,8 +1,9 @@
|
||||
dn: dc=owncloud,dc=com
|
||||
objectClass: organization
|
||||
objectClass: dcObject
|
||||
dc: owncloud
|
||||
o: ownCloud
|
||||
# the owncloud organization is already setup by osixia configuration
|
||||
#dn: dc=owncloud,dc=com
|
||||
#objectClass: organization
|
||||
#objectClass: dcObject
|
||||
#dc: owncloud
|
||||
#o: ownCloud
|
||||
|
||||
dn: ou=users,dc=owncloud,dc=com
|
||||
objectClass: organizationalUnit
|
||||
|
||||
@@ -60,7 +60,7 @@ services:
|
||||
command: [ "-c", "ocis init || true; exec ocis server" ]
|
||||
environment:
|
||||
# users/groups from ldap
|
||||
OCIS_LDAP_URI: ldaps://ldap-server:1636
|
||||
OCIS_LDAP_URI: ldaps://ldap-server:636
|
||||
OCIS_LDAP_INSECURE: "true"
|
||||
OCIS_LDAP_BIND_DN: "cn=admin,dc=owncloud,dc=com"
|
||||
OCIS_LDAP_BIND_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin}
|
||||
@@ -106,28 +106,27 @@ services:
|
||||
restart: always
|
||||
|
||||
ldap-server:
|
||||
image: bitnami/openldap:2.6
|
||||
image: osixia/openldap:1.5.0
|
||||
networks:
|
||||
ocis-net:
|
||||
entrypoint: ["/bin/sh", "/opt/bitnami/scripts/openldap/docker-entrypoint-override.sh", "/opt/bitnami/scripts/openldap/run.sh" ]
|
||||
environment:
|
||||
BITNAMI_DEBUG: true
|
||||
LDAP_TLS_VERIFY_CLIENT: never
|
||||
LDAP_ENABLE_TLS: "yes"
|
||||
LDAP_TLS_CA_FILE: /opt/bitnami/openldap/share/openldap.crt
|
||||
LDAP_TLS_CERT_FILE: /opt/bitnami/openldap/share/openldap.crt
|
||||
LDAP_TLS_KEY_FILE: /opt/bitnami/openldap/share/openldap.key
|
||||
LDAP_TLS: true
|
||||
LDAP_ORGANISATION: owncloud
|
||||
LDAP_DOMAIN: owncloud.com
|
||||
LDAP_ROOT: "dc=owncloud,dc=com"
|
||||
LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin}
|
||||
LDAP_SEED_INTERNAL_LDIF_PATH: /ldifs
|
||||
LDAP_SEED_INTERNAL_SCHEMA_PATH: /schemas
|
||||
ports:
|
||||
- "127.0.0.1:389:1389"
|
||||
- "127.0.0.1:636:1636"
|
||||
- "127.0.0.1:389:389"
|
||||
- "127.0.0.1:636:636"
|
||||
volumes:
|
||||
- ./config/ldap/ldif:/ldifs
|
||||
- ./config/ldap/schemas:/schemas
|
||||
- ./config/ldap/docker-entrypoint-override.sh:/opt/bitnami/scripts/openldap/docker-entrypoint-override.sh
|
||||
- ldap-certs:/opt/bitnami/openldap/share
|
||||
- ldap-data:/bitnami/openldap
|
||||
- ldap-certs:/container/service/slapd/assets/certs
|
||||
- ldap-data:/var/lib/ldap
|
||||
- ldap-config:/etc/ldap/slapd.d
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
@@ -137,7 +136,7 @@ services:
|
||||
networks:
|
||||
ocis-net:
|
||||
environment:
|
||||
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap-server': [{'server': [{'port': 1389}]}]}]"
|
||||
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap-server': [{'server': [{'port': 389}]}]}]"
|
||||
PHPLDAPADMIN_HTTPS: "false"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
@@ -156,6 +155,7 @@ volumes:
|
||||
ocis-config:
|
||||
ocis-data:
|
||||
ldap-data:
|
||||
ldap-config:
|
||||
|
||||
|
||||
networks:
|
||||
|
||||
Reference in new issue
Block a user