As of yesterday OpenTTD is proud owner of a new server. To push some random stats to you:
Old Server:
- 16GB RAM
- 4 (virtual) cores
New Server:
- 32GB RAM
- 8 (virtual) cores
Now you say: so what? Well .. for a while now our old server was filled to the top. We couldn't really extend anymore in any sane way of form, and the CPU was hurting. So .. a few months back I send planetmaker out to find us something newer and better. And he came back with .. almost twice as good as the old \o/
The old server was kindly sponsored by OVH.de .. and the new one is too


So, yesterday I got the login details of the new server. Sadly, they haven't gotten to adding our extra IPs yet. This is a bit annoying, as we use XenServer. And XenServer uses the only public IP you get with the server as management interface IP. And you cannot use them inside a VM. So .. I have no public IPs to assign to the new server atm. I am sure they will fix this next week, but as I had a few days off this weekend, I kinda wanted to get started.
Spend the whole day figuring out how to do that .. finally found a nice way. The new server now "signs on" to the old server as they are connected to a (one-way) L2 switch. And at the old server I tell which IPs to route to the new server .. and this works flawless

The way OpenTTD webservices are setup, allows for this easily. You might not know, but OpenTTD runs around 15 small Virtual Machines, each with their own task. One machine runs mediawiki, the other FlySpray, the next the master server. Next to that, we have a VM for MySQL, one for LDAP, .. And finally, we have a Proxy VM for web. All your http calls go through this single VM. He on his turns decides which VM really knows how to handle the call, and forwards it. All this transparant and without you knowing. In front of everything is a single gateway machine. It protects us from all the evil people in the world. He has a strong firewall, and .. most improtant: it is the only VM that has the public IPs assign. The rest receive the signals via LVS, so they think they are directly connected to the internet .. but are not.
So what has all this to do with a new server? Everything. All internal VMs have internal IPs. So .. I can pick up 1 VM now, and move it to the new server. You won't notice, nor you will be the wiser. The only thing is that the signal bounces .. so there will be a bit more latency. This allowed me to still start the migration, without public IPs on the new server. Win

All that said and done .. I made this all work for IPv4. I did not bother with IPv6. In result, during this migration, slowly all IPv6 functionalities will be lost. When I move the last VM, the Gateway VM I talked about earlier, all IPv6 functionality will recover. Till that time .. I am really sorry. I might get bored, and fix it .. but .. not now

Seems I got bored enough, and I fixed up IPv6 too .. I hope

In the next few hours and days, I will slowly move over all the VMs we have. This is done by first making a snapshot, and moving that. This is 90% of the time. Next, I shutdown every service inside a VM, then rsync the remaining changes. Finally, I boot up the new VM, route the signals to it, and all functionality will be recovered. The downtime should be minimal (minutes, not hours).
I am not going to plan when I am going to migrate which service; you will simply notice (or not). I will update this thread from time to time where it stands.
There is one VM that has a disk allocated to him that is 600GB. That will be my biggest problem. Not sure yet how that will go .. but I will first move most of the others, than I will see how I can move him .. will take roughly 11 hours, its initial move. But hopefully the downtime will be in the minutes. This will be the biggest loss of service (SVN, dev-space, mail, frontpage, ottd_content, ..), so we will see how it turns out.
After moving of all the VMs, I will have to migrate the public IPs too. I have a smart idea for this, where both IPs will serve all services for a window of time, but we will see if this is possible (at all). Will update on that as I know more
If you have any questions (or suggestions), feel free to drop a reply here.