Has anyone used Chef Automate to manage infrastructure deployments as a CI Pipeline?
Something along the lines of what this person is doing with Jenkins:
Using Pipelines to Manage Environments with Infrastructure as Code
Or more minimally, spinning up new infrastructure for the the later stages like rehersal? Possibly using Terraform in the delivery cookbook?
Sure have. You can do anything in a Chef Automate Workflow phase that you like.
I tend to use this pattern more in bootstrapping Chef Automate infrastructure itself (to allow self-service creation of new Chef Automate build clusters for my customers) or when I want to emulate something like a Kubernetes Pod with Chef.
It’s a great pattern to use for any self-service infrastructure - for example, you may want to use it if you want to allow creation of self-service workflow infrastructure or even say something like an on-premise IAAS that works like Digital Ocean. I would nearly always use a pipeline to back the creation of all the infrastructure behind the scenes
P.S. The main advantage to this pattern is that you can trigger deploys automatically based on source code changes to infrastructure code - which can help promote infrastructure devs not being tempted to touch the machines directly And if your organization is set up so everything comes from source, a great approach.
@Robert_J_Berger1: That is the fundamental win of the Workflow component of Automate. My talk at ChefConf explains a bit about how I think about it using chef-provisioning, but you could just as well use teraform.
Actually, I would be interested in using Chef Provisioning (I used it for building a pretty sophisticated cluster at my last company) but keep being told it is not recommended for new projects anymore.
Would love to see some examples, particularly for Terraform for AWS
Chef Provisioning is in maintenance mode and no new features are on the current roadmap to be developed by Chef: https://blog.chef.io/2016/12/16/policyfiles-push-jobs-and-provisioning-clarity-on-the-current-state/
Chef means what they say about providing support and bug fixes, though. They helped us with some Chef Provisioning issues quite recently even.
That being said, in the past I made heavy use of Chef Provisioning, but following Habitat’s lead, I’ve been converting to Terraform wherever possible.
It left me with a conundrum because I still need something equivalent to Chef Provisioning for SSH and Vagrant, both of which have no good Terraform plugin equivalents. While it might be Chef heresy to say this, Ansible makes a fine replacement for SSH provisioning Now I use it all the time to bootstrap Chef via SSH or Vagrant
FYI: Specifically where Chef Provisioning for SSH falls short is in support for macOS. (Try it out, you’ll discover it doesn’t work - it needs some changes to handle BSD-flavour stat commands and deal with PATH issues around chef-client). AFAIK, Chef considers macOS support to be a new feature sigh