add tooling for basic testing of notification webhooks

This commit is contained in:
Jake McDermott 2019-06-24 15:56:10 -04:00 committed by beeankha
parent 6e9f74eb17
commit 2b74b6f9b6
3 changed files with 22 additions and 0 deletions

View File

@ -583,6 +583,9 @@ docker-compose-credential-plugins: docker-auth
echo -e "\033[0;31mTo generate a CyberArk Conjur API key: docker exec -it tools_conjur_1 conjurctl account create quick-start\033[0m"
CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose -f tools/docker-compose.yml -f tools/docker-credential-plugins-override.yml up --no-recreate awx
docker-compose-notifications: docker-auth
CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose -f tools/docker-compose.yml -f tools/docker-notifications-override.yml up --no-recreate awx
docker-compose-test: docker-auth
cd tools && CURRENT_UID=$(shell id -u) OS="$(shell docker info | grep 'Operating System')" TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /bin/bash

View File

@ -218,6 +218,14 @@ https://gist.github.com/matburt/73bfbf85c2443f39d272
The link below shows how to define an endpoint and parse headers and json content. It doesn't show how to configure Flask for HTTPS, but is fairly straightforward:
http://flask.pocoo.org/snippets/111/
You can also link an httpbin service to the development environment for testing webhooks using:
```
make docker-compose-notifications
```
This will create an `httpbin` service reachable from the awx container at `http://httpbin/post`, `http://httpbin/put`, etc. Outside of the container, you can reach the service at `http://localhost:8204`.
## Grafana

View File

@ -0,0 +1,11 @@
version: '2'
services:
# Primary Tower Development Container link
awx:
links:
- httpbin
httpbin:
image: kennethreitz/httpbin
container_name: tools_httpbin_1
ports:
- '8204:80'