This is a Spring Boot application for demonstration purposes.
- Java AdoptOpenJDK 17 or better
- Gradle 8.4
- CF CLI 6.51.0 or better if you want to push the application to a Cloud Foundry (CF) instance
- Postman 10.18 or better to simplify interaction with API endpoints
$ git clone https://github.com/pacphi/track-shipments.git
$ cd track-shipments
$ gradle clean install
$ gradle bootRun
Press
Ctrl+C
to exit.
$ cf api {CF_INSTANCE_URL}
$ cf login
When prompted supply account credentials. Then execute...
$ cf target -o {ORG} -s {SPACE}
to target an appropriate organization and space.
$ cf push
$ gradle cf-push -Pcf.ccHost={CF_INSTANCE_URL} -Pcf.ccUser={CF_USER} -Pcf.ccPassword={CF_PASSWORD} -Pcf.org={ORG} -Pcf.space={SPACE}
$ gradle cf-push-blue-green -Pcf.ccHost={CF_INSTANCE_URL} -Pcf.domain={CF_DOMAIN} -Pcf.ccUser={CF_USER} -Pcf.ccPassword={CF_PASSWORD} -Pcf.org={ORG} -Pcf.space={SPACE}
cf delete track-shipments
This collection is a work-in-progress:
POST /shipments
PUT /shipments/{tracking_number}
DELETE /shipments/{tracking_number}
GET /shipments
GET /shipments/{tracking_number}
GET /shipments/{tracking_number}/addressFrom
GET /shipments/{tracking_number}/addressTo
Found in the /scripts
directory
Script | Description |
---|---|
create-environments.sh | Creates accounts, org, and spaces. |
destroy-environments.sh | Deletes accounts, org, and spaces that were created. |
deploy-to-multiple-environments.sh | Executes a gradle cf-push with an account to org and spaces (as configured). |
deploy-to-staging.sh | Executes a gradle cf-push with an account to staging environment (org/space). |
- Sign up for an account on loader.io.
- Configure a new test.
- Before you're able to execute a load test run you will be asked to place a loader.io file token. Download and save the file to
src/main/resources/static
.