First Impressions of Jet

Michael DeHaan, the creator of Ansible, has released a new orchestration tool called Jet. It aims to improve upon some of the design issues that plague Ansible and to speed up orchestration. While Ansible is written in the interprited language Python, Jet is written in a compiled language, Rust.

I must say, the difference in speed is stunning. My initial tests all finished in a blink of the eye. Remove an app thru apt, install a list of apps, and run a shell command. It was so fast I thought it was broken.

The current drawback is that jet does not have support for all the same modules that Ansible has. Those are coming. They have a very interesting integration plan which has me excited for the future. Essentially, if you can build a script that outputs JSON, you have use that langaugage to author Jet modules.

Currently, you need to compile the software yourself as there are no built binaries. The makefile is simple enough to produce a binary though. The code is hosted over at SourceHut and follows a collaboration model similar to the Linux kernel.

If you are familiar with Ansible, you’d see a bunch of similarities in terminology and file layouts. All you really need is a groups file and a playbook to get started.

A group file

hosts:
  - web001.site.tld
  - web002.site.tld
  - db.site.tld

A simple playbook

- name: Setup Server
  groups: 
    - all
  ssh_user: user
  sudo: root

  defaults:
    server_packages:
      - fish
      - git
      - openssh-server
      - vim

  tasks:

    - !facts

    - !apt
      name: Remove vim for fun
      package: vim
      remove: true

    - !apt
      name: Installing server packages
      package: "{{ item }}"
      with:
        items: server_packages

    - !shell
      name: Checking to see who this runs as
      cmd: whoami
      and:
        retry: 10

So far, I’m really digging it. I my even try to pick up some Rust development if I get the time.