GithubHelp home page GithubHelp logo

oci-nightly-stop's Introduction

oci-nigthly-stop

Stop your OCI instances at night.

Supported instances for stop

  • Compute Instances
  • Autonomous Databases
  • Database nodes of database systems (VM and Baremetal)
  • Analytics Cloud Instances

This script will start and stop all compute, Autonomous, database and analytics instances within a tenancy. Specific resources can be tagged so that they will not be started and stopped, or the lines for the specific types of resources can be removed from the botton of the start.py and stop.py files

Prerequisites

How to use

  1. Clone this repository.

  2. Open stop.py and start.py files and edit # Specify your config file section accordingly.

  3. python3 stop.py will start stopping transactions. python3 start.py will start starting transactions

  4. Errors will be emitted to the standard output. Redirect it to the file if you need record logs.

  5. There is no scheduler included in the script. Please use cron or othe scheduler as you need.

    • Exapmple of crontab entry to revoke every 0 am
    0 * * * cd /home/opc; python3 -u /home/opc/oci-nightly-stop/stop.py > /home/opc/log/stop_date +%Y%m%d-%H%M%S.log 2>&1
    
  6. If you want to exclude instances from stopping, set defined tags below for individual compute, db-systems or autnoumous database instances.

    • Tag Namespace : control
    • Defined tag ๏ผš nightly_stop
    • Tag value : false

oci-nightly-stop's People

Contributors

rahul-tasker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.