Environnement Logiciel¶
Gestion des Systèmes¶
Info
Fondé par Michael DeHaan, le créateur de Cobbler et Ansible, le logiciel JetPorch implémenté en Rust, partage l'essentiel de ce qui en a fait des succès.
Documentation¶
Mise-à-disposition¶
Ajoutons notre dépendance au logiciel jetp.
Ré-activons notre environnement contextuel.
Cela va utiliser les logiciels packer et terraform depuis le cache de pkgx et mettre en cache le logiciel jetp nouvellement référencé.
~/projet-cloud/ $ dev on
✓ ~/.pkgx/jetporch.com/v0.0.1
env +packer.io +terraform.io^1.6 +jetporch.com
La commande jetp est maintenant disponible dans notre environnement.
~/projet-cloud/ $ jetp
┌─────┬─────────────────────────────────────────────┐
│jetp │http://www.jetporch.com/ │
│ │(C) Michael DeHaan + contributors, 2023 │
│ │ │
│build│6b3e059562bd81710085f954b78a4aa42d847670@main│
│ │Mon Oct 9 22:20:45 UTC 2023 │
├─────┼─────────────────────────────────────────────┤
│ │usage: jetp <MODE> [flags] │
└─────┴─────────────────────────────────────────────┘
┌──────────────────────────┬──────────────┬───────────────────────────────────────────────────────────────────────────────────┐
│Category │Mode │Description │
├──────────────────────────┼──────────────┼───────────────────────────────────────────────────────────────────────────────────┤
│utility: │ │ │
│ │show-inventory│displays inventory, specify --show-groups group1:group2 or --show-hosts host1:host2│
│ │ │ │
├──────────────────────────┼──────────────┼───────────────────────────────────────────────────────────────────────────────────┤
│local machine management: │ │ │
│ │check-local │looks for configuration differences on the local machine │
│ │ │ │
│ │local │manages only the local machine │
│ │ │ │
├──────────────────────────┼──────────────┼───────────────────────────────────────────────────────────────────────────────────┤
│remote machine management:│ │ │
│ │check-ssh │looks for configuration differences over SSH │
│ │ │ │
│ │ssh │manages multiple machines over SSH │
└──────────────────────────┴──────────────┴───────────────────────────────────────────────────────────────────────────────────┘
┌─────────────┬────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────┐
│Category │Flags │Description │
├─────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│Basics: │ │ │
│ │-p, --playbook path1:path2 │specifies automation content │
│ │ │ │
│ │-i, --inventory path1:path2 │(required for ssh only) specifies which systems to manage │
│ │ │ │
│ │-r, --roles path1:path2 │adds additional role search paths. Also uses $JET_ROLES_PATH │
│ │ │ │
├─────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│SSH options: │ │ │
│ │--ask-login-password │prompt for the login password on standard input │
│ │ │ │
│ │--batch-size N │fully configure this many hosts before moving to the next batch │
│ │ │ │
│ │--forward-agent │enables SSH agent forwarding but only on specific tasks (ex: git) │
│ │ │ │
│ │--limit-groups group1:group2│further limits scope for playbook runs │
│ │ │ │
│ │--limit-hosts host1 │further limits scope for playbook runs │
│ │ │ │
│ │--port N │use this default port instead of $JET_SSH_PORT or 22 │
│ │ │ │
│ │-t, --threads N │how many parallel threads to use. Alternatively set $JET_THREADS │
│ │ │ │
│ │-u, --user username │use this default username instead of $JET_SSH_USER or $USER │
│ │ │ │
├─────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│Misc options:│ │ │
│ │--allow-localhost-delegation│signs off on variable sourcing risks and enables localhost actions with delegate_to │
│ │ │ │
│ │-e, --extra-vars @filename │injects extra variables into the playbook runtime context from a YAML file, or quoted JSON│
│ │ │ │
│ │--sudo username │sudo to this user by default for all tasks │
│ │ │ │
│ │--tags tag1:tag2 │only run tasks or roles with one of these tags │
│ │ │ │
│ │-v -vv -vvv │ever increasing verbosity │
│ │ │ │
└─────────────┴────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────┘