Skip to content

Run OPA locally with multiple bundle files #466

Discussion options

You must be logged in to vote

Yeah, this is possible. You just need to set the roots in the bundle manifests.

$ tree -a .
.
├── bundle1
│   ├── .manifest
│   └── pkg.rego
├── bundle1.tar.gz
├── bundle2
│   ├── .manifest
│   └── pkg.rego
└── bundle2.tar.gz

2 directories, 6 files

tmp.M6tGVplX $ cat bundle1/pkg.rego 
package bundle1

pkg := "bundle1"

tmp.M6tGVplX $ cat bundle1/.manifest 
{"roots": ["bundle1"]}

tmp.M6tGVplX $ cat bundle2/pkg.rego 
package bundle2

pkg := "bundle1"

tmp.M6tGVplX $ cat bundle2/.manifest 
{"roots": ["bundle2"]}

tmp.M6tGVplX $ opa build -b bundle1 -o bundle1.tar.gz
tmp.M6tGVplX $ opa build -b bundle2 -o bundle2.tar.gz
tmp.M6tGVplX $ opa run -s -b bundle1.tar.gz -b bundle2.tar.gz
{"addrs"…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mason-liu
Comment options

Answer selected by mason-liu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants