new command for init opa
@@ -152,10 +152,6 @@ def services_start(args):
elif args.service_name == 'opa':
run = ['docker', 'run', '-ti', '--rm', '-p', '8181:8181', 'openpolicyagent/opa:0.9.1', 'run', '--server', '--log-level=debug']
execute(run)
- elif args.service_name == 'opacopy':
- p = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'src', 'openpolicyagent')
- run = os.path.join(p, 'run_opa.sh')
- execute(['bash', run], cwd=p)
elif args.service_name == 'dashboard-client':
p = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'src', 'dashboard-client')
execute(['npm', 'run', 'dev'], cwd=p)
@@ -199,6 +195,12 @@ def changelog_create(args):
command.append(repo_name)
execute(command, cwd=os.getcwd())
+def init_opa(args):
+ p = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'src', 'openpolicyagent')
+ run = os.path.join(p, 'run_opa.sh')
+ execute(['bash', run], cwd=p)
+
+
def main():
parser = argparse.ArgumentParser(prog="ib")
@@ -247,6 +249,13 @@ def main():
create_changelog_parser.set_defaults(func=changelog_create)
create_changelog_parser.add_argument("--token", required=False)
+ #OpenPolicyAgent
+ opa = cmd_parser.add_parser('opa')
+ sub_opa = opa.add_subparsers()
+
+ opa_init_parser = sub_opa.add_parser('init')
+ opa_init_parser.set_defaults(func=init_opa)
+
args = parser.parse_args()
args.func(args)
