Small tool to periodically nuke every DigitalOcean ressources of a given account.
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.
To execute the tool manually:
- clone the repository
cd ${HOME}/Documents && git clone git@gitlab.com:posedao/digitalo_nuke.git
- 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
- install the dependancies
pip3 install -r ./requirements.txt
- Launch the nukes
python ./src/control_center.py
boid