Author: Jason Beattie
In the rapidly evolving landscape of cloud computing, cost efficiency is now a paramount consideration. OCI provides a robust platform for hosting Oracle workloads in the cloud, and in this blog post, we will delve into the concept of workload profiles.
Understanding Workload Profiles:
Workload profiles involve a meticulous analysis and categorisation of the usage patterns of your cloud resources. This includes factors such as time, demand, and specific requirements. The goal is to align resource allocation with the actual needs of your applications and services, enabling a more efficient and cost-effective cloud environment.
Tailored Workshops for Cost Savings:
Conduct workshops designed to collaboratively identify opportunities for resource optimisation. Recognising that not every instance needs to be available 24/7, these workshops help your organisation save significantly on cloud resources.
Strategic Resource Management:
Effective implementation of workload profiles allows for strategic resource management. Collaborate closely with your team to understand the unique demands of your applications, facilitating the creation of tailored workload profiles that precisely match the requirements of your Oracle workloads in OCI.
Dynamic Scaling and Flexibility:
Ensure you can dynamic scale solutions that enable your resources to scale up or down based on workload demands. This flexibility ensures that you only pay for the resources you genuinely need, avoiding unnecessary costs during periods of low demand.
Development and UAT Environment Optimisation:
Recognising that not every environment requires continuous availability, you can optimize development stacks and UAT environments based on workload profiles. This ensures that resources are allocated efficiently, aligning with actual usage patterns.
OCI CLI Agent user creation
Install OCI CLI as per Oracles latest documentation
To run the installer script, run the following command:
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
Then run the following command:
oci setup config
This command prompts you for the information required to create the configuration file and the API public and private keys. The setup dialog uses this information to generate an API key pair and creates the configuration file.
Navigate to the location in the output and download the public.pem key. On the OCI console navigate to the Users page and select the created OCI-CLI User and add the public.pem key into the API Keys.
OCI CLI Config file
Each OCICLI Toolset comes with a default profile and generates a configuration file that serves as the authentication mechanism between the toolset and the OCI console. Below is the default configuration file located on the instance where OCI cli is installed:
Example Config file Below:
[DEFAULT]
user=ocid1.user.oc1.aaaaaaaa***************************************
fingerprint=12:eb:f8:d5:36:33:2a:**:de:**:3a:92:e0:d4:22:4d
key_file=/root/.oci/oci_api_key.pem
tenancy=ocid1.tenancy.oc1..aaaaaaaa********************************
region=eu-frankfurt-1
OCI CLI Dbaas Power Scripts
On the instance where the OCI toolset in installed, use the vi-text editor to create the scripts that will power off and on the DB node server:
#!/bin/sh
#Simple script to start the instance
/home/opc/bin/oci db node start --db-node-id INSERT OCID ID OF DB
#!/bin/sh
#Simple script to stop the instance
/home/opc/bin/oci db node stop --db-node-id INSERT OCID ID OF DB
OCI CLI Iaas Power Scripts
oci compute instance action --instance-id ocid1.instance.oc1.eu-frankfurt-1.an************** --action SOFTSTOP
oci compute instance action --instance-id ocid1.instance.oc1.eu-frankfurt-1.**************cctcq --action START
From this you can schedule a automatic schedule to run against the scripts.
Comments