Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Documentation for Infrastructure as Code #538

Open
rohte opened this issue Feb 22, 2021 · 4 comments
Open

Add Documentation for Infrastructure as Code #538

rohte opened this issue Feb 22, 2021 · 4 comments

Comments

@rohte
Copy link

rohte commented Feb 22, 2021

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.

@maheshp
Copy link
Contributor

maheshp commented Feb 22, 2021

@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.

@rohte
Copy link
Author

rohte commented Feb 22, 2021

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:

  1. Install this plugin
  2. open the UI
  3. configure the target repository with the pipeline in these fields
  4. done

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).

@maheshp
Copy link
Contributor

maheshp commented Feb 22, 2021

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.

@rohte
Copy link
Author

rohte commented Feb 23, 2021

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:

  1. Follow instructions to configure in the UI (ideally in a local docker container)
  2. Find out how the cruise-config.xml has changed
  3. Put the changes in our deployment repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants