Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
409 views
in Technique[技术] by (71.8m points)

virtualhost - Vagrant in production

I've been reading about Vagrant, and I find it quite useful for my development. I am currently managing a series of services (mail, web, LDAP, file sharing, etc.), and often one of these falls and needs a quick backup. Is it possible (and recommended) to use Vagrant for these purposes?

So far I've virtual machines installed like real machines.

I would also like to know about an alternative to Vagrant which would allow me to setup a simple configuration file and put a virtual machine, for example, with Zimbra, and quickly have an alternate mail server, enable RabbitMQ, etc.

question from:https://stackoverflow.com/questions/13390483/vagrant-in-production

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Vagrant should be used more like a staging environment to test your infrastructure changes. It should be your test bed for automated infrastructure changes.

The way we use it at my company is like so:

  1. Create VMs for our managed servers in Vagrant.
  2. Create puppet definitions for each server.
  3. Create cucumber tests for each server.
  4. Make infrastructure changes via puppet and add cucumber tests.
  5. Launch our servers to test for failures.
  6. Fix bugs, release and/or back to step 4.

Basically when we're happy with our changes, we'll pull our puppet changes into production to make it happen.

I'd not recommend using vagrant to manage VMs for real production. I'd use something else like razor, virsh, OpenStack or one of the many other vm management systems out there.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...