Admin Functions with the CLI

How to run tasks as administrator in the Orka CLI: user and VM management when you're not the user or VM owner.

🚧

Quick navigation

Jump to: Prerequisites | User administration | VM administration | Node administration

Orka provides the following administrative operations:

  • list, create, delete, and group users, and reset passwords
  • list, delete, and purge VMs that belong to other users
  • apply and remove node dedication
  • apply and remove node affinity
  • enable and disable sandbox mode

🚧

Quick command summary

orka config (provide a valid license key)

orka user [list / create / delete / reset / group]
orka user [list / create / delete / reset / group] -l <LICENSE_KEY>

orka vm [list / delete / purge] -f all
orka vm [list / delete / purge] -f all -l <LICENSE_KEY>
orka vm [list / delete / purge] -f <USER>
orka vm [list / delete / purge] -f <USER> -l <LICENSE_KEY>

Prerequisites

Configure your license key

Administrative operations require you to provide your Orka license key (available in your IP Plan). The Orka CLI lets you store the license key as part of your Orka configuration or pass it with the -l flag, where required.

Run:

orka config -a <ORKA_API_URL> -l <LICENSE_KEY> -y

📘

What's your Orka API URL?

You can get the IP for your Orka endpoint from your IP Plan:

  • For clusters deployed before Orka 2.1, it's the .100 address for your Private-1 network (usually, 10.221.188.100).
  • For clusters deployed with Orka 2.1 or later, it's the .20 address for your Private-1 network (usually 10.221.188.20).
    You need to use http with the IP.
1505

Set up a user

If you don't have an Orka user, you need to create one.

orka user create -e <EMAIL> --password <PASSWORD> -y

Orka generates an authentication token based on the provided email address and password. It will pass this token for authentication with most CLI commands.

Next, you need to log in. You might occasionally need to log in, if your authentication token becomes invalidated or you are logged out:

orka login -e <EMAIL> --password <PASSWORD> -y

User administration

You can see the list of all users for the environment.

orka users

OR

orka user list
648

You can delete a user from the environment.

orka user delete -e <EMAIL> -y
1824

You can reset the password for a user.

orka user reset -e <EMAIL> --password <PASSWORD> -y
1824

You can group users to configure their access to certain nodes.

orka user group -g <GROUP> -e <EMAIL> -y
1824

You can also ungroup users.

orka user group -g -e <EMAIL> -y
1824

VM administration

Detailed VM management documentation is available here.

To enable administrative access to the orka vm list / delete / purge commands, use the -f flag. Administrative access lets you manage (list, delete, purge) the VMs for another user or for all users at once.

Valid syntax includes: -f all for all users, or -f <EMAIL>

For example:

orka vm list -f all
orka vm list -f all --json
orka vm list -f all --raw

orka vm list -f <EMAIL>
orka vm list -f <EMAIL> --json
orka vm list -f <EMAIL> --raw

orka vm delete -v <NAME> -f all -y
orka vm delete -v <NAME> -n <NODE> -f all -y
orka vm delete -v <ID> -f all -y

orka vm delete -v <NAME> -f <EMAIL> -y
orka vm delete -v <NAME> -n <EMAIL> -f all -y
orka vm delete -v <ID> -f <EMAIL> -y

orka vm purge -v <NAME> -f all -y
orka vm purge -v <NAME> -f <EMAIL> -y
2298

Node administration

You can enable and disable node dedication. For more information about node dedication, see here.

orka node group -n <NODE> -g <GROUP> -y
orka node group -n <NODE> -g -y
1824

You can tag and untag nodes to configure node affinity. For more information about node affinity, see here.

orka node tag -n <NODE> --tag <TAG> -y
orka node untag -n <NODE> --tag <TAG> -y
1824

You can apply and remove sandbox mode.

orka node sandbox -n <NODE> -y
orka node unsandbox -n <NODE> -y
1946

© 2019-2023 Copyright MacStadium, Inc. – Documentation built with readme.com. Orka is a registered trademark of MacStadium, Inc.