Open raquelalegre opened 7 years ago
@jonc125 has already done some work on this. He'll be installing a postgres DB on the CloudLabs server containing data about users and hosts. The deployer can use that hosts table from the DB and expose the data in there via REST.
The deployer service can access requests like:
GET /cloudlabs/user123/hosts
- This could return a JSON with the list of hosts to populate the dashboard table.
GET /cloudlabs/user123/host456
- This could return a JSON with all details related to a given host.
POST /cloudlabs/user123/deploy
- Could get all details the user entered on the new host form and deploy a machine on azure, streaming the log coming from terraform so users can follow status.
Other things that could be useful are:
Re the last point - better to have a call which checks a specific prefix - quicker query on the DB. That's what I'm doing in the front-end at present.
We need to store information about hosts and their configurations created by users.
I will probably use Azure DB for Postgres and SQLAlchemy.