gururajarao79 | 542b9d1 | 2024-11-22 14:28:41 +0100 | [diff] [blame] | 1 | curl -u 'policyadmin:zb!XztG34' --header "Content-Type:application/yaml" -X POST --data-binary @policy-new.yaml http://localhost:30002/policy/api/v1/policytypes |
| 2 | |
| 3 | # policy-new.yaml is inside test directory to create policy |
| 4 | #check policy-api logs |
| 5 | |
| 6 | |
| 7 | //Create Groups |
| 8 | |
| 9 | curl -u 'policyadmin:zb!XztG34' --header "Content-Type:application/json" -X POST --data-binary @Opagroup.json http://localhost:30003/policy/pap/v1/pdps/groups/batch |
| 10 | |
| 11 | #Check policy-pap logs |
| 12 | #file Opagroup.json is inside test |
| 13 | |
| 14 | // Sends registration message to policy-pdp-pap |
| 15 | |
| 16 | docker exec -it kafka /bin/sh |
| 17 | |
| 18 | echo '{"messageName": "PDP_STATUS", "requestId": "e9b4ee77-5400-41a8-87ba-3c914a86ee08", "timestampMs": "1728551661460","name": "opa-2e953ecf-40f1-47f7-8a5e-53031947516c","pdpGroup": "opaGroup","pdpSubgroup": null, "pdpType": "opa","state": "PASSIVE","healthy": "HEALTHY", "description": null, "policies": []}' | kafka-console-producer --broker-list kafka:9092 --topic policy-pdp-pap |
| 19 | |
| 20 | |
| 21 | #To get Gracefulshutdown signals commented command and changed entrypoint to /app/opa-pdp |