Skip to content

dh4rm4/digitalocean_nuke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DigitalOcean Nuke

Nuke

Small tool to periodically nuke every DigitalOcean ressources of a given account.

How To

Requirements

You must define few environnement variables to configure the execution.

  • DO_VAR_RSRC_TIMEOUT: max lifetime fore ressources in seconds (e.g. 1h -> 3600)
  • DO_VAR_TOKEN: main DigitalOcean token
  • DO_VAR_SPACES_ACCESS_ID: DigitalOcean space access_id
  • DO_VAR_SPACES_ACCESS_KEY: DIitalOcean space access_key

You can take advantage of Gitlab's Pipeline schedules to launch the tool periodically.

To do so just define the job with its env variables in the "CI/CD -> Schedules" panel.

Manual

To execute the tool manually:

  1. clone the repository
cd ${HOME}/Documents && git clone git@gitlab.com:posedao/digitalo_nuke.git
  1. define the environnement variables
export DO_VAR_SPACES_ACCESS_ID=XXXXXXXXX
export DO_VAR_SPACES_ACCESS_KEY=XXXXXXXXX
export DO_VAR_TOKEN=XXXXXXXXX
export DO_VAR_RSRC_TIMEOUT=1800

  1. install the dependancies
pip3 install -r ./requirements.txt
  1. Launch the nukes
python ./src/control_center.py

boid

About

⚠️ MIRROR FROM GITLAB! ⚠️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages