From e352f7bb3a1af7d3e2878c0161a19d6240e6c00b Mon Sep 17 00:00:00 2001 From: mrclemrkz Date: Sun, 4 Nov 2018 10:41:59 +0530 Subject: [PATCH] disable embedded ldap. --- docker-compose.yml | 6 +- is/Dockerfile | 1 + is/config/embedded-ldap.xml | 162 ++++++++++++++++++++++++++++++++++++ is/config/user-mgt.xml | 2 +- reset.sh | 12 +++ docker-up.sh => start.sh | 16 ++-- 6 files changed, 187 insertions(+), 12 deletions(-) create mode 100644 is/config/embedded-ldap.xml create mode 100644 reset.sh rename docker-up.sh => start.sh (71%) diff --git a/docker-compose.yml b/docker-compose.yml index 59fb1b0..030e17f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,14 +17,14 @@ services: image: copper-openldap container_name: copper-openldap environment: - LDAP_DOMAIN: 'copper.opensource.lk' + LDAP_DOMAIN: "copper.opensource.lk" tty: true stdin_open: true ports: - "389:389" - "636:636" - domainname: "copper.opensource.lk" # important: same as hostname - hostname: "copper.opensource.lk" + # domainname: "copper-openldap" # important: same as hostname + # hostname: "copper-openldap" # cn=admin,dc=copper,dc=opensource,dc=lk diff --git a/is/Dockerfile b/is/Dockerfile index c7ff631..88f0b35 100644 --- a/is/Dockerfile +++ b/is/Dockerfile @@ -41,6 +41,7 @@ COPY --chown=wso2carbon:wso2 ./files/wso2carbon.jks ${WSO2_SERVER_SECURITY}/ COPY --chown=wso2carbon:wso2 ./files/client-truststore.jks ${WSO2_SERVER_SECURITY}/ # conecting external ldap +COPY --chown=wso2carbon:wso2 ./config/embedded-ldap.xml ${WSO2_SERVER_CONF}/identity/ COPY --chown=wso2carbon:wso2 ./config/carbon.xml ${WSO2_SERVER_CONF}/ COPY --chown=wso2carbon:wso2 ./config/tenant-mgt.xml ${WSO2_SERVER_CONF}/ COPY --chown=wso2carbon:wso2 ./config/user-mgt.xml ${WSO2_SERVER_CONF}/ diff --git a/is/config/embedded-ldap.xml b/is/config/embedded-ldap.xml new file mode 100644 index 0000000..420933f --- /dev/null +++ b/is/config/embedded-ldap.xml @@ -0,0 +1,162 @@ + + + + + + + + + + false + ${Ports.EmbeddedLDAP.LDAPServerPort} + default + admin + . + identityPerson + false + true + false + 2000000 + localhost + ldap/localhost@EXAMPLE.COM + + + + + root + WSO2.ORG + secret + randall + + + + + admin + admin + admin + admin@wso2.com + admin + SHA + + + + + admin + cn + member + + + + + defaultKDC + false + UDP + localhost + ${Ports.EmbeddedLDAP.KDCServerPort} + 8640000 + 604800000 + true + + + diff --git a/is/config/user-mgt.xml b/is/config/user-mgt.xml index c3179a6..4a341c5 100644 --- a/is/config/user-mgt.xml +++ b/is/config/user-mgt.xml @@ -205,7 +205,7 @@ 100 100 false - localhost.com + WSO2.ORG true false 5000 diff --git a/reset.sh b/reset.sh new file mode 100644 index 0000000..575a9f1 --- /dev/null +++ b/reset.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# remove containers + +docker stop $(docker ps -a -q) +docker rm $(docker ps -a -q) + + +# remove images + +docker rmi copper-is +docker rmi copper-openldap \ No newline at end of file diff --git a/docker-up.sh b/start.sh similarity index 71% rename from docker-up.sh rename to start.sh index cbda9d5..3928a41 100644 --- a/docker-up.sh +++ b/start.sh @@ -2,17 +2,17 @@ docker-compose up --build -d -# STATUS="0" +STATUS="0" -# until [[ ${STATUS} == *"ok"* ]]; do -# echo " wating until slpd is started" -# STATUS=`docker exec -ti copper-openldap sh -c "service slapd status"` -# sleep 5 -# done +until [[ ${STATUS} == *"ok"* ]]; do + echo " wating until slpd is started" + STATUS=`docker exec -ti copper-openldap sh -c "service slapd status"` + sleep 5 +done -# echo " slapd has started!" +echo " slapd has started!" -sleep 20 +# sleep 30 docker exec -it copper-openldap /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// -f /home/97-wso2Person.ldif docker exec -it copper-openldap /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// -f /home/98-scimPerson.ldif