Tag: DevOps

  • How to extend and reuse configs in Gitlab CI

    โ€”

    by

    in

    When I began using Gitlab CI the first thing I wanted to know was how to reuse configs. I know that we’ll have changing requirements at work and that we’ll have hundreds of repositories using basically-the-same configurations so I wanted to make sure we’d have a central place to make changes to these. I found…

  • TIL: Replace git URLs in Gitlab CI

    โ€”

    by

    in , ,

    When working with Gitlab as a storage for Terraform or Ansible modules you probably access them using SSH, like git@gitlab.instance:group/project.git. This has the advantage that authentication is done using SSH keys and everybody on your team can access the repositories just like they’d do when cloning on the terminal – no need for entering passwords during…

  • Proxy websocket connections with Apache2

    โ€”

    by

    in ,

    How to configure Apache2 to pass through web socket connections Recently I had to adjust an Apache Virtual Host to allow proxying of Web Socket requests to a service running on localhost which would also accept HTTP requests on the same port. The problem The service in question was Loki, the “Prometheus, but for logs” from Grafana. At Synoa we’ve…

  • Validating variables in terraform

    โ€”

    by

    in

    Finally, terraform can validate input variables! With the 0.13 release terraform introduces input validation, and with the 1.0.0 releases it was stabilized! Before there was no way of validating variables other than checking their length or doing basic checks inside the code, for example in the locals.tf file, and errors with variables mostly came to light during…

  • First steps with Traefik 2

    โ€”

    by

    in

    A tale of Auto SSL, Basic Auth, and lots of debugging Recently I’ve spent some time at work trying out Traefik 2 and learning about the new concepts like routers and middleware since we’ll use Traefik 2 as part of some new infrastructure. We’ve used Traefik 1 in production at Synoa for the past 3 years. Initially…

  • TIL: Dots in /etc/sudoers.d filenames

    โ€”

    by

    in ,

    A tale of facepalms While reviewing some Ansible modules with a colleague we stumbled upon an issue with our user creation module, and for a briefe time couldn’t understand what was going on. The module in question creates multiple Linux users, adds them to groups, and enables some to use password less sudo via the /etc/sudoers.d config…

  • Wildcards in Prometheus queries

    โ€”

    by

    in ,

    Learn how to query data in Prometheus and how to use wildcards Hello and welcome to this “snippet-sized” post about Prometheus queries! Prometheus is a time-series database which means it is build to collect a lot of datasets that show values over time, for example the result of a HTTP request or the RAM usage of a…

  • Apply a patch from a Github PR

    โ€”

    by

    in ,

    Ever found yourself needing that one fix from a PR on GitHub that hasn’t been released yet? How can you get the code, for example a Magento fix, into your code base? Copy-paste it? That might work for small changes, but for large and complex changes copy-pasting is no solution. Luckily, we can use GitHub…