...
Warning |
---|
In order to perform this migration, you need to request Openstack Application Credentials EWC - How to request Openstack Application Credentials |
User procedure
- Backup existing ldap VM using the following documentation: EWC - How to create and restore backups from VMs
- add port 636 TCP.749 TCP,464 UDP to ldap security group
Code Block ADD OPENSTACK COMMAND
- Run workflow to create dns Create DNS reverse zone into LDAP machine to create the reverse hosted zone (if missing)
Code Block ipa dnszone-add --name-from-ip=10.0.0.63 or using IP range (https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/linux_domain_identity_authentication_and_policy_guide/managing-reverse-dns-zones)
- Backup existing ldap VM using the following documentation: EWC - How to create and restore backups from VMs
- If your LDAP is rocky 8 based jump to step 9., if it is centos7 continue normally.
- Create LDAP replica instance type to move from centos7 to rocky 8 (see MigratefromCentos7toRocky8);
- run workflow to switch IP interfaces between LDAP (see RunworkflowtoswitchIPinterfacesbetweenLDAP);
- Check everything is fine (see Tests);
- Create LDAP replica instance type to move from centos7 to rocky 8 (see MigratefromRocky8toRocky9)
- run workflow to switch IP interfaces between LDAP (see RunworkflowtoswitchIPinterfacesbetweenLDAP);
- Check everything is fine (see Tests);
- Remove old LDAPs
...
- deploy a new machine with
- rocky 8
- new ldap security group
- plan eo1.medium
- become sudo
- stop and disable firewalld on the machine systemctl stop firewalld && systemctl disable firewalld
- add old ldap IP and domain of the machine acting as LDAP in one line to /etc/hosts on this machine
Code Block [test234@test-podman2 ~]$ cat /etc/hosts <!-- BEGIN ANSIBLE MANAGED BLOCK --> 10.0.0.133 test-podman2.eumetsat.sandbox.ewc 10.0.0.63 <OLD LDAP complete domain (e.g. ldap.eumetsat.sandbox.ewc)> <!-- END ANSIBLE MANAGED BLOCK -->
- Install dependencies
- for rocky 8:
Code Block sudo yum -y update
Code Block sudo yum module reset idm:DL1
Code Block sudo yum module enable idm:DL1
Code Block sudo dnf install freeipa-server ipa-server-dns bind-dyndb-ldap -y
- for rocky 8:
- Run the following command to install the LDAP replica
Code Block ipa-replica-install --domain "eumetsat.sandbox.ewc" --principal sandbox-ldap-admin --admin-password hunter2 --server <OLD LDAP complete domain (e.g. ldap.eumetsat.sandbox.ewc)> --setup-ca --setup-dns --force-join --forwarder=8.8.8.8 --forwarder=1.1.1.1 --no-host-dns --unattended
(add --verbose for more logs) NOTE: go go ahead with the default netbios and also put yes when asked about the ipa-sidgen task installation for users
--no-host-dns Do not use DNS for hostname lookup during installation
Migrate from Rocky 8 to Rocky 9
...
- deploy a new machine with
- rocky 9
- new ldap security group
- plan eo1.medium
- become sudo
- stop and disable firewalld on the machine systemctl stop firewalld && systemctl disable firewalld
- add old ldap IP and domain of the machine acting as LDAP in one line to /etc/hosts on this machine
Code Block [test234@test-podman2 ~]$ cat /etc/hosts <!-- BEGIN ANSIBLE MANAGED BLOCK --> 10.0.0.133 test-podman2.eumetsat.sandbox.ewc 10.0.0.63 <OLD LDAP complete domain (e.g. ldap.eumetsat.sandbox.ewc)> <!-- END ANSIBLE MANAGED BLOCK -->
- Install dependencies
- for rocky 9: Install ipa-replica-install command (dnf install
Code Block sudo dnf install ipa-server ipa-server-dns -y
- for rocky 9: Install ipa-replica-install command (dnf install
- Run the following command to install the LDAP replica
Code Block ipa-replica-install --domain "eumetsat.sandbox.ewc" --principal sandbox-ldap-admin --admin-password hunter2 --server <OLD LDAP complete domain (e.g. ldap.eumetsat.sandbox.ewc)> --setup-ca --setup-dns --force-join --forwarder=8.8.8.8 --forwarder=1.1.1.1 --no-host-dns --unattended
add --verbose for more logs
ipa dnszone-mod <DNS ZONE you find with ipa dnszone-find> --name-server=<NEWLDAP complete domain (e.g. ldap-test-rocky.eumetsat.sandbox.ewc)>
...
- login with DNS from ssh-proxy
- Run sudo ipactl status → verify the services are all up and running
- Deploy a new machine and enroll
Post Installation
...
(optional)
After We've found a problem after the IPA Migration, especially from Centos7 to Rocky9, there might be still some possible errors, like the one below:
ipa: ERROR: Operations error: Allocation of a new value for range cn=posix ids,cn=distributed numeric assignment plugin,cn=plugins,cn=config failed! Unable to proceed.
There is a FreeIPA doc site related to this: https://www.freeipa.org/page/V3/Recover_DNA_Ranges.htmlI've fixed this using ipa-replica-manage dnarange-set $ldap_server ${min}-${max}
I've found the range we used with ipa idrange-find
and set
The fix for that error is the following command:
- Identify min and max range of IDs
Code Block ipa idrange-find
- Set the lower boundary to exclude every existing account (as of
ipa user-find | grep 'UID'
)
...
- Assign the DNS range using ${min}-${max} identified in the previous steps
Code Block ipa-replica-manage dnarange-set $ldap_server ${min}-${max}
- Check the range that is used
...
Code Block |
---|
ipa-replica-manage |
...
dnarange-show |