Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bjornjohansen/do-upgrade-plans
Upgrade your DigitalOcean droplets to better plans with the same cost.
https://github.com/bjornjohansen/do-upgrade-plans
Last synced: 7 days ago
JSON representation
Upgrade your DigitalOcean droplets to better plans with the same cost.
- Host: GitHub
- URL: https://github.com/bjornjohansen/do-upgrade-plans
- Owner: bjornjohansen
- License: gpl-3.0
- Created: 2018-01-19T01:03:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-19T01:26:28.000Z (almost 7 years ago)
- Last Synced: 2024-08-02T02:02:17.401Z (4 months ago)
- Language: PHP
- Size: 19.5 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-digitalocean - do-upgrade-plans - A script to upgrade your DigitalOcean Droplets to better plans with the same cost. (Community OSS projects)
README
# do-upgrade-plans
Upgrade your DigitalOcean droplets to better plans with the same cost.This script will use the DigitalOcean API to upgrade all of your droplets to better plans with the same cost if available.
## Background
January 16, 2018 DigitalOcean released [new pricing plans](https://blog.digitalocean.com/new-droplet-plans/) where they basically doubled the RAM for the same price of the old plans. But to get the benefits for your existing droplets, you have to upgrade all of your existing droplets in a process that involves shutting them down, selecting the new plan, waiting for the upgrade to happen and power on the droplets again. I have tens of droplets and had no intention of doing this manually, so I wrote a script to use the DigitalOcean API to automate the upgrades.
## Installation
`composer create-project bjornjohansen/do-upgrade-plans`
## Run the upgrades
First you need a Personal Access Token with read and write access, which you can generate on the [Applications & API page](https://cloud.digitalocean.com/settings/api/tokens).
Copy your access token and set it as an environment variable: `export DO_ACCESS_TOKEN=`.
Run the script: `php -f do-upgrade-plans/upgrade-plans.php`
Watch as your droplets get upgraded.
In case an error happens, your droplets will power cycle, to make sure they are in a running state. This happened to 3 of my droplets. Further investigation (trying to upgrade manually) revealed that “Due to high demand and capacity restrictions we have temporarily disabled this size in this region.”