koans for OPA
A quick demo of how to use opa bundle
View demo code in github
sh bundle/start.sh
Usage:
slim-version monitor: start, stop
advance-version monitor: start-advance, stop-advance
container logs: logs <container name>
clean all container: clean
test opa service: opa-ping
query opa decision: decision-log <decision_id>
rbac.tar.gz
from demo-server, and upload decision-log, report status
See config: opa/config-bundle.yaml
opa/config-bundle.yaml
See config: opa/config-discovery.yaml
0.0.0.0:8888/auth
# start
sh bundle/start.sh start
# test opa api
sh bundle/start.sh opa-ping
# stop
sh bundle/start.sh stop
Include addition service
When you want to see prometheus collected metrics:
# start
sh bundle/start.sh start-advance
# test opa api
sh bundle/start.sh opa-ping
# stop
sh bundle/start.sh stop-advance
You can change these config to test it locally, hoping it can help you to understand opa bundle more easily.
More info see scripts/bundleVerify.sh
, which is used for opa-koans’s github action now.
Some references: