OCI
Ops can integrate with your existing Oracle Cloud Infrastructure account. You can use Ops CLI to create and upload an image in OCI account. Once, you have uploaded image, you can also create an instance with a particular image using CLI.
Pre-requisites
Create an Oracle Cloud Infrastructure account (https://www.oracle.com/cloud/).
Set up a config file with the required credentials.
Go to
User Settings
page, whose link should be seen after clicking on profile avatar in top navigation bar.Click on
API Keys
link.Click on
Add API Key
button. A modal with further instructions will appear.Download the private key.
Click on
Add
button. You should see a configuration preview in the modal.Copy configuration preview content to
~/.oci/config
file in your machine. Create the directory.oci
in your home folder if it does not exist yet.Update the
key_file
in OCI configuration file with the path of the file you downloaded in step 4.
Setup a bucket in your OCI account to receive your images.
Access
Object Storage
page.Click on
Create Bucket
button.Access bucket details page and copy
Namespace
value to ops configuration file.
Copy your bucket details to ops configuration.
You are now able to use ops commands to interact with your OCI Account
Image Operations
Create Image
You can create an image in OCI with the following command.
For creating an image using a particular package, you need to provide the package name to ops image create
command with -p
option.
List Images
You can list existing images on OCI with ops image list -t oci -c config.json
.
Delete Image
ops image delete <imagename>
can be used to delete an image from OCI.
Instance Operations
Create Instance
After the successful creation of an image in OCI, we can create an instance from an existing image.
List Instances
You can list instance on OCI using ops instance list
command.
Get Logs for Instance
Work in progress.
Delete Instance
ops instance delete
command can be used to delete instance on OCI.
Last updated