Dodging the Idle Deletion in Oracle's Cloud: A Tale of Scripts

The script of survival in Oracle's cloud.

How I refined a community script to keep Oracle's ForeverFree tier instances active and dodge the idle deletion.

19th Oct 2023

ocicloud-computingautomation

Greetings, Cloud Navigators

Have you ever faced the cold void of Oracle Cloud Infrastructure's (OCI) ForeverFree tier, where instances vanish into oblivion if left idle for too long? Ah, the existential dread!

The Inspiration: OCIScripts

By fate or fortune, I discovered the OCIScripts repository by Drag-NDrop, a beacon for OCI users aiming to keep their instances pulsing with life.

My Brainchild: Prevent-OCI-Deletion-for-being-idle

Taking the torch from Drag-NDrop, I delved deep, optimizing and evolving the script into what is now known as Prevent-OCI-Deletion-for-being-idle. My hands reshaped the code, but the heart—the core idea—remains a tribute to its origin.

Introducing startPointlessProcesses.sh

My pièce de résistance is the reimagined startPointlessProcesses.sh. Here's the crux of my enhancements:

  1. Lock Mechanism: Like a sentinel, the lockfile mechanism guards against multiple script instances to avoid CPU overload.
  2. Log Management: This script is a self-cleaning oven. It manages its log, archiving history before it becomes an unwieldy tome.
  3. Dynamic Load Management: No more wild, uncontrolled loads. Now, it's a calculated dance, nudging the CPU only when it slumbers below a 20% threshold.
  4. Manager Instance: No more rogue instances running amok! My version ensures a single manager instance, a maestro conducting a seamless symphony.

The Hands-Free setup.sh

For the auto-pilots among us, I've crafted setup.sh. A one-liner to automate your world—cloning, setting permissions, and scheduling with crontab.

Ethical Contemplations

A moment of sobriety: these scripts have a footprint. They sip on electricity. So, deploy with a conscience—only if your project's heartbeat must not skip.

Parting Bytes

A thunderous applause for OCIScripts' foundation. My repository awaits here for those who wish to explore my refinements.

Tools and scripts are extensions of our will. Wield them with wisdom. Until the next commit—code responsibly!