Giter Site home page Giter Site logo

Comments (9)

captaindanila avatar captaindanila commented on June 11, 2024 8

What you can currently do is to create your plan through terraform and parse it as json to rover:

terraform plan -out plan.out
terraform show -json plan.out > plan.json

docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover:latest -planJSONPath=plan.json

That's how I'm currently running rover due to plugins issues

from rover.

lkurzyniec avatar lkurzyniec commented on June 11, 2024 5

What you can currently do is to create your plan through terraform and parse it as json to rover:

terraform plan -out plan.out
terraform show -json plan.out > plan.json

docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover:latest -planJSONPath=plan.json

That's how I'm currently running rover due to plugins issues

It works like a charm! šŸ’£

You can even simplify the command to send just a plan file: docker run --rm -it -p 9000:9000 -v $(pwd)/plan.json:/src/plan.json im2nguyen/rover:latest -planJSONPath=plan.json

image

image

Worth mention that plan.json file should be generated in Linux version - Unix (LF), UTF-8. My first try ended up with an error because I generated it on Windows (CR LF, UTF-16).

@captaindanila IMHO worth adding this approach (run capability) into the README file.

from rover.

yu-iskw avatar yu-iskw commented on June 11, 2024

@captaindanila That looks like what I am looking for. I will give it a try. Thank you.

from rover.

yu-iskw avatar yu-iskw commented on June 11, 2024

@lkurzyniec Sorry for the delay of my reply. I made sure the measure enables me to start the server and generate the zip file. Thank you.

#115 (comment)

Let me another question to generate a SVG image with the measure. I tried to use the -genImage option with a pre-made plan.json using the docker image. However, it didn't create a SVG image. Is there any way to solve the issue?

$ docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover:latest -planJSONPath=plan.json -genImage true -standalone true
2023/09/22 00:02:22 Starting Rover...
2023/09/22 00:02:22 Using provided JSON plan...
2023/09/22 00:02:22 Generating resource overview...
2023/09/22 00:02:22 No submodule configurations found...
2023/09/22 00:02:22 Generating resource map...
2023/09/22 00:02:22 Generating resource graph...
2023/09/22 00:02:22 Done generating assets.
2023/09/22 00:02:22 Rover is running on 0.0.0.0:9000
2023/09/22 00:02:23 context canceled

$ docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover:latest -planJSONPath=plan.json -genImage 
2023/09/22 00:02:32 Starting Rover...
2023/09/22 00:02:32 Using provided JSON plan...
2023/09/22 00:02:32 Generating resource overview...
2023/09/22 00:02:32 No submodule configurations found...
2023/09/22 00:02:33 Generating resource map...
2023/09/22 00:02:33 Generating resource graph...
2023/09/22 00:02:33 Done generating assets.
2023/09/22 00:02:33 Rover is running on 0.0.0.0:9000
2023/09/22 00:02:34 context canceled

from rover.

yu-iskw avatar yu-iskw commented on June 11, 2024

According to my research, rover take a screenshot using github.com/chromedp/chromedp. The documentations describes the error. But, I haven't understand we can handle it with the docker image of rover.

I'm seeing "context canceled" errors

When the connection to the browser is lost, chromedp cancels the context, and it may result in this error. This occurs, for example, if the browser is closed manually, or if the browser process has been killed or otherwise terminated.

https://github.com/chromedp/chromedp#frequently-asked-questions

from rover.

lkurzyniec avatar lkurzyniec commented on June 11, 2024

@yu-iskw everything is working fine. Here is my command and result:
image

from rover.

yu-iskw avatar yu-iskw commented on June 11, 2024

@lkurzyniec Thank you for sharing the screen capture. I am assuming there is anything wrong with the consiguration of docker on my machine. I am going to look into it more.

  • MacOS: 12.5.1
  • Docker Desktop: 4.22.1 (118664)
  • docker: 24.0.5, build ced0996

Tough I built a docker image with the rover repository, that doesn't work. And I tried a couple of values to --platform option of the docker command, that doesn't solve my issue.

from rover.

lkurzyniec avatar lkurzyniec commented on June 11, 2024

@yu-iskw double-check your JSON terraform plan file

Worth mention that plan.json file should be generated in Linux version - Unix (LF), UTF-8. My first try ended up with an error because I generated it on Windows (CR LF, UTF-16).

from rover.

yu-iskw avatar yu-iskw commented on June 11, 2024

Thanks. Indeed, Iā€™m able to launch the sever of rover and generate the static HTML with the docker image. I think the plan.json file is probably fine. I will investigate something around chromedp, as apparently there is any issue to internally launch it to capture an screenshot inside the docker container on my laptop.

from rover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.