Oracle Compute Cloud service supports oracle-compute
CLI tool. Use this tool to view and manage Oracle Compute objects such as instances, storage volumes, and orchestrations.
For more information on Oracle Compute Cloud Services and supported objects, see Getting Started with Using Oracle Compute Cloud Services in Using Oracle Compute Cloud Service.
Tenant administrator (/tenant_name/username
): Administrator for a given tenant. Can perform all the administrative functions for a tenant. Can create users in their tenancy with Tenant User role. The default tenant admin user is /tenant_name/administrator
.
Tenant user (/tenant_name/username
): User of a tenant group. Can create and use VMs and resources within the tenant.
For more information on user roles, see Getting Started with Using Oracle Compute Cloud Services in Using Oracle Compute Cloud Service.
Before installing the Oracle Compute CLI tools, you must get the API URL
of the API server used when installing your Oracle Public Cloud Machine. You can get this information from Oracle Cloud Administrator.
Examples in this guide use the following name for the API server:
api.oc.example.com
Set the environment variables in the shell to avoid having to provide the values in the CLI command.
The following table lists the environment variables, describes each variable, and provides the command to set the variable in the host using a bash shell.
Name | Description | Command |
---|---|---|
ORACLE_COMPUTE_API |
URL of API endpoint When this variable isn't set, you must specify a API endpoint with the |
export ORACLE_COMPUTE_API= Example:
To make the environment variable persist across login sessions, add this line to your |
ORACLE_COMPUTE_USER |
The Oracle Compute user name. When this variable isn't set, you must specify a user name with the |
export ORACLE_COMPUTE_USER= Example:
To make the environment variable persist across login sessions, add this line to your |
ORACLE_COMPUTE_COOKIE |
The value of an authentication token received from the |
export ORACLE_COMPUTE_COOKIE= If both ORACLE_COMPUTE_USER and ORACLE_COMPUTE_COOKIE are specified, then ORACLE_COMPUTE_USER takes precedence. |
The prerequisites for installing the Oracle Compute CLI on the remote client system are as follows:
Client system must have Oracle Linux 6.3 or later.
Client system must have Python 2.6 or later but not Python 3.x.
The script must have root privileges in the client system.
To install the oracle-compute
tool:
/usr/bin/oracle-compute