Good bye Red Hat

Over 6 years ago I joined Red Hat. For me it was a huge step – going from a small SI to a large software vendor, moving to a dedicated pre-sales role (“Solution Architect”) in a larger team, and so on.

And I learned a lot. Like, A LOT. About how such a large enterprise is run, how a huge software vendor operates, but with the changing landscape in customers also how customers of certain sizes and in certain industries work. At the same time I learned a lot about how the sales process of a software vendor works, what a role a pre-sales engineer can take (and what not), and how good sales teams work. I was not without success in that role.

After my few years as a solution architect I had the chance to join the Ansible product team. This meant another big change since I suddenly stopped talking to customers on a daily base, but instead talked to the larger sales organization within Red Hat. Also, moving from a German team to a mainly US team meant a lot of changes in how my daily schedules were set up – but that worked well with the kids who arrived at the same time. The new job brought had a lot of new components for me as well: Technical Marketing Manager means to shape the product message into consumable bites for people with a technical taste. Suddenly I had to wonder how I can enable other solution architects to present this to a technical savy audience – especially if these solution architects are not product experts and do have to sell multiple products anyway. I had a steep learning curve, but again the feedback was not bad, and the constantly growing team was just awesome.

But nothing is forever: over the recent months I realized that I have growth aspirations which simply don’t fit with my position anymore. Thus I had to make the hard decision to look for something else – and I found this something else outside Red Hat. My future is still within the Open Source ecosystem, deeply connected to Linux – no surprises there. But more about that in another post.

Right now I’d just like to thank Red Hat for an awesome time. And I especially would like to thank the various teams I worked in over the time with all the people in there:

  • The public sector Germany team, with the simply best sales person I ever met and the best middleware solution architect I worked with.
  • The “Ansible workshop” crew with the greatest mind in writing workshops at the top. We rocked so many conferences and summits.
  • The Ansible product team when I joined – being right there when a just acquired company settles into the arms of a new owner is a very interesting experience, thanks for all the support!
  • The BTE which formed later on – I never worked in a team like that, but I loved almost every day. It was great to grow and thrive in this team, through all transitions and re-organisations.

Without you, I wouldn’t be the person I am today – thanks for that, thanks for all the support! All the best for the future =)

[Short Tip] Output/redirect content to a file in Nushell

And another short tip about Nushell – I promise that those will be less frequent the more I get used to it.

My current problem was: how do I redirect content to a file like echo hello > foo.txt and echo world >> foo.txt? The typical approach didn’t work:

❯ echo "hello" > foo.txt
───┬─────────
 0 │ hello   
 1 │ >       
 2 │ foo.txt 
───┴─────────

Yeah, certainly not what I had in mind. Instead, I had to rethink the approach here. What is what we want to do here? First we output content and need to save it to a file. The connection is a pipe, as usual in Nushell:

❯ echo hello | save foo.txt
❯ open foo.txt
hello

That worked! Second, we want to append something. So we need to open the file, append something, and save it again. In between all steps we need pipes – Nushell, after all:

❯ open foo.txt | append "world"| save --raw foo.txt
❯ open foo.txt
hello
world

Note that save needs the --raw flag here: it tries to be smart to guess in what format we want to save it, and for some reason in my case it didn’t save the new lines without the flag.

And that’s it. It is not as short as I would like it to be compared to Bash and others. On the other hand it is way more flexible (it can also handle structured data this way like json) and it is not like I use redirection all the time.

[Short Tip] Executing a subshell in Nushell

I just run through a howto where I was asked to execute a command which used the command output from a subshell as an argument for another command. Copy&paste of such typical command examples don’t work with nushell:

❯ sudo usermod --append --groups libvirt $(whoami)
error: Variable not in scope
  ┌─ shell:9:40
  │
9 │ sudo usermod --append --groups libvirt $(whoami)
  │                                        ^^^^^^^^^ unknown variable: $(whoami)

The right way to do that in nushell is only slightly different – using subexpressions:

❯ sudo usermod --append --groups libvirt (whoami)

[Short Tip] Get data type in Nushell

Nushell supports multiple data types. If you get lost what exact data type you are working with just right now, the describe command can help:

❯ echo 1 | describe
integer

❯ echo "1" | describe
string

Unfortunately right now it does not support structured data types like “list” or “table”. Hopefully that will be added in the future:

❯ echo [a b c] | describe
───┬─────────────────────
 0 │ string 
 1 │ string 
 2 │ string 
───┴─────────────────────

Image by BRRT from Pixabay

[Short Tip] Doing for-loops in Nushell

Nushell 0.32 added support for typical for loops:

With the new for..in command, you can write more natural iterating loops:

Nushell 0.32 release notes
> for $x in 1..3 { echo ($x + 10) }
───┬────
 0 │ 11 
 1 │ 12 
 2 │ 13 
───┴────

Compared to what we have in Bash and others (and given my limited understanding) the most notable difference is that there is no “do”, but instead a curly bracket defining what should be done.

Also, remember that Nushell has an understanding of various data types, so the iterator in the example above is indeed of type “int”. Just stitching it together with another string doesn’t work:

❯ for $i in 1..3 {echo ("/home/" + $i) }
error: Coercion error
   ┌─ shell:31:23
   │
31 │ for $i in 1..3 {echo ("/home/" + $i) }
   │                       ^^^^^^^^   -- integer
   │                       │           
   │                       string

Instead, make sure to echo the iterator:

❯ for $i in 1..3 {echo $"/home/(echo $i)" }
───┬─────────
 0 │ /home/1 
 1 │ /home/2 
 2 │ /home/3 
───┴─────────

For comparison, if you have a set of strings you can provide them in a table and stitch them together easily:

❯ for $i in [a b c d] {echo ("/home/" + $i) }
───┬─────────
 0 │ /home/a 
 1 │ /home/b 
 2 │ /home/c 
 3 │ /home/d 
───┴─────────