Start the database, Voyager, and the application
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
In this step you start a local Aerospike Database, connect Aerospike Voyager to it, and launch the FastAPI retail application that you implement throughout the rest of this tutorial. By the end of this step you have all three processes running and you can confirm, using both the application logs and Voyager, that the database is reachable but that the application’s data-access methods do not yet write product records.
This step assumes you have completed the tutorial prerequisites: Docker, Python 3.10+, and Voyager are installed, and the workshop repository is cloned.
Start the local Aerospike Database
The sample application’s docker-compose.yml starts a single-node Aerospike Database in a container named aerospike-workshop and exposes the client port on localhost:3000.
-
From the
aerospike-client-sdk-workshoprepository root, start the database in detached mode.Terminal window docker compose up -d[+] Running 3/3✔ Network aerospike-client-sdk-workshop_default Created 0.0s✔ Volume "aerospike-client-sdk-workshop_aerospike-data" Created 0.0s✔ Container aerospike-workshop Started 0.2sExample response Docker Compose redraws the progress block several times while it brings the network, volume, and container up. The final block, with
Startednext toaerospike-workshop, indicates that startup succeeded. -
Confirm the container is running and reports a healthy status.
Terminal window docker ps --filter name=aerospike-workshopCONTAINER ID IMAGE STATUS PORTS NAMESc9318d9eb3e3 aerospike/aerospike-server:latest Up 10 seconds (healthy) 0.0.0.0:3000-3003->3000-3003/tcp aerospike-workshopExample response The container reports
Upwith a(healthy)annotation and exposes ports3000to3003. If the container is not present, rundocker compose logs aerospike-workshopto see why startup failed.
Launch Voyager and connect to the cluster
Voyager opens with three columns: a left-hand sidebar with Data Browser, MCP Server, and Settings. A Clusters pane lists your clusters under My clusters. A right-hand column shows details for the selected cluster.
-
Launch Voyager.
-
In the cluster list (middle column), select Connect cluster.
-
Enter the connection details for the local Docker cluster.
The Docker container starts with security and TLS disabled, so the only fields you need to set are the cluster name, seed host, and port. Use the values shown in the Connect cluster dialog:
Field Value Name Retail Demo(or any name you prefer)Host localhostPort 3000TLS Off Username / Password Leave blank
-
Select the Connect button.
The new cluster appears in the cluster list with a green status indicator.
-
Select the cluster in the cluster list to open it.
Voyager opens a tab named after the cluster and shows one namespace named
testin the right-hand panel. Docker Compose mounts the workshop’sconfig/aerospike/aerospike.conf, which defines that namespace for the local container.
The
testnamespace card reports0 SETSand0records because no data has been written to the database yet.
Run the FastAPI application
The FastAPI application uses the new-client profile, which selects the implementation class you edit in later steps (KeyValueServiceNewClient). Set the profile with the AEROSPIKE_CLIENT_PROFILE environment variable. The application listens on port 8080, creates five secondary indexes, and auto-loads 200 sample JSON files from the data/styles/ folder.
-
Change into the
python-serverdirectory and install the application in editable mode.Terminal window cd python-serverpython -m pip install -e .Successfully installed aerospike-client-sdk-workshop-python-1.0.0 aerospike-sdk-...Example response -
Run the application with the
new-clientprofile.Terminal window AEROSPIKE_CLIENT_PROFILE=new-client AEROSPIKE_PORT=3000 \uvicorn aerospikeworkshop.main:app --host 0.0.0.0 --port 8080The application logs include several lines that confirm a successful startup. Uvicorn prints a few lifecycle lines around the application’s own startup messages:
INFO: Started server process [70821]INFO: Waiting for application startup.INFO: Started with client profile: new-clientINFO: Created secondary index: cat_idx on bin categoryINFO: Created secondary index: subCat_idx on bin subCategoryINFO: Created secondary index: usage_idx on bin usageINFO: Created secondary index: brand_idx on bin brandNameINFO: Created secondary index: article_idx on bin articleTypeINFO: Auto-loading sample data from /.../aerospike-client-sdk-workshop/dataINFO: Auto-load complete: processed 200/200 sample files (0 errors); 0 products in products set; category metadata updated in cat_index setINFO: Application startup complete.INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)Example response The auto-loader processes every sample JSON file under
data/styles/. With the skeletonnew-clientprofile, each file is parsed and category metadata is written to thecat_indexset throughload_categories, butstore_productis still a stub, so no records land in theproductsset. That is why the log reports0 products in products seteven though it also reportsprocessed 200/200 sample files. A file counts as processed when parsing and category loading succeed without an exception—not when a product record is stored.
Confirm the empty state in the application UI and in Voyager
The new-client profile selects KeyValueServiceNewClient. The data-access methods you implement in the next section are stubbed out: store_product is a no-op and query returns empty lists. Auto-load still writes category metadata to the cat_index set through load_categories, so the category dropdowns may populate, but no product records reach the products set until you implement store_product. You implement these methods in the next section.
-
Open the application in your browser at http://localhost:8080.
The category dropdowns at the top populate because auto-load writes category metadata, but the product rows for Shoes, Bags, Wallets, Watches, and Headwear are empty.
-
Switch to Voyager and select Refresh in the cluster details panel.
After refresh, the
testnamespace shows 2 sets:cat_indexwith 1 record (category metadata from auto-load) andproductswith 0 records. That confirms the stubstore_productmethod never wrote product records to the cluster.
Outcomes
You now have:
- A single-node Aerospike Database running in Docker on
localhost:3000. - Voyager connected to that database, with the
testnamespace visible. - The FastAPI retail application running on
localhost:8080with thenew-clientprofile selected.
You cannot yet:
- See products on the home page.
- Filter products by category, article type, usage, or brand.
- Add items to a shopping cart.
In the next section you implement the data-access methods that fill these gaps. Leave Voyager and the FastAPI application running. Stop and restart the server each time you change Python code (or use --reload). You can leave Voyager open and select Refresh after each change.