An easy to set up OpenShift development kit powered by Red Hat Ansible.
sudo dnf install openldap-clients -y
run playbook
$ ansible-playbook -v playbooks/populate_idm.yml
Test
$ ssh administrator@server.idm.example.com
$ ipa user-show student00
run the playbook
ansible-playbook -v playbooks/openshift_ldap.yml
Reset Password
clusteradmin
ldapidp
oc adm policy add-cluster-role-to-user cluster-admin clusteradmin
oc delete secrets kubeadmin -n kube-system
EXAMPLES OF COMMON LDAPSEARCHES
$ curl https://qbn-dns01.qubinode-lab.com/ipa/config/ca.crt -k -o /home/admin/ipa-ca.crt
Export ipa cert
$ export LDAPTLS_CACERT=$HOME/ipa-ca.crt
Test ldap search
Export Variables
$ DOMAIN1=qubinode-lab
$ DOMAIN2=com
Print all objects in ldap
$ ldapsearch -x -H ldaps://qbn-dns01.qubinode-lab.com -b "dc=${DOMAIN1},dc=${DOMAIN2}"
Get student info
$ export STUDENT_NUM=student00
$ ldapsearch -x -H ldaps://qbn-dns01.qubinode-lab.com -b "uid=${STUDENT_NUM},cn=users,cn=accounts,dc=${DOMAIN1},dc=${DOMAIN2}"
Get Cluster admin info
$ ldapsearch -x -H ldaps://qbn-dns01.qubinode-lab.com -b "uid=clusteradmin,cn=users,cn=accounts,dc=${DOMAIN1},dc=${DOMAIN2}"
curl -OL https://raw.githubusercontent.com/Qubinode/qubinode-installer/dev/playbooks/templates/ldap-groups-sync.yaml
Edit the following line numbers
Create Deployment
oc create -f ldap-groups-sync.yaml
Check openshift-authentication for cron job status