Planning ISPConfig infrastructure upgrade and expansion

Discussion in 'ISPConfig 3 Priority Support' started by mlnzigzag, Feb 26, 2019.

  1. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    Actually my ISPConfig multiserver infrastructure is as follows:
    domain is xyz.net (not really!), srv1 and srv2 are the authoritative name servers for the domain. Since it is a .net domain, both hostname/ip pairs are registered at the provider's db, and this is something I need to open a ticket and wait around 24h to have it done.

    srv1, master, Ubuntu 14.04, roles: dns, web, mail, mysql
    srv2, slave, (failed server, needs to be replaced), role: dns
    srv3, slave, Ubuntu 16.04, role: mail

    What I would like to do is:
    • create a new srv, slave, with role dns and make it the new authoritative name server for xyz.net, so it can take the role from the failed srv2. There are no backups at all of the failed srv2.
    • delete every trace of the failed srv2 from the infrastructure
    • create a new srv, slave, with role web/mysql, and "take the two roles" from srv1. I imagine I should migrate every site/db and that's not a problem. Just don't really know how will I manage to have two vhosts on two different servers of the same ISPConfig infrastructure for the same domain/host.. can I?
    • migrate mail domains, mailboxes and emails still on master from srv1 to srv3
    • once srv1 is down to only dns and ISPConfig master roles, I would like to upgrade it to Ubuntu 16, or I'll have to substitute/recreate/migrate the master, and that scares me a lot!
    I was wondering if there are any best practices, or at least to have the community advice about how to perform the operations described without messing up ISPConfig. Please note that I already know how to handle such a migration on Linux with no ISPConfig-like software.

    Also, I 'd love if the Community could point my attention on any tools able to automate web/db/mail migration.
    Thanks a lot for your time,
    Marco
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I would say you are better of installing a new ISPConfig setup with the number of servers you need. Then use Migration Tool to migrate the data from old setup to new. This is easier that fudging about adding a server and moving services around.
    https://www.ispconfig.org/add-ons/
     
  3. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    I have no doubts that would be easier, that's why I'm looking for advice before taking any actions.

    BTW I don't like to "wipe and reinstall" unless it's strictly necessary. Also, please consider that your suggestion means either downtime (for ip migration between VMs) OR purchase new IPs and change dns records during services migration, and that's not desired. While the most important service is srv3 (mail) and with the operations I described it won't be impacted at all.

    srv3 has long time clean reputation on it's ip addresses and it's working like a charm, in production for 200+ business mailboxes. No way I'll reinstall it! :)

    That's why I respect your opinion but I still consider the operations described in the OP my best route to my goal.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no tool to help you in moving services from one server to another yet. so you will have to do that manually, e.g. by changing the server_id of the records that shall go to the new system, then use tools > resync to let ispconfig write the config on the new server and finally you will have to move over the actual web or mail data with e.g. rsync.
     
  5. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    I'm sorry because I lately realized that these might be all different threads!
    I'll synthesize my questions:
    • Once I have two web different web servers in my ISPConfig infrastructure, will I be able to configure the same apache vhost on both of them at the same time, then change the dns record when I have them both up and working? Will ISPConfig allow this?
    • Once the master is only running the dns role (and the mysql service instance, of course) is it possible to perform a release-upgrade 14 to 16? Will ISPConfig handle this, or it will cause issues? Any advice to workaround what might happen? Should also ISPConfig need upgrade, what to upgrade first, Ubuntu or ISPConfig? (keeping in mind the order slaves before master, of course)
    • How to delete an old failed server from my ISPConfig infrastructure (considering its services are already migrated succesfully)?
    The rest of the whole operation is quite clear in my mind.

    Forgive me again if this thread looks quite messed up :)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. The unique constraint contains the server_id, so you can not create the same domain on the same server, creating it on another one in the same multiserver setup is fine though.

    A release upgrade should work, actually, the smallest problem is ispconfig here, the more likely issue is that issues occur with Ubuntu packages. basically, all you have to do is to run an ispconfig update with reconfigure services = yes after you upgraded ubuntu, this will update the config files from ispconfig to match the new Ubuntu release.

    - Disable the ispconfig root cronjobs on that server.
    - Delete the server in ispconfig on the master.
    - If you want to clean up everything, then you might want to delete the ispcsrv* user of this server in mysql on the master with phpmyadmin.
     
  7. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    Following up cause I've fixed the first part, regarding failed DNS.

    Steps basically will be:
    1) install new server/VM (I used Ubuntu 18.04)
    2) add dns A record for new server/VM
    3) create reverse dns record at server/VM provider
    4) follow https://www.howtoforge.com/how-to-r...and-secondary-with-ispconfig-3-debian-squeeze (should really be updated for Ubuntu 18, anyway slave/dns steps still works, you'll get a warning on missing haveged and issues with php packages names)
    a) right packages for ubuntu 18 are php7.2-cli php7.2-mbstring php7.2-mysql mcrypt
    b) also install haveged as an optional bind9 dependency: apt install haveged
    5) go at the ISPConfig control panel and update your server's domain dns zone first, remove failed server ip address from NS record and update with the new server's one. (Mine is a .net domain so I also had to register the new NS at provider, before.)
    6) start updating each other domain's NS record substituting the failed server with the new one. The slave will start syncing each zone you update.
    7) Delete the failed server in ispconfig on the master.
    8) If you want to clean up everything, then you might want to delete the ispcsrv* user of this server in mysql on the master with phpmyadmin. (You will recognize it by hostname/ip).

    Last two by @till 's last reply.


    By the way an issue persistes, just updated records will be replicated on the slave, how may I fix this?
     
    Last edited: Apr 5, 2019
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Force resync of DNS records. It is in ISPConfig Panel tab Tools, Sync Tools, Resync.
     
  9. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    Something weird here..
    If I go to system / Server services, the new dns servar has Yes in the DNS column

    But if I go to Tools > Resync, in the DNS records section I only see master, there isn't the new dns. :(

    It hasn't been a problem for a while cause I didn't had to update any records.
    Now I got to update one and it became quite urgent.
     
    Last edited: May 7, 2019
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If yoy have two name servers, and the second is mirror of the first, you see only the first in that sync tool. This is enough, if you force sync to the first, the changes are mirrored to the second.
     
    mlnzigzag likes this.

Share This Page