Skip to content

A Brief Intro to the hpcopr CLI

Zhenrong WANG edited this page Mar 25, 2024 · 2 revisions

The hpcopr executable is a powerful Command Line Interface (CLI) developed by this project.

  1. It is designed to be executed by the dedicated system user 'hpc-now'. The user is created during the installation process.

  2. When run the hpcopr, you need to either switch to the user hpc-now by the command su hpc-now(For GNU/Linux & macOS), or run hpcopr by sudo -Hu hpc-now hpcopr ...(For GNU/Linux & macOS). For Windows clients, the method is a little bit different because Windows OS doesn't support the su or sudo command. Your need to:

  • Switch the whole desktop environment to the user 'hpc-now' by Ctrl + Alt + Delete

  • Open a command prompt window, and input the command runas /savecred /user:mymachine\hpc-now cmd to call another command prompt run by the user 'hpc-now'

  1. Like most CLIs, the hpcopr also accepts arguments (separated by space). There are 2 types of arguments:
  • CMD_FLAGS: Command flags, single value. E.g. --force

  • CMD_KEY_VALUES: Command key-value pairs. E.g. -c my_first_cluster

An example of a hpcopr command:

sudo -Hu hpc-now hpcopr init -c my_first_cluster --force

Here, the 'sudo -Hu hpc-now' prefix tells the shell to run this command as the system user 'hpc-now'

'hpcopr init' is the main command

'-c my_first_cluster' is a key-value pair, which specifies the cluster to be inited by this command

'--force' is a command flag. With this command, the hpcopr will re-create the cluster configuration file

Clone this wiki locally