proegssilb / FactorioServerManager

A way to manage Factorio servers in The Cloud(tm)
2 stars 3 forks source link

Integrate with Google Cloud to spin up/down droplet #4

Open proegssilb opened 3 years ago

proegssilb commented 3 years ago

DigitalOcean is my preferred "first pass" cloud provider; they've got a really simple system.

The core mechanics of any cloud integration is tracking volumes for server config and save data, and then using those volumes to create droplets for the servers at the right time.

This issue is just for the basic "being able to spin up/down a droplet", not for getting that hooked up to much of anything.

proegssilb commented 3 years ago

In #30, I created an operator for this. However, in order to actually call this issue done, there needs to be code to go with, so that how to use the operator correctly isn't a valid question.

In general, there's 4 verbs associated with the life cycle of each game:

Note that each verb is paired, and there's effectively two levels of bracketing going on. Create and Destroy mark the life of the game, and Spin Up/Spin Down mark the life of each session.

For now, that's as much as the web app cares about. There's conversation you can have about the states these transitions define, but I don't think we need to worry about tracking that. Just provide those 4 transitions, it'll probably be fine.