Install OCI CLI on Windows 10

Having CLI tools that allow us to automate and industrialize tasks is vital in a serious Cloud deployment.

All main Cloud vendors know it, and for that reason they developed their own CLI Tools. AWS has one, Azure has one….. and right, OCI also has his own ClI Tool.

In this post i will show you how easy is deploy OCI Cli iver a Windows 10 based machine.

Instalation

The first step of this journey is open a PowerShell windows (with administrative rights).

The installation process is PowerShell script based, so we need to allow the execution of the scripts

Set-ExecutionPolicy RemoteSigned

next, we launch the installation script:

powershell -NoProfile -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1’))”

and we see something like this in our screen

we need to go over a few setup questions, after it the script will start downloading all necessary components and dependence.

a final question will ask about include or not the OCI binary file in our path. I suggest to include it in order to work more easily with the cli.

as you can see, install OCI CLI is really easy.

Basic SETUP of OCI CLI

Once we have our new OCI CLI installed, it’s time to setup it with our OCI tenant.

We have two options/paths to setup our environment. The first one is the “hard way” editing a text file. The second one, and the more easy (at least for the first time) is using the setup script.

The setup script will help you to setup your environment and generate your API KEYS (if necessary), so my recommendation is use the script.

oci setup config

the script will ask for the following information:

  • User OCID user
  • Tenant OCID
  • Región to work for

the installation process continue and ask about the Key to use to securize API access. If we already have one, we can use it or create another one, the script will do it for you.

The Key you are create, is necessary in order to encrypt and securize all the call that you will do against the APIs with the CLI.

One generated the Key, you need to upload it to your user profile on the cloud

It’s important to include Begin and End PUBLIC KEY line, other way you will get a error message.

And that’s all, as you can see, Oracle made very easy to install and setup OCI CLI

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Este sitio web utiliza cookies para que usted tenga la mejor experiencia de usuario. Si continúa navegando está dando su consentimiento para la aceptación de las mencionadas cookies y la aceptación de nuestra política de cookies, pinche el enlace para mayor información.plugin cookies

ACEPTAR
Aviso de cookies