User Guide
Using orchent is made as easy as possible. In case you are lost orchent provides a lot of information with its 'help' command, just call orchent --help
.
Setting The Access Token
Orchent uses so called access token to authorize itself against the orchestrator.
In The newest release orchent supports the usage of the oidc-agent. By using the oidc-agent the need to copy and paste access tokens is history. Two things need to be done to use the oidc-agent with orcht. The first thing is to export the name of the oidc-agent account to use in the environmental variable 'ORCHENT_AGENT_ACCOUNT'. The account must be loaded into the agent before usage. The second thing is to ensure that the path to the socket of the oidc-agent is set within the variable 'OIDC_SOCK':
One can still set the access token directly in the environmental variable 'ORCHENT_TOKEN', this overrides the previous settings. ORCHENT_TOKEN
:
One can also export the url of the orchestrator via environment variable 'ORCHENT_URL':
It is also possible to specify the url at the command line, see below.
Now the orchent can perform any operation the access token grants, as long as the access token is valid.
Setting the trusted Certificate Authorities (CAs)
Usually this part is not needed as most systems come with a sane default setup.
Sometimes you either need or want to specify which CAs you trust anyway. You can explicitly tell orchent which file contains all the root CAs that can be trusted by using the ORCHENT_CAFILE
environment variable. The file must contain the certficates in the PEM format.
Configure Orchent
Orchent supports the ini configuration file format. The configuration file must be located at ~/.config/orchent/orchent.conf
.
Alias
Aliases are configured within the 'alias' section. Each line represents an alias and a uuid to use instead.
An example configuration is:
if such a file exists the alias can be used anywhere instead of the uuid. The following two commands are performing the same request at the orchestrator (given the config above):
Using Orchent
Please make sure you have exported your access token, see above.
Getting help
orchent provides a lot of help, the main help is shown by running orchent --help
. The output is:
the help commang gives even more detailed information on more advanced commands e.g. on 'depcreate':
Selecting The Orchestrator
All commands, except with the help command above, need the base url of the orchestrator to be set. This can be done by setting it in the 'ORCHESTRATOR_URL' environment variable (see above) or via the url flag. The flag can be set at any position of the command, yet we recommend setting it as the first parameter, if not using the environment variable:
The Orchent Commands
In this chapter all available commands will be explained. With two assumptions:
The access token is exported
The base url is exported
so instead of always adding the url flag like
only the command part will be shown like:
Testing the Orchent URL - test
orchent has a simple way to test if the url points to an orchestrator:
The outpt will let you know if the given url looks fine or not. This should be the first test to perform when having issues, as most of the time a simple typo is the cause of all evil.
List Deployments - depls
To list all deployments at an orchestrator the 'depls' command is used. Invoking is as simple as:
The output is a long list of all pages of deployments.
The output can be filtered to a specific user by adding the subject@issuer:
There is also a shortcut for the current user - 'me':
It is also possible to filter the deployments by data/time. The flags used are --before
and --after
, they can be used either alone or together as well as in combination with --created_by
. A date/time is specified as 'YYYYMMDDHHMM'. The correctness of the date or time is not checked.
Show A Specific Deployment - depshow
To show only a specific deployment orchent needs the uuid of the deployment.
Example:
Get The Template Of A Deployment - deptemplate
To get the template of a deployment the 'deptemplate' command is used:
Example:
Create A New Deployment - depcreate
The creation of a new deployment is done using the 'depcreate' command, it needs two parameter:
the name of the template file
a string containing the JSON object with parameter, best is to use
Example:
an example template would be the ambertools template
Update A Given Deployment - depupdate
Updating a deployment is like creating one with the difference that a uuid of an existing deployment needs to be passed:
Example:
Delete A Given Deployment - depdel
To delete a deployment only its uuid is needed:
Example:
Reset The State Of A Given Deployment - depreset
The command depreset
can be used to reset the deployment state given the deployment id. Usage tips: If a deployment remains stuck in DELETE_IN_PROGRESS, you can use this command to manually reset the state of the deployment to DELETE_FAILED. You can then try to delete the deployment again.
Example:
Get The Resources Of A Deployment - resls
Listing all the resources of a deployment is very similar to listing all deployments, only that a deployment uuid must be passed:
Example:
The result is a long list of resources for the given deployment
Show A Specific Resource Of A Deployment - resshow
To only display one specific resource of a given deployment 'resshow' needs the uuid of both of them, the deployment and the resource:
Example:
Last updated