⚠️ This repository is now deprecated and will receive no further updates. Users are advised to use the Keptn Lifecycle Toolkit instead.
This service creates tickets in OSTicket when a keptn evaluation (sh.keptn.event.start-evaluation
) is performed. The service subscribes to the following keptn events:
sh.keptn.events.evaluation-done
To use this service, you need a running OSTicket system. If you need to create one, use the osTicketInstall.sh
file in the osticket-setup-files
folder.
cd ~/keptn-osticket-service/osticket-setup-files
chmod +x osTicketInstall.sh && chmod +x cleanup.sh
./osTicketInstall.sh
After installation, you'll get an HTTP 500 error. Just refresh the page. Then run the cleanup script.
./cleanup.sh
You will require an OSTicket API key with Create Ticket
permissions.
- Go to
http://OSTICKET-IP/scp/apikeys.php?a=add
generate an API key (use the Keptn IP). - Make a note of the OSTicket URL. It should be like:
http://123.111.222.333
(without trailing slash). - Make a note of the OSTicket API key you created.
- Clone this repo onto the keptn machine.
- Create a secret to hold the OSTicket URL, API Key (substituting the values for your values below):
kubectl create secret generic osticket-details -n keptn --from-literal=url='http://1.2.3.4' --from-literal=api-key='abcd1234'
- Use kubectl to apply both the
osticket-service.yaml
andosticket-distributor.yaml
files on the keptn cluster:
cd ~/keptn-osticket-service
kubectl apply -f osticket-service.yaml -f osticket-distributor.yaml
Expected output:
deployment.apps/osticket-service created
service/osticket-service created
deployment.apps/osticket-service-distributor created
kubectl -n keptn get pods | grep osticket
Expected output:
osticket-service-*-* 1/1 Running 0 45s
osticket-service-distributor-*-* 1/1 Running 0 45s
Now start an evaluation and wait for the ticket to be created. Note: You must have your services tagged with keptn_project
, keptn_service
and keptn_stage
.
keptn send event start-evaluation --project=*** --stage=*** --service=*** --timeframe=2m
All incoming events from Keptn to the service are logged in raw form to /var/www/html/logs/osticketIncomingEvents.log
of the osticket-service
pod.
kubectl exec -itn keptn osticket-service-*-* cat /var/www/html/logs/osticketIncomingEvents.log
Keptn Version | OSTicket Service for Keptn | OSTicket Version |
---|---|---|
0.6.1 | adamgardnerdt/keptn-osticket-service | v1.14.1 |
Please raise a GitHub issue or join the Keptn Slack channel.