Getting Started with the Vespa Cloud

Follow these steps to deploy your first application to the dev zone in the Vespa Cloud.

There is also a version on this that requires Maven and Java if you plan to add Java components to your application.

Prerequisites: Git, OpenSSL, zip and curl.

  1. Create an application in the Vespa Cloud

    Log in to and click "Create application".

    This requires a Google or GitHub account, and will start your free trial if you don't already have a Vespa Cloud tenant.

  2. Make a local application source

    To start with the album-recommendation sample app:

    $ git clone --depth 1
    $ cd sample-apps/vespa-cloud/album-recommendation
  3. Create a self-signed certificate

    This certificate and key will be used to send requests to Vespa Cloud later.

    $ openssl req -x509 -nodes -days 14 -newkey rsa:4096 \
      -subj "/CN=cloud.vespa.example" \
      -keyout data-plane-private-key.pem -out data-plane-public-cert.pem
    $ mkdir -p src/main/application/security
    $ cp data-plane-public-cert.pem src/main/application/security/clients.pem

    See the security model for more details.

  4. Create the application package

    $ (cd src/main/application && zip -r ../../../ .)
  5. Deploy the application

    In the Vespa console, click Deploy on the application created in the start of this guide. In the "Deploy to dev" section, upload - click Deploy.

    You can also do this on the command line with maven.

    The first deployment may take a few minutes.

  6. Verify that you can reach the application endpoint

    You can find the endpoint in the console.

    $ curl --cert data-plane-public-cert.pem --key data-plane-private-key.pem $ENDPOINT

    You can also do this in a browser.

  7. Write some data

    Write three documents using the document api:

    $ curl --cert data-plane-public-cert.pem --key data-plane-private-key.pem \
      -H "Content-Type:application/json" --data-binary @src/test/resources/A-Head-Full-of-Dreams.json \
    $ curl --cert data-plane-public-cert.pem --key data-plane-private-key.pem \
      -H "Content-Type:application/json" --data-binary @src/test/resources/Love-Is-Here-To-Stay.json \
    $ curl --cert data-plane-public-cert.pem --key data-plane-private-key.pem \
      -H "Content-Type:application/json" --data-binary @src/test/resources/Hardwired...To-Self-Destruct.json \
  8. Send queries

    Send a user profile as a query to get album recommendations:

    $ curl --cert data-plane-public-cert.pem --key data-plane-private-key.pem \

Next steps