diff --git a/knowledge base/cloud computing/oci/README.md b/knowledge base/cloud computing/oci/README.md index a78b964..8631ecd 100644 --- a/knowledge base/cloud computing/oci/README.md +++ b/knowledge base/cloud computing/oci/README.md @@ -1,7 +1,5 @@ # Oracle Cloud Infrastructure -## Table of contents - 1. [Concepts](#concepts) 1. [Compartments](#compartments) 1. [Networking](#networking) @@ -38,13 +36,15 @@ This includes **any policies** attached to the compartment itself. - [`oci-cli`][oci-cli] - [Compute images] - [Connect to private compute instances using OCI Bastion Service] +- [Running Commands on an Instance] ### Sources - [Required keys and OCIDs] @@ -56,3 +56,4 @@ This includes **any policies** attached to the compartment itself. [connect to private compute instances using oci bastion service]: https://medium.com/@harjulthakkar/connect-to-private-compute-instance-using-oci-bastion-service-ca96a3ceea49 +[running commands on an instance]: https://docs.public.oneportal.content.oci.oraclecloud.com/en-us/iaas/Content/Compute/Tasks/runningcommands.htm diff --git a/knowledge base/cloud computing/oci/oci-cli.md b/knowledge base/cloud computing/oci/oci-cli.md index 04185a0..daa1fdd 100644 --- a/knowledge base/cloud computing/oci/oci-cli.md +++ b/knowledge base/cloud computing/oci/oci-cli.md @@ -2,27 +2,40 @@ Oracle Cloud Infrastructure CLI. -## Table of contents - 1. [TL;DR](#tldr) 1. [Configuration](#configuration) 1. [Further readings](#further-readings) ## TL;DR +
+ Setup + ```sh # Install the CLI. +pip install 'oci-cli' brew install 'oci-cli' +dnf install 'oci-cli' +zypper install 'oci-cli' # Start the interactive setup. +# The key pair must be registered for the user in the cloud console. oci setup config # Generate a key pair to include in the config file. +# The key pair must be registered for the user in the cloud console. oci setup keys # Show the current configuration. cat ~/'.oci/config' +``` +
+ +
+ Usage + +```sh # List available compartments. oci iam compartment list oci iam compartment list -c 'tenancy_id' @@ -52,6 +65,8 @@ oci instance-agent available-plugins get -c 'tenancy_id' \ oci compute instance list -c 'tenancy_id' ``` +
+ ## Configuration | Unix location | Description | @@ -67,7 +82,8 @@ oci compute instance list -c 'tenancy_id' - [Required keys and OCIDs]