How to use Vagrant or Packer in production environment?

Asked

Viewed 638 times

4

I’m starting to study Vagrant with the Chef and I’ve realized that it’s great for development environment, making life much easier when you’re well-configured, but it doesn’t set up a safe enough environment to be reproduced in production, At least I haven’t found ways to make it safe in production yet. What I want to know is if it is possible and what I must do to maintain 100% similarity between my development, testing and production environments and still enjoy the facilities of Vagrant and Chef?

  • I believe you have to configure the box to make it equal to production, hence the box vc configures as linux even, in the Vagrantfile file I do not know if you can put all config. But be more specific with what you want to do.

  • is that on my production server I use password in linux and mysql, and give the necessary permissions. In the case of the linux password I can exchange it for ssh. In Vagrant I could associate my ssh key? pq Vagrant creates a shared folder with the host and that is the security flaw that prevents the use in production. I am correct in stating this?

  • I was thinking here, what is the exact purpose of using Vagrant in production? You mount many servers a day?

  • no, are few, the Vagrant in production would serve for two things I believe. 1 - maintain the equality of the development server, tests and production and maintain the evolution of these servers always aligns. all this within reach of a Vagrant up

  • I couldn’t be satisfied with Vagrant for production. Today I use Vbox, the same image, deploy to the local server and production. I’ve been doing it for years and honestly, I wouldn’t change that for anything.

  • Vbox would be the virtual box? If I understand correctly you create a VM in the virtual box on your own hand and then use it in both dev and Prod?

Show 1 more comment

1 answer

1

Honestly, I think the use of Vagrant and more for homomlogation, taking into account the issue of security, organization (disk partitioning) of the so, hardering and the use of virtualization (Bare metal) as the virtualbox Provider. I as sysadmin, use more to generate a simulation of the production scenario, running via Vagrant 3-6 vms with different operating systems as it is in production, according to the project. Then I can change some question, whether in interconnection, or versions and so on, which I know will run in production, and to actually deploy in production, I use the Docker. Thus, in the only one approved by Vagrant, we use the Docker which isolates only the application ( the filet ) and play to the server in production without any compatibility problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.