---
title: "Install and connect"
description: "Start Aerospike in Docker, install Feast with the Aerospike extra, and verify connectivity."
---

# Install and connect

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

Start Aerospike through Docker, install Python packages, and confirm the Aerospike online store is importable.

## Start Aerospike Database

1.  Start Aerospike in Docker:
    
    Terminal window
    
    ```shell
    docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server
    ```
    
    This image runs Aerospike Database Community Edition (CE). The tutorial uses standard client operations supported by both CE and Enterprise Edition.
    
2.  Verify the database is listening on port 3000:
    
    Terminal window
    
    ```shell
    nc -z localhost 3000 && echo 'Aerospike database is running.'
    ```
    
    Expected result
    
    ```plaintext
    Connection to localhost port 3000 [tcp/hbci] succeeded!
    
    Aerospike database is running.
    ```
    
    On Windows, `nc` is not available. Use this PowerShell command instead:
    
    Terminal window
    
    ```powershell
    Test-NetConnection -ComputerName localhost -Port 3000
    ```
    
    A successful result shows `TcpTestSucceeded : True`.
    

::: tip
If a container named `aerospike` already exists from a previous run, remove it with `docker rm -f aerospike` before starting another container.
:::

## Install Python packages

1.  Create and activate a virtual environment:
    
    Terminal window
    
    ```shell
    python3 -m venv .venv
    
    source .venv/bin/activate
    ```
    
    On Windows, run this command inside WSL 2.
    
2.  Upgrade pip and install the Aerospike client:
    
    Terminal window
    
    ```shell
    python3 -m pip install --upgrade pip
    
    python3 -m pip install "aerospike>=19"
    ```
    
    The Aerospike online store’s package dependencies require Aerospike Python client 19 or newer.
    
3.  Install Feast with the `aerospike` extra:
    
    Terminal window
    
    ```shell
    python3 -m pip install "feast[aerospike] @ git+https://github.com/feast-dev/feast.git@294efad94b20e1336df906fe7d48ca38b39c4183"
    ```
    
    ::: note
    The Aerospike online store is not in a stable PyPI release. This tutorial pins Feast commit `294efad94b20e1336df906fe7d48ca38b39c4183`, the revision used for tutorial verification. Update all three Feast tutorials together when a stable release includes the integration.
    :::
    
4.  Verify imports:
    
    Terminal window
    
    ```shell
    python3 -c "
    
    from feast.infra.online_stores.aerospike_online_store import AerospikeOnlineStoreConfig
    
    print('ok')
    
    "
    ```
    
    Expected result
    
    ```plaintext
    ok
    ```
    

## Verify Aerospike connectivity

1.  Run a connectivity check with the Aerospike Python client:
    
    Terminal window
    
    ```shell
    python3 -c "
    
    import aerospike
    
    client = aerospike.client({'hosts': [('127.0.0.1', 3000)]}).connect()
    
    client.close()
    
    print('Connected to Aerospike.')
    
    "
    ```
    
    Expected result
    
    ```plaintext
    Connected to Aerospike.
    ```
    
    Compare your terminal output to the expected result to verify that the Python client connected to Aerospike Database in Docker.
    

Aerospike and Feast are both installed. Read [What the record holds](https://aerospike.com/docs/develop/feast-aerospike-online-store/step/2/part/0/entity-record-layout#what-the-record-holds) to learn how Feast maps entities and feature views to Aerospike records before you define a feature repository.

::: undefined
-   I’ve started Aerospike Database in Docker.
-   I’ve installed feast\[aerospike\] and Aerospike Python client 19+.
-   I’ve verified Aerospike is reachable.
:::

[Previous  
Prerequisites](https://aerospike.com/docs/develop/feast-aerospike-online-store/step/1/part/0/prerequisites) [Next  
Entity and feature view record layout](https://aerospike.com/docs/develop/feast-aerospike-online-store/step/2/part/0/entity-record-layout)