I am new to chef and am currently getting my head around it. We are currently using chef solo in a windows environment. We have product releases every 3 months. Chef is used in our organisation to setup production build environments, developer machines etc. The setup of these environments involves installing a bunch of developer tools such as Visual Studio, 3rd party software etc. This list of tools/software required to setup the environment can keep on changing across releases. For example: If product release 1.0 requires Visual Studio 2015 to be setup, product release 2.0 might require Visual Studio 2015 Update 1 and so on.
The way we make use of chef is as follows:
-End user logs on to the server and launches a Powershell console with admin privileges.
-A Powershell script is executed. This script first installs chef solo on the client machine and copies all the chef scripts locally.
-The chef scripts are then executed to setup the developer build environment.
Here is my requirement: I did like to make use of chef to recreate the production build environment/developer build environment for a particular release.
A developer would like to create the build environment for Product release 1.0. The chef scripts should handle this requirement. If the developer should like to create the developer environment for product release 2.0, the chef scripts should handle this as well.
Is this possible using Chef? I assume this is possible since Chef scripts can be versioned. If so, what is the way to achieve this using Chef? Any help would be very much appreciated. Please guide me towards a best practice.
One way i was thinking is that, we could label the chef scripts for every product version in our source control(Perforce). This way, whenever we want to set up the developer environment for a particular product version, we pull the associated scripts for that product version by making use of the label and setup the environment.
However, this doesn’t seem like a good enough approach.
So, i am looking for help here.