Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run gcpviz #1231

Open
BachateroJ opened this issue Mar 17, 2024 · 2 comments
Open

Unable to run gcpviz #1231

BachateroJ opened this issue Mar 17, 2024 · 2 comments

Comments

@BachateroJ
Copy link

Im trying to install and run gcpviz on my environment, i installed it locally on my ubuntu linux, as well as graphviz.

asf-VirtualBox:~$ go version
go version go1.22.1 linux/amd64

i installed the tool using the following command
go install github.com/GoogleCloudPlatform/professional-services/tools/gcpviz/cmd/gcpviz@latest

asf-VirtualBox:~/professional-services/tools$ gcpviz
gcpviz: command not found

@rosmo
Copy link
Collaborator

rosmo commented Mar 17, 2024

Binaries built with go generally land in $GOPATH/bin (by default ~/go/bin, eg. under your home directory). So something like ~/go/bin/gcpviz should work.

@BachateroJ
Copy link
Author

it works, thank you.

if i got it correct, then it should work right? i need to get a diagram of my environment:

  1. Creating a bucket to store the diagram
  2. Issuing the command:
    export ORGANIZATION_ID=
    export CAI_BUCKET_NAME=
    gcloud asset export
    --content-type resource
    --organization $myorg
    --output-path "gs://$CAI_BUCKET_NAME/resource_inventory.json"
  3. generate graph file:
    gcpviz -resource-inventory-file resource_inventory.json -mode generate
  4. create graph:
    gcpviz -query-file queries/gke.js -mode visualize > gke.gv
    dot -Kneato -Tsvg -Gdpi=60 gke.gv -o gke.svg

also, how do i run the built-in jsons that you provided?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants