OCI-AutoScale; Now supports 8 OCI Service, including Exadata CS and Network Load Balancers

By | October 1, 2020

2 years ago I started work on the OCI-AutoScaling script. I wanted to run my workloads on OCI as efficiently as possible. So workloads that I did not need in the evenings or weekends could automatically be turned off orscaled down.

With the new release this OCI-AutoScaling script now support 8 OCI services!

Based on an hourly schedule, configured by a Scheduling TAG, you can initiate the following operations:

  • Compute VMs: On/Off
  • Instance Pools: On/Off and Scaling (# of instances)
  • Database VMs: On/Off
  • Database Baremetal Servers: Scaling (# of CPUs between 1 and 52)
  • Database Exadata CS: Scaling (# of CPUs between 2 and 400)
  • Autonomous Databases: On/Off and Scaling (# of CPUs between 1 and 128)
  • Oracle Digital Assistant: On/Off
  • Oracle Analytics Cloud: On/Off and Scaling (between 2-8 oCPU and 10-12 oCPU)
  • Oracle Integration Service: On/Off
  • Load Balancer: Scaling (between 10, 100, 400, 8000 Mbps)*

This script needs to run hourly and you can use an Always Free Compute instance to do this. Here is a youtube video demonstrating how you can implement this: Youtube demonstration video: https://youtu.be/veHbyvDB74A

The full project can be found on github: https://github.com/AnykeyNL/OCI-AutoScale

5 thoughts on “OCI-AutoScale; Now supports 8 OCI Service, including Exadata CS and Network Load Balancers

  1. Pete

    Hi Richard, I tried the recent update (via the install.sh), but am now getting a new error, any ideas ?

    [opc@autoscaler OCI-AutoScale]$ /usr/bin/python3 /home/opc/OCI-AutoScale/AutoScaleALL.py down
    Using Instance principle
    Starting Auto Scaling script, executing Down actions
    Logged in as: Instance Principle/imaginecorp @ iad
    Enabled regions: us-ashburn-1 us-phoenix-1
    Day of week: Saturday – Weekday: False – Current hour: 13
    Checking: sroh-xgljob1-qa01-us3 – PrivateIp
    Traceback (most recent call last):
    File “/home/opc/OCI-AutoScale/AutoScaleALL.py”, line 347, in
    schedule = resourceDetails.defined_tags[PredefinedTag]
    NameError: name ‘resourceDetails’ is not defined

    Reply
    1. richard Post author

      What kind of resource is sroh-xgljob1-qa01-us3 – PrivateIp?

      Reply
    2. richard Post author

      I think you have a schedule tag on a non-supported resource. If added a fix to not process those. Update the code and check if you still get the same error.

      Reply
      1. Pete

        Thanks Richard (it is a VM instance), I applied the latest code and it’s working like a charm now. I did a quick calculation, and if my math is right then I would expect to see the following savings once I get my schedules defined (almost too good to be true?).

        weekends off = 28%
        weekends and weeknights off = 65%

        Reply
        1. richard Post author

          That is great to hear! If you want to write a guest blog about your experience, feel free to volunteer 🙂

          Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

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