· tor metrics journal ansible cloudformation org-mode

Continue as normal

I’m thinking to experiment with a loosely organised but perhaps more regular posting style. I’m going to post these under the tag “journal” because I think that will fit these quite well. We’ll see if I keep these up, or if this one ends up standing alone.

For many people right now is a time of uncertainty, anxiety, fear and loss. For me though today was pretty much a normal day. I work from home anyway so I’m doing what I do every week day. Today felt a little more normal than other days as I was attempting to work exlusively on a new laptop.

Before the whole coronavirus thing I was getting a little fed up with being tied to my desk and so I purchased a laptop for work that would allow me to sometimes work from the hackerspace or a coffee shop or whatever.

The laptop is a Mac and I’m usually working on Debian on my desktop, so there are changes to my workflows and I need to understand how the different tools work. I want to be sure that when we’re allowed to go outside again, I won’t immediately end up stuck and find that I have to go home again.

For a lot of this morning I was working on documentation. For this I’ve used org-mode and compared to writing Markdown in vim (as I’m doing now for this blog post) it’s a vastly superior way to produce lots of detailed technical text.

Some of the documentation is talking about how we use CloudFormation in Tor Metrics. Just after lunch I went to try some of these things out and found I didn’t have the AWS CLI installed. Installing it was fairly simple though and now it’s installed and I’ve got the access keys.

Shortly after this, I found that some of the files didn’t quite look right. I’d been working on them on my desktop and hadn’t pushed the new commits so I was looking at an old view. This one I would have had to have gone home for and I had to unplug the monitor, keyboard and mouse and stick them back in the desktop to push those changes, then straight back to the laptop.

Looking at our Ansible scripts, I was consolidating the “system” setup from a number of services into a single “metrics-common” role. We typically deploy our services on hosts that are managed by the Tor sysadmin team. They manage user accounts, system packages, backups and hardware monitoring so we can focus on the services. For development though we use AWS and we need to recreate the environment that they will give us, and that’s what “metrics-common” is for.

I learned about a new thing today, blocks. Blocks allow you to apply directives to a whole bunch of things at a time. Our “metrics-common” role needs to run as root, but then the rest of our stuff never runs as root because we assume we won’t have root access. Using a block we can do:

tasks:
- name: do the setup
  block:
  - name: step one
    ...
  - name: step two
    ...
  become: yes

The become: applies then to all of the tasks in the block without having to specify it every time.

Going back to the title, continue as normal, being on the laptop for the vast majority of the day meant I was disconnected from distractions like e-mail and IRC and so I completely missed all of the conversations going on about the state of the world.

It’s good to be informed and to understand the latest advice you need to follow, but also sometimes it’s good to just ignore everything and dig into some YAML-based domain-specific languages to orchestrate some systems.


If you would like to contact me with comments, please send me an email.
If you would like to support my free software work, you can support me on Patreon or donate via PayPal.


This post was syndicated on:

Articles from my friends' blogs

Yubikey GnuPG + SSH Agent with Fish

So I’ve had a lot of GPG issues over the last few months, and part of that has been me not bothering particularly to ensure I’ve got a consistent setup across my machines. Part of the issue is that I’m using a yubikey, and keep having to look at external r…

via Blogs on Foxk.it April 20, 2020

2AM

Fourty-five days ago, my livelihood vanished almost overnight. Let's talk about that.

via Alfie, online - blog April 16, 2020

Ansible x OpenBSD Web Deployment

I’ve recently switched most of my home and away infrastructure from Linux to various flavours of BSD. This blog post documents an attempt at deploying multiple static websites in the fastest way possible, on OpenBSD, with Ansible. It covers automating multi…

via Analog April 10, 2020

Generated by openring

Share Me