Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Switch IP interfaces between LDAP

  1. SSH to the VM with Openstack client installed and run the following commands:
    1. Show information about the OLD LDAP machine (SERVER_NAME usually is ldap in the tenancies by default):
      Code Block
      openstack server show SERVER_NAME
    2. Detach the interface from the OLD LDAP machine (SERVER_NAME is the name of the OLD LDAP VM from previous command, IP_ADDRESS is the private IP of the OLD LDAP VM, you listed with the previous command, SAVE IT in your notes!)
      Code Block
      openstack server remove fixed ip SERVER_NAME IP_ADDRESS 
    SSH In the In the NEW LDAP machine (LDAP replica)
    1. Update the IP of the NEW LDAP machine in the /etc/hosts (IP_ADDRESS ) with the IP of the OLD LDAP machine and remove the line relative to the OLD LDAP ( The one you saved before in your notes!), You will end up with:
      Code Block
      [murdaca@ipa ~]$ cat /etc/hosts
      
      <!-- BEGIN ANSIBLE MANAGED BLOCK -->
      
      IP_ADDRESS ipa.batchpro.ewc
      
      <!-- END ANSIBLE MANAGED BLOCK -->
    2. Delete OLD LDAP machine DNS records (SERVER is the old LDAP machine complete domain (e.g. ldap-test-rocky.eumetsat.sandbox.ewc)
      Code Block
      ipa-replica-manage del SERVER --force
    3. Find the dns zone name, you have two alternatives:

      1.  You can find this information loggning logging in Morpheus → Tools → Cypher and check the following secret → secret/ldap_domain

      2. Use ipa command

        Code Block
        ipa dnszone-find
    4. Replace the NEW LDAP machine IP with the IP of the interface of the OLD LDAP machine (HOSTED_ZONE is the output name from the previous command, IP_ADDRESS=The one you saved before in your notes!HOSTNAME is the new LDAP machine complete domain (e.g. ldap-test-rocky.eumetsat.sandbox.ewc)
      Code Block
      ipa dnsrecord-mod HOSTED_ZONE ipa-ca --a-rec IP_ADDRESS 
      ipa dnsrecord-mod HOSTED_ZONE HOSTNAME --a-rec  IP_ADDRESS
  2. SSH to the VM with Openstack client installed and run the following commands:
    1. Show information about the OLD LDAP machine (SERVER_NAME usually is ldap in the tenancies by default):
      Code Block
      openstack server show SERVER_NAME
    2. Detach the interface from the OLD LDAP machine (SERVER_NAME is the name of the OLD LDAP VM from previous command, IP_ADDRESS is the private IP of the OLD LDAP VM, you listed with the previous command, SAVE IT in your notes!)
      Code Block
      openstack server remove fixed ip SERVER_NAME IP_ADDRESS 
    3. Switch off the NEW LDAP machine (SERVER_NAME is the name of the VM, you can find it with openstack server list )
      Code Block
      openstack server stop SERVER_NAME 
    4. Detach the interface from the NEW LDAP machine (SERVER_NAME is the name of the VM, IP_ADDRESS is the private IP of the NEW LDAP VM )
      Code Block
      openstack server remove fixed ip SERVER_NAME IP_ADDRESS 
    5. Add interface to the NEW LDAP machine with the IP of the old LDAP machine (SERVER_NAME is the name of the VM, IP_ADDRESS=The one you saved before in your notes!
      Code Block
      openstack server add fixed ip SERVER_NAME IP_ADDRESS 
    6. Add LDAP security group to new LDAP machine (SERVER_NAME is the name of the NEW LDAP VM)
      Code Block
      openstack server add security group SERVER_NAME ldap
    7. Restart NEW LDAP machine (SERVER_NAME is the name of the new LDAP VM)
      Code Block
      openstack server restart SERVER_NAME 
  3. Login to Morpheus and change the value of the hostname for LDAP, going to Tools → Cypher:
    1. Delete the secret/ldap_hostname
    2. Use the '+ADD' to create a new secret
    3.  Add KEY: secret/ldap_hostname and VALUE: new LDAP hostname (e.g. ldap.eumetsat.sandbox.ewc) 

...