|
|
||
|---|---|---|
| .forgejo/workflows | ||
| .gitignore | ||
| browser.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
| webhooks.json.sample | ||
ovh-eco-hunter
OVHCloud eco line scraper and hunter.
A brief summary
This service looks the OVH availability API about the availabilities of configurations.
And looks the catalog API too, which makes the configurations orderable with catalog (price, details and etc.).
A config available only when the availability API lists that, but an availability possible available without category. On fresh modells usualy OVH provides the availability and catalog later which makes possible to prepare for ordering.
This service sends the FQN regex match on server change to the set Discord webhooks in the webhooks json.
FQN always identifies the different server configurations. A server has a family and model id, for example 24sk10, a memory and a disk id. Memory and disk makes that unique and parts from the catalog is pairable. The planCode identifies a server but in the new range one server has multiple configurations.
Files
To use this you need to create two files.
- A webhooks.json that uses the server FQN and Python regex to filter which type of server notification routed to which Discord webhook. check the sample file.
- An offer.json which contains offers
These are required only to create by hand if you run it with Docker
Run in Docker
See the docker-compose.yml file. If you use it, do not forget to create the two starting files. Webhooks and offers.
touch webhooks.json
echo "{}" > offers.json
echo "{}" > offers_archive.json
It is an empty example. Fill up webhooks.json if you want to get webhooks. Otherwise you only can read offers.json.
You can change who runs the service in compose file. Keep in mind that this user need to be to know read and write the JSONs.
Run
You can simply run the script with python3 browser.py.
Suggested to do it in tmux to run in background. Or use Docker.
CI/CD
Due to the special installation of this instance the workflows configured to work over HTTP. With this we do not need to install the own CA to all containers and instances.
Changelog
V2.1
- Show bandwidth on changes
- show an estimated prices based on the addons of specific FQN
V2.0
- Changed JSON format. Added the
urlsandurls_listchanges. Theurlsfired at every DC change buturls_listchangesonly when availability or catalog changed. This helps to look the new availabilities only and avoid too much notifications.
v1.9
- Fix: Archive servers at every run, not on the first.
v1.8
- Added datacenters for new FQNs
- Added docker-compose file
- Continue run on network error, do not crash
- New CPU determination logic fix to avoid crash if server invoice not provide CPU information
- New repository with CI/CD
v1.4
- Labels added to offers.json to make easier autoorder.
- Regenerate catalog on change.
- New logic to determine CPU. If catalog not provides this information well, we use the invoiceName as an alternative.
- If only one disk or RAM option possible, get it directly instead search with regex.
v1.1
- Added: Last seen for FQNs
- Added: Auto deploy Docker container package
v1.0
- Initial release