CI/CD configuration management for Windows application deployment

Hi Team,

I am new to Chef. We are migrating from deployment tool (Noilo) to chef. We are creating windows application deployment cookbook. I need some help to integrate our process with CI/CD. So for we did below.

  1. Created app_deploy cookbook with template files like below.

\templates{Testing}\web.config.erb
{UAT}\web.config.erb

I can’t use single template file because we add new lines in UAT environment. I will use #{chef_environment} in file path from recipe to load corresponding template based on environment.

  1. I have configuration wrapper cookbook which will have all configuration values and it will be used by app_deploy cookbook template.

  2. As we need ERB template has to be similar with web.config in source control, also we need to add placeholder (<%= node[‘ukghs_poc’][‘TWTTOKEN’] %>) in environment specific values. To make this ERB template as expected, we introduced another xml file which have keys to source of ERB template (where we need to add attribute).

But this process is little hard to maintain than current deployment process. Can anyone suggest better way of doing this?

Thanks,
Vinoth

Hi @Vinoth,

Try to use templates in a dynamic way based on attributes. For example here is a suggestion how an mssql installer ConfigurationFile.ini should be generated dynamically with a template and attributes:
https://github.com/chef-cookbooks/sql_server/issues/94

You could supply different attributes from the wrapper cookbook, recipes, or chef environments. This way you should only maintain one .erb file and the attributes would do the rest.