简体   繁体   中英

Ansible copy server image from one server to another

I am a bit new to DevOps/Ansible stuff. I have a aws server running nginx, mysql, PHP and nodejs. I have another newly created server on Scaleway.

Is it possible I copy all server config from first to the second, with nginx, mysql, php and nodejs? In other word copy server image from one to another.

If not possible, what are the possibilities? Any kind of help is highly appreciated.

As you might already know this is a broad question regarding server configuration, so I could give you bits and pieces for you to help with the possible solutions you can work with. But, it is just an option and perspective of the given problem. But there are lot of possibilities and answers around this problem.

So, for the server configuration you can use Ansible , Salt , Chef , Puppet or any other configuration tools.

They help you configure the server with the given parameters no matter who is the cloud provider, Ansible ssh the target machine and does the same thing what a human being does. Even if you run Ansible after building the scripts on the existing AWS EC2 Instance it doesn't change the configuration, it checks if the existing software exists if not install a new one and follow your steps.

One thing for sure is uniformity of your configuration across different cloud providers, in other words it is Cloud Agnostic only important thing to keep in mind here is having the same version of Operating Systems makes your VMs uniform.

And there are several options the way how can configure the server, there are also tool such as packer , which will help you to take an image of any existing VM and you can pretty much use that as the VM image for another cloud provided that cloud provider is supported, but if you do some research around the feasibility before diving deep into would be worth.

Hope this helps. But like I said there are several ways one can achieve this, there might be even better answers than this, like I said it is a broad question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM