Hi guys, I need to provision and manage LXC containers living on a Clustered LXD setup.
Container creation and management based on input from an external APP.
What I have come up with so far is:
- Create a microservice to listen to requests from the APP.
- The APP would send a payload like {“command”: “Create Instance”, “Name”: “New Instance”, “Size”: “Medium”, “etc”: “etc”}
- A PHP script would take the “order” and convert it to LXD commands (there’s a PHP client for the LXD API) to be issued to the LXD API.
Question is: Where should the logic live?
- A VPS dedicated only to connect to the LXD API.
- A container living in one of the hosts.
- Directly in one of the hosts.
- On the APP server and interact with the LXD API directly from the APP code (no microservice).
How have you achieved this in the past?
Pitfalls?
Tips?
Thanks a lot!