Open rohte opened 3 years ago
@rohte GoCD provides multiple ways to configure your pipelines, Pipeline as Code is one approach wherein you can define you pipeline configurations in an external repository. This functionality is provided through Configuration Repository plugins in GoCD.
All the Configuration Repository Plugins are listed here. You will have to refer the plugin documentation for specific configurations.
I believe you are misunderstanding my request. How to run Pipelines as Code is well enough documented, but I want to know how to deploy GoCD itself with Infrastructure as Code. So for example, how can I deploy GoCD to a server in a repeatable way with a couple of plugins configured and some pipeline repositories configured as well. In other words: How can GoDC deploy itself fully configured without any manual intervention? As far as I understand, the Pipeline as Code documentation is pretty much:
I want to eliminate step 2 and 3 and replace it with terraform code (or Docker or Puppet or whatever infrastructure management tool you are using).
Yeah, I got your request wrong :(
Since there is no one recommended way of setting up GoCD, I don't think there is any documentation around it. However users do share their experiences through blogs or discuss in forums. I do see a blog post around running GoCD on Kubernetes using Terraform if it helps.
Yes, I saw that post before. It does not help in our case as we already have it running and now want to configure other plugins.
So, after poking around a bit it looks like (almost?) all configuration is saved in the cruise-config.xml
. A simple-ish (but probably with a lot of effort) thing that would help automation immensely is to add the format of that file to the documentation and whenever there an explanation on how to configure GoCD through the UI include how this can be achieved through changing the cruise-config.xml
.
We have worked around the missing documentation like this:
cruise-config.xml
has changed
Currently the only documentation about any kind of configuration uses the UI. I have not found any example where this was not the case.
Ideally I would wish for examples in terraform, but it would also be enough to know where the configuration is placed and what the format and schema of the file is. If this was treated a stable API, it would be even better.