-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Follow the steps below to quickly get up and running with a local copy of your Iru Custom Resources.
- Create a new local repository:
iructl new my-repo - Change directories:
cd my-repo - Set your credentials:
export IRUCTL_TENANT=<YOUR_API_URL_HERE>export IRUCTL_TOKEN=<YOUR_API_TOKEN_HERE>
- Download your custom profiles from Iru:
iructl profile pull --all - Download your custom scripts from Iru:
iructl script pull --all - Download your custom apps from Iru:
iructl app pull --all
Note
Replace <YOUR_API_URL_HERE> and <YOUR_API_TOKEN_HERE> with your API URL and token. See the authentication section
below for more details.
Tip
iructl app pull --all downloads app metadata only. Add --download to also fetch each app's installer into the
payload directory.
Each command and subcommand has its own help screen, which can be accessed by appending --help. For example,
iructl --help will display usage information, available options, a list of root-level commands, and a short description
of each command (see below). Help screens for each subcommand can be accessed in the same way (e.g., iructl new --help).
Usage: iructl [OPTIONS] COMMAND [ARGS]...
Iru Control - a utility for local management of Iru resources.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --preview Enable experimental preview features. [env var: IRUCTL_PREVIEW] │
│ --version Show the version. │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Logging ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --log TEXT Path to the log file. (use '-' for stdout) │
│ --debug Enable debug logging. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ profile Interact with Iru Custom Profiles │
│ script Interact with Iru Custom Scripts │
│ app Interact with Iru Custom Apps │
│ new Create a new repository │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Before doing anything else, you'll need to create a local repository. An iructl repository can be created in any directory
using iructl new. Under the hood, an iructl repository is just a git repository with a .iructl file at its root, but using
the command will include a handy README.md to get you started.
❯ iructl new iructl-repo
Created a new iructl repository at iructl-repo
Check out the included README.md file for more information on getting started.
With no configuration, you will be prompted for an Iru tenant API URL and a token when running a command that requires it.
$ iructl profile sync --all
Enter Iru Tenant URL: https://mysubdomain.api.iru.com
Enter API Token: ************
However, it's generally a better idea to store the credentials in environment variables. This removes the need to enter
credentials for every command. The following environment variables are automatically checked by iructl before prompting
the user.
-
IRUCTL_TENANT: ThehttpsAPI URL of your Iru tenant (e.g., https://mysubdomain.api.iru.com). -
IRUCTL_TOKEN: The API token with permissions to your Iru tenant. See Token Permissions for the exact permissionsiructlrequires, and Generate an API Token for how to create one.
Tip
These values can be added to your shell's startup file to be exported automatically.
Example ~/.profile, ~/.zshrc, or ~/.bashrc
export IRUCTL_TENANT="https://mysubdomain.api.iru.com"
export IRUCTL_TOKEN="not-a-real-token"Getting Started
Working with Resources
- Populating Your Local Repository
- Editing Resources
- Self Service
- Pushing and Syncing
- Listing and Showing Resources
- Deleting Resources
- Blueprint Assignment
Reference
Python API Client