1
webketje
270d

Say you have some CMS webapp/site and you want to automate versioning of templates/ theming so you can do reliable rollbacks & more, and have the changes you make deployed to the webapp/site without further intervention.

How would you do it, in rough lines, from source change to auto-deploy?

I am wondering whether this is a good devops question and am curious about actual answers

Comments
  • 3
    what works in a lot of cases, that i have experienced so far, is to containerize the applications, and put them on some image repository, whenever the code repo is getting updates on specific branches.
    The same automation could also then deploy these containers (docker containers for example) onto the target hardware and run it.

    so basically lint + test, build, package & deploy on registry, deploy to hardware & run. That works for dedicated/ on-prem hardware and for cloud infrastructure, and it can be also mass rolled out on multiple targets at once, because the applications are just containers.
  • 0
    I work on network appliances these days, and many of them use git for versioning of configuration.

    You write in configuration live, then save it with a write command and a log message. Then you can roll back to any revision, and backing up is as simple as a push to origin behind the scenes
  • 1
    I've yet to see a CMS where that would be possible / practical. Basically with CMS you have a number of things that need to be versioned separately:

    - Core CMS; that's probably the easiest part, since it already comes with versioning. Just put the selected version in the deploy file and add it to your git repository.

    - Add-ons; those also come with their own versioning, so you can create a lockfile to store the exact version of each add-on you use, and keep that file under git (along with any custom add-on code and config files).

    - Configuration; here's where things become problematic. CMSs usually store most of their configuration in the database along with any user-generated content. Since configuration usually depends on what version of CMS and add-ons you're using, this pretty much prevents you from doing any kind of automatic rollbacks; you need to manually cherry-pick the relevant data from the DB so it can be restored on rollback (assuming users won't change it through CMS.
Add Comment