Jetporch - Jet

Page content

Intro

did you ever heared of Jetporch, short Jet ? Don’t worry, you’re not the only one ;) Jet Project of Jet is being led by Michael DeHaan, the original creator of Ansible. So, expect something like Ansible, faster, written in rust … same same, but different.

Installation on Debian 12

grab a fresh machine and patch it

export DEBIAN_FRONTEND=noninteractive
apt-get clean
apt-get autoclean
apt-get update -y
apt-get upgrade -yq
apt-get dist-upgrade -yq
apt-get autoremove -y

Install Rust from Source

jet needs rustc 1.64. Debian install 1.63 from packages :(

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

… proceed with default …

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

update .bashrc

echo 'source "$HOME/.cargo/env"' >> ~/.bashrc
source "$HOME/.cargo/env"

clone jetporch

git clone https://github.com/jetporch/jetporch.git ~/jetporch

make tools & libraries

install dev libraries

apt-get install make gcc libssl-dev pkg-config

build

cd jetporch
make
root@jet:~/jetporch# make
cargo build --release # --target x86_64-unknown-linux-gnu
    Updating crates.io index
  Downloaded parking_lot v0.11.2
...
   Compiling handlebars v4.4.0
   Compiling inline_colorization v0.1.5
    Finished release [

export path

echo 'export PATH=$PATH:~/jetporch/target/release/' >> ~/.bashrc
export PATH=$PATH:~/jetporch/target/release/

check version

root@jet:~/jetporch# jetp --help

┌─────┬─────────────────────────────────────────────┐
│jetp │http://www.jetporch.com/                     │
│     │(C) Michael DeHaan + contributors, 2023│     │                                             │
│build│4e152bd9a90f58d2fda919e92f13e37ee30fe545@main│
│     │Sat Oct  7 09:29:39 AM CEST 2023├─────┼─────────────────────────────────────────────┤
│     │usage: jetp <MODE> [flags]└─────┴─────────────────────────────────────────────┘

get example

git clone https://github.com/jetporch/jetporch_examples.git

let it run

jetp local --playbook playbooks/facts.yml 
root@jet:~/jetporch_examples# jetp local --playbook playbooks/facts.yml 
----------------------------------------------------------
> playbook start: /root/jetporch_examples/playbooks/facts.yml
----------------------------------------------------------
> play: show facts
----------------------------------------------------------
> batch 1/1, 1 hosts
----------------------------------------------------------
> begin task: facts
… localhost => running
----------------------------------------------------------
> begin task: debug
… localhost => running
  ..... localhost : 
jet_os_type: Linux
jet_os_release_pretty_name: Debian GNU/Linux 12 (bookworm)
jet_os_release_name: Debian GNU/Linux
jet_os_release_version_id: '12'
jet_os_release_version: 12 (bookworm)
jet_os_release_version_codename: bookworm
jet_os_release_id: debian
jet_os_release_home_url: https://www.debian.org/
jet_os_release_support_url: https://www.debian.org/support
jet_os_release_bug_report_url: https://bugs.debian.org/
jet_os_flavor: Unknown
jet_os_arch: x86_64


----------------------------------------------------------
> play complete: show facts
----------------------------------------------------------

┌─────────┬─────┬─────┐
│Results  │Items│Hosts│
├─────────┼─────┼─────┤
│Roles    │0    │     │
│Tasks    │2    │1    │
├─────────┼─────┼─────┤
│Matched  │0    │0    │
│Created  │0    │0    │
│Modified │0    │0    │
│Removed  │0    │0    │
│Executed │0    │0    │
│Passive  │2    │1    │
│Skipped  │0    │0    │
├─────────┼─────┼─────┤
│Unchanged│2    │1    │
│Changed  │0    │0    │
│Failed   │0    │0    │
└─────────┴─────┴─────┘

(✓) Perfect. All hosts matched policy.

… and you’re ready for play !


Any Comments ?

sha256: b0287c3ea91115fbcc476be43d78ebd1e9fea07ec8aaed75fe5086ca895d67d9