Y
Y
Yaroslav2020-02-05 13:23:05
Docker
Yaroslav, 2020-02-05 13:23:05

How to quickly migrate sites and reconfigure the web server (Cloud as a fail-safe server)?

Now there are several fairly expensive reliable branded physical. servers with a guarantee (if anything - the master arrives in a day and replaces the disk, for example), hundreds of sites are spinning on them. Most of the sites are quite typical, similar to each other. But, an important point - many sites (ecommerce) write data to the database (for example, they make sales). Most sites do not share IP addresses, not dedicated ones.

There is an idea - to somehow move to the cloud. There is already a somewhat unpleasant and instructive experience with AWS, that even a cloud server sometimes crashes, and just moving everything there and forgetting about the problems does not work. You still need to have a plan for relocation or recovery. I would like our sites to be somehow "packed" in some kind of "packages" or "containers"

Four problems arise when moving:
1. Change the IP in DNS (ok, I can do this with my scripts through dynamic dns)
2. Get LetsEncrypt certificates (ok, you can also do it when starting the container)
3. Reconfigure the web server on the host machine (to he knew there was a new site)??
4. Database, how to "carry" it.

Question 1
---
Alternatively, docker containers. You can quickly transfer the site to another server, run it there, but somehow you need to specify in Apache on the host machine that example.com should be proxyed to such and such a port. This can be done manually, but it must be done automatically, quickly and without the human factor. I'm hardly the first to face this issue. Is there some kind of webserver / module or gadget for docker, so that when we start the container, the webserver on the host machine starts sending http / https requests to it?

Question 2
---
What about the base? So far, the plan is for all servers to work not each with their own mariadb (as it is today), but with a common database server (db.example.com). We if that throw websites, but we do not touch the database server. Are there any alternative paths? (It's a bit embarrassing that the ping to the base will be much longer than on the localhost)

Question 3
---
Well, I'm really dreaming here: Our site is spinning on server A, this server dies in the middle of the night. Automatically, all sites are somehow launched on server B, and in the morning we only saw a letter about it somewhere in the UI or in the mail. Is there any ready-made solution for this dream?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Shumov, 2020-02-05
@inoise

What you want is a whole range of work and changes in your processes and tools. I recommend that you familiarize yourself initially with the Cloud Adoption Framework . Then look at Cloud Migration Best Practices .
All that you have listed will not allow you to give you any adequate recommendations on what you need to do an assessment of the current architecture, resources, collect requirements for a new system and already look at which Cloud, why, for what, do you need to do Hybrid Cloud, and so on

S
Sanes, 2020-02-05
@Sanes

This is a big job that requires those. tasks and long discussions.
Make sure nothing falls. Set up the server in a human way.

�
âš¡ Kotobotov âš¡, 2020-02-05
@angrySCV

usually use a cloud database + virtual machines in different regions, and a request balancer for the service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question