Yet another one DevOps blog

Ops and DevOps stories

Aug 8, 2019 - 1 minute read - Comments - technical terraform devops

Terraform >= 0.12.6 map resources import


In terraform 0.12.6 developers added a nice feature - Multiple Resource Instances Defined By a Map

So now we can create multiple resources and then safely delete one in the middle of map (that was a bit of a pain with lists).

But how to import new map resources?

I’ll show on example of import with hypotetical DNS module for AWS Route53 record:

terraform import module.my_domain_com_dns.aws_route53_record.soa[\"@\"] DOMAINZONEID_mydomain.com_SOA

The most non-obvious part is escaping, so if you map key is @ you will need to escape it: \"@\"

Jun 14, 2019 - 1 minute read - Comments - announcement

Upgrade bash on mac os x


MacOS X has old 3.x bash. I found it’s very uncomfortable, as it doesn’t fit >4.x bash on most linux host. So you need to remember where do you want to run your scripts:

  • on linux with bash >4.x?
  • on mac os x with bash 3.x?

So - why not upgrade. I found comprehenisve article here: Upgrading Bash on macOS

And now:

$ bash --version
GNU bash, version 5.0.2(1)-release (x86_64-apple-darwin18.2.0)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Much better.

Jun 10, 2019 - 1 minute read - Comments - announcement

Reopen DevOps blog

About reopening

  • After years of laziness, I want to reopen My DevOps blog.
  • Hugo static site generator + autobuilds with Travis CI on push to github repository.
  • Also new domain -

Nov 21, 2014 - 2 minute read - Comments - technical chef knife devops

Chef shortcuts

Add a recipe to the end of run list on certain environment

Test run, not actually add a recipe:

knife exec -E 'nodes.transform ("chef_environment:beta") {|n| puts n.run_list << "recipe[logentries_ng]" }'

Add a recipe for real:

knife exec -E 'nodes.transform ("chef_environment:beta") {|n| puts n.run_list << "recipe[logentries_ng]"; }'

May 3, 2014 - 3 minute read - Comments - technical chef cookiecutter python template

Chef cookbook templating with cookiecutter

One of the challenges in chef cookbook development - create a comprehensive cookbook template.

Good cookbook template might:

  • standartize your cookbooks
  • fill them with convenient predefinitions
  • save your time.

If you are not python averse, you could find that cookiecutter pretty useful tool for creating your cookbooks templates. This article describes my experience in creating chef cookbook template with cookiecutter.

Apr 24, 2014 - 4 minute read - Comments - technical aws amazon chef devops ruby backup

Backup gem and Chef


  • There’s a nice tool for doing fast and easy backup to AWS S3: backup gem
  • There should be done a lot of steps for setup a backup though.
  • So it could be automated with chef.
  • In this article I’ll write log of creation backup gem’s cookbook.
  • Essentially this cookbook will install backup gem, that will backup /var/www folder to AWS S3 every day in 01:00. It will store last 14 backups.