Vespa Cloud This page's content is applicable to Vespa Cloud.

Getting Started

This lets you deploy an application to the dev zone on Vespa Cloud for free.

Alternative versions of this guide:

Steps:

  1. Create a tenant on Vespa Cloud:

    Go to console.vespa-cloud.com and create your tenant (unless you already have one).

  2. Install the Vespa CLI using Homebrew (Windows/No Homebrew? See the Vespa CLI page):

    $ brew install vespa-cli
    
  3. Configure the Vespa client:

    $ vespa config set target cloud && \
      vespa config set application tenant-name.myapp
    
    $ export VESPA_CLI_HOME=$PWD/.vespa TMPDIR=$PWD/.tmp
    $ mkdir -p $TMPDIR
    $ vespa config set target cloud
    $ vespa config set application vespa-team.album-rec-java
    

    Use the tenant name from step 2.

  4. Get Vespa Cloud control plane access:

    $ vespa auth login
    
    $ export VESPA_CLI_API_KEY="$(echo "$VESPA_TEAM_API_KEY" | openssl base64 -A -a -d)"
    

    Follow the instructions from the command to authenticate.

  5. Clone a sample application:

    $ vespa clone album-recommendation myapp && cd myapp
    

    See sample-apps for other sample apps you can clone.

  6. Add a certificate for data plane access to the application:

    $ vespa auth cert app
    
  7. Deploy the application:

    $ vespa deploy --wait 600 ./app
    

    The first deployment may take a few minutes while nodes are provisioned.

  8. Feed documents:

    $ vespa feed dataset/documents.jsonl
    
  9. Run queries:

    $ vespa query "select * from music where album contains 'head'"
    
    $ vespa query \
      "select * from music where true" \
      "ranking=rank_albums" \
      "ranking.features.query(user_profile)={{cat:pop}:0.8,{cat:rock}:0.2,{cat:jazz}:0.1}"
    

Congratulations, you have deployed your first Vespa application! Application instances in the dev zone will by default keep running for 14 days after the last deployment. You can control this in the console.

Next steps