To-do List Runner
Create and deploy a CRUD runner backed by MongoDB. This runner will store to-do items in a `todo` collection and expose standard read/write endpoints for the rest of the exercise.
This exercise creates the backend microservice for the to-do list. You will define the MongoDB-backed state, wire it into a CRUD runner, deploy it, and confirm it responds to basic read/write calls.
Before you start
You can access the Devops app.
The platform has a MongoDB system Element available (typically
system-mongo_master-0001).You know your Admin UI base URL:
https://[YOUR_ADMIN_UI_DOMAIN].
If you are on a Sandbox deployment, UI-based deployments may be disabled. You can still complete the design steps. For runtime, you may need to add the runner to an existing deployment and restart the container(s).
What you’ll build
State Element:
state-todo-0001backed by MongoDB collectiontodoRunner:
todo-0001based on Base CRUDDeployment (K8s example):
example-0001Runner endpoints (internal):
/api/todo/todo
Open the Elements screen
Open the Elements screen from the Devops app.
Unless you changed routing, the UI is at https://[YOUR_ADMIN_UI_DOMAIN]/app/devops/common/element.

Create a State Element (MongoDB collection)
Click CREATE NEW to start a blank Element.

Assign the Element ID from the top-left ID: field:
state-todo-0001
Fill in the DEFINITION and STATE DEFINITION tabs and save:

DEFINITION
Element Name:
TodoElement Type:
STATEElement Status:
ACTIVEElement Description (optional):
Example todo list data store
STATE DEFINITION
Manager:
Mongo State ManagerSystem:
mongo_masterCollection:
todo
This creates a state backed by MongoDB Collection. It reuses the existing mongo_master system configuration.
Open the Runner screen
Open the Runners screen from the Devops app.
Unless you changed routing, the UI is at https://[YOUR_ADMIN_UI_DOMAIN]/app/devops/common/runner.

Create a CRUD runner
Click CREATE NEW and set the Runner ID:
todo-0001
Click the Definition icon (circled edit icon) to open runner metadata.

Fill in:

Runner Name:
TodoRunner Status:
ACTIVERunner Domain (optional):
adminBase Runners:
Base CRUDRunner Description (optional):
CRUD runner for todo list management.
Close the dialog to apply changes.
Configure the System member (mongo_master)
Select the System node. Click the pencil icon.

Set:
Element:
system-mongo_master-0001Member Type:
OPERATIONAlias:
mongo_masterDescription (optional):
MongoDB system for master collections
Click APPLY.
Optional: open the ELEMENT tab to review the system parameters.

Configure the State member (todo)
Select the State node. Click the pencil icon.

Set:
Element:
state-todo-0001Member Type:
OPERATIONAlias:
todoDescription (optional):
State for todo list records
Click APPLY.
At this point, the runner has everything it needs to execute CRUD operations. Save the runner.
Create a Deployment (K8s environments)
Open the Deployments screen from the Devops app.
Unless you changed routing, the UI is at https://[YOUR_ADMIN_UI_DOMAIN]/app/devops/common/deployment.
Click CREATE NEW and set the Deployment ID:
example-0001
Fill in DEFINITION:

Name:
Example RunnersStatus:
ACTIVEDescription (optional):
Deployment package for execution of example runnersRunners
Name:
todoClass:
CRUD RunnerElement:
todo-0001Deployment Version:
1
Switch to PARAMETERS and set (adjust to your environment):

rierinoVersion:
ENTER YOUR VERSIONtemplate:
springnamespace:
admin-backendpool:
admin-node-pool
Click SAVE.
Test the runner (without gateway)
In most K8s setups, runners are not publicly exposed. They are reachable from inside the cluster or through Gateway Servers.
If you want to test immediately, exec into the runner pod:
kubectl exec -ti --namespace=admin-backend deployment/runner-example-0001-deployment -- /bin/bashThen call the local endpoints:
# should return status:"UP"
curl localhost:1235/actuator/health
# should return the newly created record
curl -X POST -H "Content-Type: application/json" \
-d '{"data": {"name": "Take out trash", "project": "Personal"}}' \
localhost:1235/api/todo/todo/1
# should return a list including the new record
curl localhost:1235/api/todo/todoOnce these work, you are ready to expose the service through the gateway.
Next step
Expose the runner over an external API path in To-do List Gateway.
Troubleshooting
Can’t find
system-mongo_master-0001: confirm your installation includes the default Mongo system element. If not, create a Mongo System Element first.State writes fail: confirm
mongo_masterpoints to a reachable MongoDB and that the user has write access./actuator/healthnot reachable: the deployment may still be starting. Check pod status and logs.UI deployment disabled: you are likely on Sandbox. Apply the runner to an existing deployment and restart the container(s).
Last updated



