Recently I started to read about building development environments with virtualization software (I am a beginner) and it seems that 'infrastructure as a code' is a really powerful concept.
I really like the workflow structure described here:
- The same base VirtualBox image is used around the team
- Vagrant is used to quickly 'build up' and 'provision' such an image to a needed configuration with the help of
- Chef (or Puppet) recipes which is the only piece of code needed to be put under version control.
However, I still do not quite understand how the code is transferred and deployed on Production servers.
As I understand, the common way of keeping DEV and PROD environments identical is to manage the Production server instance as just another virtual image to be provisioned with Chef. I can have exactly the same OS installed on the Production server as I (and the team) use daily with VirtualBox-Vagrant-Chef.
But the Production server can have hardware which differs from that in the virtual guest OS and this might lead to inconsistencies again.
So, here is the question:
What is the known and common best practice to transfer and deploy code to a Production server from a development environment which is managed with the VirtualBox-Vagrant-Chef toolchain? Does this practice allow any continuous deployment?
[Edit]: Note: Is there any practice of running the same VM instance provisioned with Chef/Vagrant on the Production server, like it is depicted on this diagram?