Production zones enable serving from various locations,
with a CI/CD pipeline for safe deployments.
This guide goes through the minimal steps for a production deployment - in short:
$ vespa config set target cloud
$ vespa config set application mytenant.myapp
$ vespa auth login
The tenant name is found in the console, the application is something unique within your organization -
see tenants, applications and instances.
Add public certificate
Just as in the getting started guide,
the application package needs the public key in the security directory.
You might already have a pair, if not generate it:
$ vespa auth cert -f
Success: Certificate written to security/clients.pem
Success: Certificate written to /Users/me/.vespa/mytenant.myapp.default/data-plane-public-cert.pem
Success: Private key written to /Users/me/.vespa/mytenant.myapp.default/data-plane-private-key.pem
Observe that the files are put in $HOME/.vespa.
The content from data-plane-public-cert.pem is copied to security/clients.pem.
More details on data-plane access control permissions.
Deploy the application
Package the application and deploy it to a production zone:
$ vespa prod deploy
Find alternative deployment procedures in the next sections.
Note:
The vespa prod deploy command to prod zones,
which uses deployment.xml
differs from the vespa deploy command used for dev/perf zones - see
environments.
Add a public certificate to security/clients.pem.
See creating a self-signed certificate
for how to create the key/cert pair, then copy the cert file to security/clients.pem.
At this point, the files are ready for deployment.
Click Create Application in the console.
Select the PROD tab.
Enter a name for the application and drop the application.zip file in the upload section.
Click Create and deploy to deploy the application to the production environment.
Production deployment with components
Deploying an application with Components
is a little different from above:
The application package root is at src/main/application.
Find the Vespa API version to compile the component.
The application package is built into a zip artifact, before deploying it.