Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
4.2. Creating Global Teams and Synchronizing with LDAP Groups
Note
oo-admin-ctl-team
command man pages for detailed descriptions of each command shown in the following instructions.
Procedure 4.1. To Synchronize a Global Team with LDAP Groups:
- Create an LDAP configuration file in the
/etc/openshift/
directory. This file specifies how your instance will connect to the LDAP server and query for LDAP groups and group membership. - Create one or more global teams. If you are not using LDAP groups, then the
--maps-to
option can be specified as anything:oo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=com
# oo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=comoo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=comoo-admin-ctl-team -c create --name Team_Name --maps-to cn=all,ou=Groups,dc=example,dc=com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, you can create a global team straight from LDAP groups using the--groups
option. In this case, you must indicate your LDAP config file and the LDAP groups to create the global team from:oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2
# oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c create --groups Group_Name1,Group_Name2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 4.1. Sample LDAP configuration File
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 4.2. Sample Active Directory based LDAP configuration File
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Next, synchronize global team membership with LDAP:This step can be performed in a cron job in order to regularly synchronize OpenShift Enterprise with LDAP.
oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-users
# oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync --create-new-users --remove-old-users
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, use a sync file to synchronize global team membership with LDAP with the following command:This command creates a file you can modify to suit your requirements. The format is the entity to act upon, an action, then the user names.oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-users
# oo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-usersoo-admin-ctl-team --config-file /etc/openshift/File_Name.yml -c sync-to-file --out-file teams.sync --create-new-users --remove-old-users
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following example sync file adds users to an OpenShift Enterprise instance, then adds them as members to the team named "myteam".Example 4.3. Synchronizing Global Team Membership with a Sync File
USER|ADD|user1 ... USER|ADD|user100 MEMBER|ADD|myteam|user1,...,user100
USER|ADD|user1 ... USER|ADD|user100 MEMBER|ADD|myteam|user1,...,user100
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, create this file from any source and sync team members from the specified file with the following command:oo-admin-ctl-team -c sync-from-file --in-file teams.sync
# oo-admin-ctl-team -c sync-from-file --in-file teams.syncoo-admin-ctl-team -c sync-from-file --in-file teams.sync
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2.1. Encrypting an LDAP Global Team Connection Link kopierenLink in die Zwischenablage kopiert!
.yml
file. This encrypts any communication between the LDAP client and server and is only intended for instances where the LDAP server is a trusted source. simple_tls
encryption establishes an SSL/TLS encryption with the LDAP server before any LDAP protocol data is exchanged, meaning that no validation of the LDAP server's SSL certificate is performed. Therefore, no errors are reported if the SSL certificate of the client is not trusted. If you have communication errors, see your LDAP server administrator.
/etc/openshift/File_Name.yml
file and replace it with the following:
simple_tls
connections on the same port.