rover
rover copied to clipboard
[Feature Request] Hosting as SaaS?
Team, Is it possible to host it as SaaS so that any user can evaluate its plan as part of CI pipeline. I can see that at the time of starting. it generates visualization for one selected plan and expose it over a selected port.
Please correct me if I'm wrong, if I use this command as part of pipeline and assigning random ports again and again still, I have to be aware of the state. Because, the moment user closes the web page this container will not stop on its own. I'm not sure though.
docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover
How to instruct rover to validate others plans in parallel(while running) so that any other user can also view their plan's visuals. Basically, my ask is to use it as a web app & expose on one final port in docker and multiple users are passing their projects for the visualization before hitting terraform apply.
Regards,
Hi @smartaquarius10,
Thank you for reaching out. The easiest way to incorporate rover into your CI pipeline is to use the standalone flag that generates a zip file containing all the assets rover generates. You can then unzip this file and open index.html in your favorite web browser to view the visualization. This is the only "supported" method because the rover server runs while the Docker container is up. Once the CI pipeline stops the run/Docker container, you won't be able to access the web app.
Your proposed solution ("run rover as a web app -- rover sends the generated assets (RSO, map, graph) to the web app during each run") is currently not supported and is out of scope. Based on your ask, there are two main components:
-
The
roverclient. This component runs on the user's local machine and is responsible for generating the assets (RSO, map, graph) from the Terraform configuration or plan file. Once this component generates the assets, it will send assets to theroverserver. The command could be the following:$ rover --name k8sCluster --server 0.0.0.0:9001 -
The
roverserver/webapp. This component is responsible for storing and visualizing the assets. There are different approaches to storing the assets (database - NoSQL/SQL, filesystem) with their own tradeoffs. Each "project" must have a name (so rover knows which project to query) and support three assets (RSO, map, and graph). Keep in mind that some Terraform plans are huge, so these files may also be large (https://github.com/im2nguyen/rover/issues/20#issuecomment-929395130).This server must implement a new endpoint that allows the rover client to send the assets to the server. For example, this could be a
POSTrequest to/project/$name.The UI must also be updated to support multiple projects. For example, at the top of the UI, users can use a project dropdown to query different project visualizations.
The command to run the server could be the following (run server mode if
--serverflag is empty).$ rover --server
Unfortunately, I don't currently have time to implement this feature right now, but I'll more than happy to guide you through implementing it and merging it into the project. Alternatively if this issue receives more π , I could prioritize it higher. π
@im2nguyen , thanks a lot for the reply. But a quick question on the standalone flag. Please correct me if I'm wrong, the source node port number has to be random write
<random port>:9000
Otherwise, it won't support parallelism right?
Hi @smartaquarius10, with the standalone flag, Rover generates a zip with the assets. It doesn't spin up the webserver, so there will be no port conflicts
@im2nguyen , Got it. Thanks a lot for the details. Take careπ
Re-opening as reference for making Rover a Terraform Cloud run task