In this video, I'll show you how to configure the Oracle Private Cloud Appliance OCI CLI
on a Microsoft Windows system.
I've opened a Git Bash terminal window which I previously installed on my Windows system.
This demonstration assumes the I've already installed the OCI CLI which I'll verify by
running the 'which oci' command.
This demonstration also assumes the .oci directory exists in your home directory.
The output of the 'pwd' command shows that I am currently in this .oci directory.
And I'll also show that this directory is empty.
I'll clear the screen to begin this demonstration.
The first command I'll run is 'oci setup keys'.
This command creates an API key pair.
I'll just press enter when prompted for a passphrase.
The output shows the public and private key files and the public key fingerprint.
I'll run the 'ls' command to show these 2 files exist in the current directory.
Next I'll create a config file in the current .oci directory.
You can have multiple profile sections but for this demonstration, I have a single profile
named DEFAULT.
We'll provide user information later.
But I am able to provide the name and location of the API private key file and the fingerprint.
These two pieces of information were provided by the 'oci setup keys' command I just ran.
We also need to provide tenancy information and the region.
I'll save and view the contents of the file and verify the key file and fingerprint information
matches the output of the 'oci setup keys' command.
Also notice, that we need to upload the API public key through the console so I'll do
this next.
I'm logged into the Compute Web UI of my Oracle Private Cloud Appliance and have navigated
to my user details page.
I'll scroll down and click the Add API Key button.
I can either drag and drop my public key file or I can paste in the public key.
I'll just click drag and drop and then select my public key file.
I'll then click the Upload Key button.
The key was successfully uploaded and the fingerprint is displayed which matches the
fingerprint in our config file.
I can also get the user OCID from the user details page, which is needed in our config
file.
I'll scroll up and click the copy button for the OCID.
I'll return to my terminal window, clear the screen, and edit the config file and paste
the user OCID.
I'll save and view the file and see that I still need to provide the tenancy and the
region.
I can get the tenancy from the Compute Web UI.
I'll click the user in the top right corner of the UI.
From here I can select Tenancy.
And from the Tenancy details page I can copy the Tenancy OCID.
I'll return to my terminal window and edit the config file and paste the tenancy OCID.
I'll also provide the region information.
The region is the fully-qualified domain name of your Oracle Private Cloud Appliance system.
I'll save and view the completed config file.
Next I need to obtain the Oracle Private Cloud Appliance external silo Certificate Authority.
You can use the curl command to get the external silo CA chain using the syntax:
curl -ko
--noproxy '*' https://iaas../cachain I've cleared the screen and will run this
curl command naming my output file ca.crt and providing my server name and domain name.
Now I have an additional file, ca.crt, in the .oci directory.
The final configuration step is to create a file named oci_cli_rc in the .oci directory.
Use the same profile name used in the config file, which is DEFAULT in this demonstration.
For the cert-bundle line, provide the location and file name of the ca.crt file.
I'll save the file and now I'm ready to test by running a sample oci command line command.
The OCI CLI syntax is covered in other videos but the output verifies that the OCL CLI configuration
is correct.
This concludes this video.
Thank you for watching.