my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
9.1 KiB

3 years ago
  1. # juju plugin
  2. This plugin provides useful aliases and functions for [juju](https://juju.is/) (for TAB completion,
  3. refer to the [official repo](https://github.com/juju/juju/blob/develop/etc/bash_completion.d/juju)).
  4. To use this plugin, add `juju` to the plugins array in your zshrc file.
  5. ```zsh
  6. plugins=(... juju)
  7. ```
  8. ## Aliases
  9. Naming convention:
  10. - `!` suffix: `--force --no-wait -y`.
  11. - `ds` suffix: `--destroy-storage`.
  12. ### General
  13. | Alias | Command | Description |
  14. |--------|---------------------------------------------|--------------------------------------------------------|
  15. | `jdl` | `juju debug-log --ms` | Display log, with millisecond resolution |
  16. | `jdlr` | `juju debug-log --ms --replay` | Replay entire log |
  17. | `jh` | `juju help` | Show help on a command or other topic |
  18. | `jssl` | `juju juju show-status-log` | Output past statuses for the specified entity |
  19. | `jstj` | `juju status --format=json` | Show status in json format (more detailed) |
  20. | `jst` | `juju status --relations --storage --color` | Show status, including relations and storage, in color |
  21. ### Bootstrap
  22. | Alias | Command | Description |
  23. |-------|---------------------------|-------------------------------------------|
  24. | `jb` | `juju bootstrap` | Initializing a Juju cloud environment |
  25. | `jbm` | `juju bootstrap microk8s` | Initializing a MicroK8s cloud environment |
  26. ### Controller
  27. | Alias | Command | Description |
  28. |----------|---------------------------------------------------------------------------------------|-------------------------------------------------------------------|
  29. | `jdc` | `juju destroy-controller --destroy-all-models` | Destroy a controller |
  30. | `jdc!` | `juju destroy-controller --destroy-all-models --force --no-wait -y` | Destroy a controller |
  31. | `jdcds` | `juju destroy-controller --destroy-all-models --destroy-storage` | Destroy a controller and associated storage |
  32. | `jdcds!` | `juju destroy-controller --destroy-all-models --destroy-storage --force --no-wait -y` | Destroy a controller and associated storage |
  33. | `jkc` | `juju kill-controller -y -t 0` | Forcibly terminate all associated resources for a Juju controller |
  34. | `jsw` | `juju switch` | Select or identify the current controller and model |
  35. ### Model
  36. | Alias | Command | Description |
  37. |----------|-------------------------------------------------------------|-------------------------------------------------------|
  38. | `jam` | `juju add-model` | Add a hosted model |
  39. | `jdm` | `juju destroy-model` | Non-recoverable, complete removal of a model |
  40. | `jdm!` | `juju destroy-model --force --no-wait -y` | Non-recoverable, complete removal of a model |
  41. | `jdmds` | `juju destroy-model --destroy-storage` | Non-recoverable, complete removal of a model |
  42. | `jdmds!` | `juju destroy-model --destroy-storage --force --no-wait -y` | Non-recoverable, complete removal of a model |
  43. | `jmc` | `juju model-config` | Display or set configuration values on a model |
  44. | `jm` | `juju models` | List models a user can access on a controller |
  45. | `jshm` | `juju show-model` | Show information about the current or specified model |
  46. | `jsw` | `juju switch` | Select or identify the current controller and model |
  47. ### Application / unit
  48. | Alias | Command | Description |
  49. |----------|---------------------------------------------------------------|---------------------------------------------------------------------------|
  50. | `jc` | `juju config` | Get, set, or reset configuration for a deployed application |
  51. | `jde` | `juju deploy --channel=edge` | Deploy a new application or bundle from the edge channel |
  52. | `jd` | `juju deploy` | Deploy a new application or bundle |
  53. | `jra` | `juju run-action` | Queue an action for execution |
  54. | `jraw` | `juju run-action --wait` | Queue an action for execution and wait for results, with optional timeout |
  55. | `jrm` | `juju remove-application` | Remove application |
  56. | `jrm!` | `juju remove-application --force --no-wait` | Remove application forcefully |
  57. | `jrmds` | `juju remove-application --destroy-storage` | Remove application and destroy attached storage |
  58. | `jrmds!` | `juju remove-application --destroy-storage --force --no-wait` | Remove application forcefully, destroying attached storage |
  59. | `jrp` | `juju refresh --path` | Upgrade charm from local charm file |
  60. | `jsa` | `juju scale-application` | Set the desired number of application units |
  61. | `jsh` | `juju ssh` | Initiate an SSH session or execute a command on a Juju target |
  62. | `jshc` | `juju ssh --container` | Initiate an SSH session or execute a command on a given container |
  63. | `jsu` | `juju show-unit` | Displays information about a unit |
  64. ### Storage
  65. | Alias | Command | Description |
  66. |---------|-------------------------------|-------------------------------------------------|
  67. | `jrs` | `juju remove-storage` | Remove storage |
  68. | `jrs!` | `juju remove-storage --force` | Remove storage even if it is currently attached |
  69. ### Relation
  70. | Alias | Command | Description |
  71. |-----------|--------------------------------|-------------------------------------------------------------------|
  72. | `jrel` | `juju relate` | Relate two applications |
  73. | `jrmrel` | `juju remove-relation` | Remove an existing relation between two applications. |
  74. | `jrmrel!` | `juju remove-relation --force` | Remove an existing relation between two applications, forcefully. |
  75. ### Cross-model relation (CMR)
  76. | Alias | Command | Description |
  77. |----------|--------------------|----------------------------------------------------------------|
  78. | `jex` | `juju expose` | Make an application publicly available over the network |
  79. | `jof` | `juju offer` | Offer application endpoints for use in other models |
  80. | `jcon` | `juju consume` | Add a remote offer to the model |
  81. | `jrmsas` | `juju remove-saas` | Remove consumed applications (SAAS) from the model |
  82. | `junex` | `juju unexpose` | Remove public availability over the network for an application |
  83. ### Bundle
  84. | Alias | Command | Description |
  85. |-------|----------------------|-------------------------------------------------------------|
  86. | `jeb` | `juju export-bundle` | Export the current model configuration as a reusable bundle |
  87. ## Functions
  88. - `jaddr <app_name> [unit_num]`: display app or unit IP address.
  89. - `jreld <relation_name> <app_name> <unit_num>`: display app and unit relation data.
  90. - `wjst [interval_secs] [args_for_watch]`: watch juju status, with optional interval
  91. (default: 5s); you may pass additional arguments to `watch`.