OCI Utilities
Instances created using Oracle-Provided Images based on Oracle Linux include a pre-installed set of utilities that are designed to make it easier to work with Oracle Linux images. These utilities consist of a service component and related command line tools that can help with managing block volumes (attach, remove, and automatic discovery), secondary VNIC configuration, discovering the public IP address of an instance, and retrieving instance metadata.
The following table summarizes the components that are included in the OCI utilities.
Name | Description |
---|---|
ocid
|
The service component of oci-utils , which runs as a daemon started via systemd . This service scans for changes in the iSCSI and VNIC device configurations and caches the OCI metadata and public IP address of the instance. |
oci-growfs
|
Expands the root filesystem of the instance to its configured size. |
oci-iscsi-config
|
Lists or configures iSCSI devices attached to a compute instance. If no command line options are specified, lists devices that need attention. |
oci-metadata
|
Displays metadata for the compute instance. If no command line options are specified, lists all available metadata. Metadata includes the instance OCID, display name, compartment, shape, region, availability domain, creation date, state, image, and any custom metadata that you provide, such as an SSH public key. |
oci-network-config
|
Lists or configures virtual network interface cards (VNICs) attached to the Compute instance. When a secondary VNIC is provisioned in the cloud, it must be explicitly configured on the instance using this script or similar commands. |
oci-network-inspector
|
Displays a detailed report for a given compartment or network. |
oci-notify |
Sends a message to a Oracle Cloud Infrastructure Notifications service topic. |
oci-public-ip
|
Displays the public IP address of the current system in either human-readable or JSON format. |
Installing the OCI Utilities
The OCI utilities (oci-utils
) are automatically included with instances
launched with Oracle Linux 7 and later images. They are not currently available on other
distributions.
Much of the OCI utilities functionality requires that you have the Oracle Cloud Infrastructure SDK for Python and the Oracle Cloud Infrastructure CLI installed and configured.
Beginning with
0.11
release, oci-utils
can no longer
be used with Python 2 in favor of Python 3.To install the Oracle Cloud
Infrastructure SDK and CLI using
yum
, install the required packages corresponding to the image used
by the instance.
sudo yum install python36-oci-sdk python36-oci-cli
sudo yum install python3-oci-sdk python3-oci-cli
For configuration information, see the Oracle Cloud Infrastructure SDK for Python documentation and the documentation for configuring the Oracle Cloud Infrastructure CLI.
Updating the OCI Utilities
To update to the latest version of oci-utils
:
sudo yum update oci-utils
Using the OCI Utilities
To use the OCI utilities, you first need to start the ocid
service:
sudo systemctl start ocid.service
Example output:
Redirecting to /bin/systemctl start ocid.service