The optimizer options can be customized at the study level only. Since a study is an Akamas resource this can be done by using the update command described on the Resource management commands page.
This page provides a quick reference for the update commands that can be used to dynamically change the options that drive how the Akamas optimizer works for live optimization studies.
The following command can be used to update the online mode of live optimization studies:
The following command can be used to update the safety mode of live optimization studies:
The following command can be used to update the workload strategy of live optimization studies:
The following command can be used to update the safety factor of live optimization studies:
The following command can be used to update the exploration factor of live optimization studies:
This page describes all commands that allow Akamas resources to be managed with their options (see also common options available for all commands).
Command | Description |
---|---|
The following table describes the common options available for all commands:
Option | Short option | Type | Description |
---|---|---|---|
The Akamas CLI allows using a set of alias or shortcuts for many resources.
Any resource can be specified using either the singular or plural form. Furthermore, the shortcuts listed below are available:
You can print the list of available aliases with the following command
This command builds the Akamas resource described in the provided YAML file.
Create the Akamas resource described in the provided YAML file.
Delete an Akamas resource, identified by UUID or name.
with the following options:
List the resources for the selected type with their id, name, and description. Additional resource-specific fields can be shown.
with the following options:
Describe an Akamas resource with all its fields.
with the following options:
Notice that this command does not support the resource type System.
Update an Akamas resource, identified by UUID or name.
with the following options:
Install a License or an Optimization Pack
with the following options:
Uninstall a License or an Optimization Pack
with the following options:
Start the execution of a Study.
Stop the execution of a Study. Once stopped, the execution cannot be resumed.
To export a study, the study name or the study UUID can be used from the command line.
An optional filename can be specified, with a relative or absolute path:
The exported information will be saved in tar.gz format.
The following entities are exported:
The Study
The Steps of the Study
The Experiments of the Study
The Trials of the Study
The Workflow to which the Study refers
The Timeseries collected during the study run
The System to which the Study refers
The Component related to the Study's System
The ComponentType of each Component
The Metrics definitions of each ComponentTypes
The Parameters definitions of each ComponentTypes
Notice: this operation can require a long time, depending on the quantity of data to be collected. During this time the CLI will wait for Akamas to send the exported package. Do not interrupt the CLI during this phase, as otherwise, the process will need to be restarted from the beginning.
Notice: please make sure that you have installed the latest versions of the optimization packs before starting the import: this way, the import procedure will bind the studies to the latest optimization packs version (i.e. the installed ones) instead of importing the (possibly) old ones from the source system.
Use the following command to import a study into an existing Akamas instance:
Where FILENAME refers to the file of a previously exported study.
When imported, the following entities will have a new UUID:
Study
Workflow
System
Component
ComponentType
Metrics
Parameters
In case a resource that is being imported has the same name as an existing one, the existing entity will not be deleted. The existing entity (with its UUID) will be used instead of the imported one.
All steps, experiments, and trials will maintain the same id and, therefore, the same execution order as the original exported study.
Notice: this operation can require a long time. If the CLI shows a timeout error or if the operation is interrupted, the import will continue on the Akamas server.
Except for the administration commands, all Akamas commands representing Akamas operation require authentication.
Command | Description |
---|---|
Login credentials can be passed as an argument to Akamas CLI:
If the user, password, or organization are not specified as parameters, they will be asked via a prompt. Beware that passing the password as an argument makes it visible in the command line history. Therefore it should always be typed by the CLI secure prompt.
If the workspace is specified and the user has access to it, it will be set as the default workspace for the session.
If the login is successful, a message like the following will be printed: <username> logged in. Welcome."
If the login fails because the credentials are wrong or the user is not authorized to access, the error message "Login failed: Invalid user credentials" will be printed.
The fill reference for the Akamas login command is.
If one of the environmental variables is specified, the corresponding parameter will not be asked to the user. Workspace and Organization are not needed for login, they will not be asked even if not specified.
Option | Short | Description | Environment Variable | Required |
---|---|---|---|---|
When logged in, this command will log out the current user
On success the message "Logout successful." will be printed.
This page describes all commands that allow users and workspaces to be managed with their options (see also common options available for all commands).
Command | Description |
---|---|
Notice: an Akamas workspace (user) is an Akamas resource (see list of Akamas resources) so you can also refer to resource management commands.
The create workspace
command allows defining a new workspace:
The following snippet shows an example:
The update workspace
command allows updating the workspace name:
with the following options:
The following snippet shows an example:
The delete workspace
command allows deleting a workspace:
with the following options:
The following snippet shows an example:
The list users
command returns the list of the available users.
The following snippet shows an example:
The create user
command allows defining a new user and assigning it to one or more workspaces.
with the following options
The default policy requires the password to satisfy the following rules:
Include one or more uppercase characters (A-Z)
Include one or more special characters (~!@#$%^&*_-+=`|\(){}[]:;"'<>,.?/)
The username and password can be either provided interactively or as command arguments.
The following snippet shows the process of creating a new user interactively:
The same action can be performed using the command options:
The describe user
command returns the detail of a valid user matching the provided username or id:
Notice: users without administrative privileges can only describe their profiles, while administrators can inspect any profile.
The following snippet shows an example:
The update user
command allows updating the user profile attributes for the user matching the username or id:
with the following options:
The following snippet shows an example of updating the email of a user:
This command is also used to grant or revoke access to workspaces and administrative privileges to users.
The following snippet shows an example of updating the user’s workspace access privileges, adding write privileges on Workspace 1, and revoking access on Default:
The update password
command updates the password for the user matching the username or id:
with the following options:
Notice: users without administrative privileges can update only their own password, while administrators can perform this action on any profile.
The default policy requires the password to satisfy the following rules:
Include one or more uppercase characters (A-Z)
Include one or more special characters (~!@#$%^&*_-+=`|\(){}[]:;"'<>,.?/)
The password can be either provided interactively or as command arguments.
The following snippet shows an example of updating interactively the password for a user:
The same action can be performed using the command options:
The delete user
command removes the user with the provided username or id:
with the following options:
The following snippet shows an example of deleting interactively a user:
This page describes all commands that allow to be managed with their options (see also available for all commands).
Command | Description |
---|
An Akamas license is an Akamas resource (see list of ) so you can use the following command (see ) to install a license in an Akamas instance:
An Akamas license is an Akamas resource (see list of ) so you can use the following command (see ) to remove a license from the Akamas installation:
Print the status of the Akamas instance.
with the following options:
Print the logs of the Akamas services.
with the following options:
Initialize the CLI’s configuration file, either interactively or through the provided options.
with the following options:
Set a value in the CLI’s configuration file
with the following options:
This section describes all the commands provided by the Akamas Command Line Interface (CLI):
to manage the Akamas installation
to manage user and workspaces
to perform login and logout operations
to manage all the
to update the Akamas optimizer options
The Akamas CLI provides a command-line interaction with the Akamas platform, thus enabling an infrastructure-as-code user experience to manage the end-to-end optimization lifecycle.
Notice: the Akamas CLI allows performing all the operations that you can do on the UI and more. In particular, the CLI has to be used for all modification operations on the platform, such as the creation and deletion of Akamas resources.
Read here below to use the help to get started with Akamas commands.
The following table describes all the Akamas' resources and their parent resources.
Akamas resources | Parent Resource |
---|
Akamas CLI provides built-in help, which is one of the few commands that do not require any authentication.
By issuing the following command:
you get something like the following:
Option | Short option | Type | Description |
---|---|---|---|
Option | Short option | Type | Values | Default | Description |
---|---|---|---|---|---|
Option | Short option | Type | Values | Default | Description |
---|---|---|---|---|---|
Option | Short option | Type | Values | Default | Description |
---|---|---|---|---|---|
Option | Short option | Type | Description |
---|---|---|---|
Option | Short option | Type | Description |
---|---|---|---|
Akamas resources | Parent Resource |
---|---|
Option | Required | Description |
---|---|---|
Option | Required | Description |
---|---|---|
Option | Required | Description |
---|---|---|
Option | Required | Description |
---|---|---|
Option | Required | Description |
---|---|---|
Option | Required | Description |
---|---|---|
Option | Short option | Type | Description |
---|
Option | Short option | Description | Type | Accepted values | Requires | Mutually exclusive |
---|
Option | Short option | Type | Default | Description |
---|
Option | Short option | Type | Description |
---|
build a resource from a file or directory
create a resource from a file
delete a resource
list a set of resources
describe a resource
update a resource
install a resource from a file
uninstall a resource
start a study
stop a study
export a study
import a study
--debug
-d
Flag
Print detailed information in case of errors
--workspace
-w
String
Overrides the workspace defined in the configuration file when interacting with resources such as systems, workflows and studies
--help
Flag
Print command line help
--force
-f
Flag
Force the deletion of the resource(s)
--no-pagination
-no-pag
Flag
Show all resources without pagination
--use-seconds
-u-s
Flag
If durations should be output in seconds
--sort-asc, --sort-desc
-s-asc, -s-desc
Flag
Sort items by creation time
--output
-o
Choice
table
json
yaml
table
Switch the output to table (default), json or yaml
--output
-o
Choice
table
json
yaml
table
Switch the output to table (default), json or yaml
--output
-o
Choice
table
json
yaml
table
Switch the output to table (default), json or yaml
--force
-f
Flag
Force the installation of the resource
--force
-f
Flag
Force the uninstall of the resource
login
logout
--user
-u
The username to use to connect to Akamas. If not specified will be requested by prompt.
AKAMAS_USER
no
--password
-p
User password. If not specified will be requested by prompt. Be advise that if specified in the command line, the password will be visible in terminal history.
AKAMAS_PASSWORD
no
--workspace
-w
Set a default workspace for the session. The user should have access to the workspace specified
AKAMAS_WORKSPACE
no
--organization
-o
Set your organization
AKAMAS_ORGANIZATION
no
Component
System
Component Type
Metric
Parameter
Optimization Pack
Study
Step
Experiment
Study
Trial
Telemetry Provider
Telemetry Instance
System
KPI
System
License
Workflow
User
Workspace
create a workspace
update a workspace
delete a workspace
list users
create a user
describe a user
update user profile
update user password
delete a user
--name
TEXT
yes
New workspace name
-y
no
Show this message and exit
-u
, --username
TEXT
yes
Username
-p
, --password
TEXT
yes
Password
--first-name
TEXT
no
User first name
--last-name
TEXT
no
User last name
--email
TEXT
no
Valid email
-w
, --add-to-workspace
TEXT
no
Add the user to the specified workspace with the specified role (R|W) (e.g., --add-to-workspace WORKSPACE_A R). The option can be specified multiple times to add more workspaces.
--admin
no
Specify if you want to give Administration privileges to the user
--first-name
TEXT
no
User first name
--last-name
TEXT
no
User last name
--email
TEXT
no
Valid email
-w
, --add-to-workspace
TEXT
no
Add the user to the specified workspace with the specified role (R|W) (e.g., --add-to-workspace WORKSPACE_A R). The option can be specified multiple times to add more workspaces.
-r
, --remove-from-workspace
TEXT
no
Remove the user from the specified workspace
--admin
no
Specify if you want to give Administration privileges to the user
--no-admin
no
Specify if you want to remove Administration privileges to the user
-p
, --password
TEXT
yes
New password
-y
no
Automatic yes to prompts
--debug | -d | Flag | Print a detailed status of Akamas instance |
--debug | -d | Show extended error messages, if presents | Flag | - | - | - |
--page-size | Number of log's lines to be retrieved at one time | Integer | (0, 65536) | - |
|
--no-pagination | Disable pagination and print all logs | Flag | - | - |
|
--dump | Output logs without pagination and formatting | Flag | - | - |
|
--workspace | -ws | UUID or name of the Workspace to visualize. When empty, system logs will be returned instead | String | - | - | - |
--from | -f | The start timestamp or timedelta of the logs | String |
| - | - |
--to | -t | The end timestamp or timedelta of the logs | String |
| - | - |
--study | -s | UUID or name of the Study |
| - | - | - |
--exp | -e | Number of the experiment | Integer | - |
| - |
--trial | Number of the trial | Integer | - |
|
--system | -y | UUID or name of the System |
| - |
--workflow | -w | UUID or name of the Workflow |
| - |
--service | -S | Name of the Akamas Service | String |
| - | - |
--log-level | -l | Log level | String |
| - | - |
--without-metadata | Print only timestamp and message | Flag | - | - | - |
--sorting | Sorting order of the printed logs | String |
|
<MESSAGE> | Regular expression against the message | String | - | - | - |
--api-address | -a | String | http://localhost:8000 | Api address |
--default-local | -l | Flag | Configure the Akamas CLI for localhost NOTE: This argument is mutually exclusive with arguments: [api_address]. |
--workspace | -w | String | default | Active workspace |
--echo-only | Flag | Print configuration on stdout |
--api-address | -a | String | Set the API address of your Akamas instance |
--workspace | -w | String | Set the default workspace |
--organization | -o | String | Set your organization |
--keyring | -k | String | Set keyring type |
Component | System |
Component Type |
Metric |
Parameter |
Optimization Pack |
Study |
Step |
Experiment | Study |
Trial |
Telemetry Provider |
Telemetry Instance | System |
KPI | System |
License |
Workflow |
User |
Workspace |
install licence |
uninstall licence |
check the status of the Akamas instance |
get logs |
initialize Akamas configuration |
set Akamas configuration |