opa bundle demo

koans for OPA

opa bundle demo

A quick demo of how to use opa bundle

bundle-demo-arch

View demo code in github

Covered

Cmd usage

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>

Slim version

prometheus metrics

# start
sh bundle/start.sh start
# test opa api
sh bundle/start.sh opa-ping
# stop
sh bundle/start.sh stop

Advanced version

Include addition service

When you want to see prometheus collected metrics:

grafana 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.

asciicast

Some references: