Usually I just let the UI do the initial setup and I tinker with it until I have something basic working. It’s just convenient that way. One could of course use APIs or fiddle directly with config.xml, but for all the boiler plate stuff, I personally find it more efficient to just let GOCD do its thing through the UI.
If it’s in version control, it’s still up to you to place the file in the config dir before starting the server. We aren’t doing that for our use case. While we keep backups on S3 in case we need to restore an old snapshot, for normal day to day, we just keep our configs on a persistent disk and that gets bindmounted to the config directories when the docker containers start/restart. So the config files and DB are persisted between deploys. We’re not using puppet or anything like that. Just docker and some simple bash scripts to control start/stop, and fetching of new app/plugin versions. Configuration happens by way of the bindmounts ensuring that the configs exist in the expected locations. Most of the incremental changes are done through the UI (whether that’s using the “actual” UI, or the copy-edit-paste method I described earlier. It’s not “sexy” like using the API or some other config tool, but it feels natural and works for us. Most of the time we’re just adding/updating a new elastic profile or a config repository (for pipelines as code), and it’s pretty straightforward to do in the UI. For pipeline configs, we usually use the pipelines as code feature and config that in source control. We mostly use the YAML and Groovy syntaxes for that. On Sat, May 8, 2021 at 10:36 PM HUSSEIN KADIRI <[email protected]> wrote: > So starting from a bare Installation, there's probably nothing in the DB. > How do you first populate the DB with config? Do you do the use config.xml > or API calls or UI? > > If the config is stored in version control how does GoCD pick up config > changes from version control? do you rely on a config management system > like puppet or helm to get the config from version control to the server? > > For subsequent incremental changes, what do you do? Update config file and > redeploy service? UI change? some other system. > > > > On Sat, May 8, 2021, 10:25 PM Marques Lee <[email protected]> > wrote: > >> Hmm, well you could always keep your cruise config in source control of >> course, just like you might do with any other service config. >> >> However, what we do internally for build.gocd.org is to utilize the >> backup feature of GoCD — it’s not just the server config that you’ll want >> to track, but also your data in the database that keeps track of pipeline >> history and such. The backup feature will save all of that for you to an >> archive. We persist them nightly to S3 IIRC. Our config folder and >> flyweight folders, etc are all bind-mounted into the container at >> provisioning. >> >> Is that the kind of info you're looking for? >> >> -Marques >> >> On Sat, May 8, 2021 at 10:07 PM HUSSEIN KADIRI <[email protected]> >> wrote: >> >>> Thanks Marques. >>> Curious what's the best/common/recommended practice on configs around >>> configuring from scratch and making incremental changes? >>> >>> >>> >>> On Fri, May 7, 2021, 5:40 PM Marques Lee <[email protected]> >>> wrote: >>> >>>> I think that has been talked about for a long time (actually, in the >>>> context of doing doing full server config as code) but hasn’t materialized >>>> unfortunately :(. Probably won’t happen for a long time until someone gets >>>> enough time on their hands (and maybe an external committer at that — >>>> that’s actually how we initially gained support for pipelines as config). >>>> >>>> So while I’d love to tell you “yes we’re working on it” the reality is >>>> nobody’s taken the time to truly explore it since XML does work and is >>>> doing “good enough.” 🤷🏻♂️ >>>> >>>> -Marques >>>> >>>> On Fri, May 7, 2021 at 5:36 PM HUSSEIN KADIRI <[email protected]> >>>> wrote: >>>> >>>>> Yeah XML is a bummer :( Any plans of replacing it with yaml :)? >>>>> >>>>> On Fri, May 7, 2021, 5:33 PM Marques Lee <[email protected]> >>>>> wrote: >>>>> >>>>>> What you can do is configure things in the UI and then copy the >>>>>> resulting XML file. >>>>>> >>>>>> We also document all of this configuration here: >>>>>> >>>>>> https://docs.gocd.org/current/configuration/configuration_reference.html >>>>>> >>>>>> On Fri, May 7, 2021 at 5:31 PM Marques Lee < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Oh I see, so server config. >>>>>>> >>>>>>> You can just create the cruise-config.xml file and provision that in >>>>>>> the server config dir. >>>>>>> >>>>>>> Yes, I know it’s XML (yuck) and not something nicer, but it works. >>>>>>> That’s where GoCD keeps its canonical configuration (the UI changes >>>>>>> result >>>>>>> in direct changes to this xml file) >>>>>>> >>>>>>> -Marques >>>>>>> >>>>>>> On Fri, May 7, 2021 at 5:27 PM HUSSEIN KADIRI <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> not referring to configuring pipelines. >>>>>>>> >>>>>>>> All the examples in the yaml plugin point to configure pipelines. >>>>>>>> >>>>>>>> I want to configure the GoCD server itself in preferably >>>>>>>> yaml.format. Like configuring the elastic agent profiles. Etc. Are >>>>>>>> there >>>>>>>> examples of those? >>>>>>>> . >>>>>>>> >>>>>>>> On Fri, May 7, 2021, 5:20 PM Marques Lee < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> Yes! We have several plugins to do pipelines as code. >>>>>>>>> >>>>>>>>> Officially, we support Groovy DSL, YAML, and JSON. >>>>>>>>> >>>>>>>>> The JSON and YAML plugins are built in, but groovy needs to be >>>>>>>>> downloaded and copied into the plugins dir. the Groovy plugin offers >>>>>>>>> the >>>>>>>>> most flexibility since you have a general purpose programming >>>>>>>>> language, but >>>>>>>>> YAML and JSON are still quite capable for most. >>>>>>>>> >>>>>>>>> Docs/Source code: >>>>>>>>> >>>>>>>>> YAML: >>>>>>>>> https://github.com/tomzo/gocd-yaml-config-plugin >>>>>>>>> >>>>>>>>> JSON: >>>>>>>>> https://github.com/tomzo/gocd-json-config-plugin >>>>>>>>> >>>>>>>>> >>>>>>>>> Groovy DSL: >>>>>>>>> https://github.com/gocd-contrib/gocd-groovy-dsl-config-plugin >>>>>>>>> >>>>>>>>> -Marques >>>>>>>>> On Fri, May 7, 2021 at 5:14 PM HUSSEIN KADIRI <[email protected]> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> https://docs.gocd.org/current/advanced_usage/pipelines_as_code.html >>>>>>>>>> talks about configuring pipeline configuration repo via the UI. >>>>>>>>>> >>>>>>>>>> Can the configuration be done programatically? >>>>>>>>>> >>>>>>>>>> Maybe by updating the helm chart or some API? >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>> Google Groups "go-cd" group. >>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>>> send an email to [email protected]. >>>>>>>>>> To view this discussion on the web visit >>>>>>>>>> https://groups.google.com/d/msgid/go-cd/4039487e-ccef-46b1-af80-cb8466b50600n%40googlegroups.com >>>>>>>>>> <https://groups.google.com/d/msgid/go-cd/4039487e-ccef-46b1-af80-cb8466b50600n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>>>> . >>>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>> You received this message because you are subscribed to a topic in >>>>>>>>> the Google Groups "go-cd" group. >>>>>>>>> To unsubscribe from this topic, visit >>>>>>>>> https://groups.google.com/d/topic/go-cd/kvs4Gd0BCKg/unsubscribe. >>>>>>>>> To unsubscribe from this group and all its topics, send an email >>>>>>>>> to [email protected]. >>>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/go-cd/CAPKX9jY1YmFsBMOHRK3nLx3Oj6VvfTw7R_eROPSQHYqtEgNBWA%40mail.gmail.com >>>>>>>>> <https://groups.google.com/d/msgid/go-cd/CAPKX9jY1YmFsBMOHRK3nLx3Oj6VvfTw7R_eROPSQHYqtEgNBWA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>>>> . >>>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "go-cd" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/go-cd/CAFD%2B7Dn%3Dz1%3D3s77EJHnTtP_C-11OCkqZGHFpn-ezY8M6-6-AfQ%40mail.gmail.com >>>>>>>> <https://groups.google.com/d/msgid/go-cd/CAFD%2B7Dn%3Dz1%3D3s77EJHnTtP_C-11OCkqZGHFpn-ezY8M6-6-AfQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> >>>>>>> -- >>>>>> You received this message because you are subscribed to a topic in >>>>>> the Google Groups "go-cd" group. >>>>>> To unsubscribe from this topic, visit >>>>>> https://groups.google.com/d/topic/go-cd/kvs4Gd0BCKg/unsubscribe. >>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>> [email protected]. >>>>>> >>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/go-cd/CAPKX9jYw20_mrN5Q6%2BogxpLcfqrKUACzYvZ79i2p02WkniheLA%40mail.gmail.com >>>>>> <https://groups.google.com/d/msgid/go-cd/CAPKX9jYw20_mrN5Q6%2BogxpLcfqrKUACzYvZ79i2p02WkniheLA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "go-cd" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/go-cd/CAFD%2B7D%3DJ6D75Dq_ZPkAfGDtUEciyxh-yqiQGs94BGZ0HqRSBew%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/go-cd/CAFD%2B7D%3DJ6D75Dq_ZPkAfGDtUEciyxh-yqiQGs94BGZ0HqRSBew%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "go-cd" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/go-cd/kvs4Gd0BCKg/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> >>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/go-cd/CAPKX9jZeeq%3Dh%3DR43Z9swp2JFQ%2BKhZRPBwYKm9tnQjPXyJP6fhA%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/go-cd/CAPKX9jZeeq%3Dh%3DR43Z9swp2JFQ%2BKhZRPBwYKm9tnQjPXyJP6fhA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "go-cd" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/go-cd/CAFD%2B7DnSo2FfkGDdA2Wt38unR9_JV9SWij7Pjn9aqcbcet-%3DHQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/go-cd/CAFD%2B7DnSo2FfkGDdA2Wt38unR9_JV9SWij7Pjn9aqcbcet-%3DHQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "go-cd" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/go-cd/kvs4Gd0BCKg/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/go-cd/CAPKX9jZAbCBV4W1Qjp_r4dOdM5c_rC0G75B8u9gHBppdXxzNFQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/go-cd/CAPKX9jZAbCBV4W1Qjp_r4dOdM5c_rC0G75B8u9gHBppdXxzNFQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/go-cd/CAFD%2B7Dn%3Di4LD_EFN9uX%3DiHvu5J%3D6zKksTyjFyxFG4%2BWUPKJOCw%40mail.gmail.com > <https://groups.google.com/d/msgid/go-cd/CAFD%2B7Dn%3Di4LD_EFN9uX%3DiHvu5J%3D6zKksTyjFyxFG4%2BWUPKJOCw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/CAPKX9jYxp%3DipeHS%3DhAFY7kJGpiss4no%3Dt6atvyBCr5mJSpgq8Q%40mail.gmail.com.
