Automating OKE Clusters start/stop with DevCS


Reusing the work published here, here and here we are showing today how to schedule the start/stop sequence of an OKE cluster with Developer Cloud Service.

Start job

Create a build with the step as follows:

git clone https://github.com/javiermugueta/oke-cluster-start-stop.git
cd oke-cluster-start-stop
./oke-cluster-start-stop.sh -r=<region> -c=<compartment> -k=<clustername> -o=start

The rest of steps pretty much equal to explained in posts mentioned.

Stop job

Create a new build step, for convenience you can copy from previous build.

For the shell step add the following:

git clone https://github.com/javiermugueta/oke-cluster-start-stop.git
cd oke-cluster-start-stop
./oke-cluster-start-stop.sh -r=<region> -c=<compartment> -k=<clustername> -o=stop

And remember to change the periodic trigger!

That’s all folks, hope it helps! 🙂

NOTE: On 29/mar/2020 fixed bug as the script was not honoring the region parameter

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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