Automating start/stop of OKE Cluster 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 schedule

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 schedule

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! 🙂

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 )

Google photo

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

Twitter picture

You are commenting using your Twitter 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.