Follow these steps to deploy a Vespa application to the dev zone on Vespa Cloud (for free).
Alternative versions of this guide:
Setup:
Create a tenant on Vespa Cloud:
Go to console.vespa-cloud.com and create your tenant (unless you already have one).
Install the Vespa CLI using Homebrew:
$ brew install vespa-cli
Windows/No Homebrew? See the Vespa CLI page to download directly.
Configure the Vespa client:
$ export VESPA_CLI_HOME=$PWD/.vespa
$ vespa config set target cloud $ vespa config set application vespa-team.autotest
Use the tenant name from step 1 instead of "vespa-team", and replace in other steps in this example guide, too.
Get Vespa Cloud control plane access:
$ vespa auth login
Follow the instructions from the command to authenticate.
Clone a sample application:
$ vespa clone album-recommendation myapp && cd myapp
See sample-apps for other sample apps you can clone.
Add a certificate for data plane access to the application:
$ vespa auth cert app
It is a good idea to take note of the path to the .pem files written here.
Steps:
Deploy the application:
$ vespa deploy --wait 600 ./app
The first deployment may take a few minutes while nodes are provisioned.
$ vespa feed dataset/documents.jsonl
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.
$ vespa destroy --force