I have a web app that grabs an Apache 'access.conf' file from internal GitHub, and then sends it via an HTTPS type of authenticated request to our server farm in a temporary dir.
When the file gets to Server 1. A few things are done: 1. Via a script, existing access.conf is renamed to access.conf.back, and new file is moved in its place from temp to /etc/httpd/conf.d. 2. File is tested via apachectl -t 3. If the check fails, it means, a restart of apache gracefully will not succeed, therefore, do not reload, and move old file into place, and go to step 6. 5. If the check is passed, do: apachectl -k graceful 6. Go to next step for each server in list
This is all OK, but I need some direction from experienced web developers on how to show this in a nice table with a green tick mark for "good", and a red cross for "bad".
How would I go about displaying the status of the above three steps, plus the "deployment" of access.conf to the server, so that'd be three operations, "file sent," "file checked", "server restarted." This should all be in real time.
API: /deployfile/access.conf Now that's what I've been asked to do for the WebUI. I also have a ReST API which also does the deployment part. It would take the request, and do it. And store the result in a table, and return a unique transaction id.
API: /deployfile/status/id For the Status API, from above, it would display the deployment results in a JSON object taken from a transaction table.
API: /restartservices/id Finally, the restarting of Apache would also be an API, and after each restart, it would wait a few minutes for the load balancer to see that its healthy again, and then go to the next server. This would be done in another thread, as it would be time consuming.
API: /restartservices/status/id Again, display the results in JSON.
So anyhow, I am familiar with Vue, but wanted how this is done properly in the industry?
I may be over-thinking this, but better to ask.
Thanks in advance.