pyvespa
pyvespa copied to clipboard
Instructions on deploying to Vespa Cloud Prod
It seems like the process for deploying to Prod is different from dev deployments. Prod deployment page asks for 2 zip files. I downloaded the application zip file from Vespa Cloud, but I see that it's possible to do this with to_files
call. However, I'm not sure how to generate the test package. Please help me understand the process.
pyvespa
allows only deployment to dev. pyvespa
was built primarily to allow data scientists to experiment more quickly. It was not made for production use.
Understood. What is the right way to convert the experiment into a production app? Currently, I have a sample app in dev that I'd like to deploy to prod. I generated the application package but prod deployment requires a test package as well. Do I have to manually create json files specifying the tests to run and then do vespa prod submit
?
@jobergum @bratseth ☝️
Hi, I'll get back to you shortly on this
Hi again! The process to go from a pyvespa app to Vespa Cloud production is not as smooth as it should be, so many thanks for submitting this! I have reproduced/found the following problems:
- The Vespa Cloud console does not allow uploading the application zip only (as you noticed) - I have created a ticket for the console to look into that
- If there were test files in the pyvespa project, it would not generate the test zip
- Documentation for this process in pyvespa is weak/missing
I will take a step back and look into how this process should be, document it and follow up on bug fixes. This will take a little time, I hope you are able to work around using the Vespa Cloud documentation to deploy application packages
Thanks for looking into this.
- It's not just the console.
vespa prod submit
CLI command didn't work until I added a test package. - What would test files in a pyvespa project look like?
- It would be great if you could include a simple test in the documentation to demonstrate the process. pyvespa generated or otherwise.
I am trying to find a work around. I'm not sure how to create a simple test to pass the checks and deploy the app to prod. Currently, I have this under tests/system-tests
.
{
"name": "Very simple test",
"comment": "Just want to deploy",
"steps": [
{
"name": "query for foo",
"request": {
"parameters": {
"yql": "select * from sources * where True"
}
}
}
]
}
Hi, sorry for the trouble! I think there was a code change on Vespa Cloud today for this, I am not sure if it is fully rolled out yet - you can please let me know tomorrow if the CLI still fails after testing again then.
@mpolden does the vespa CLI require a test package for prod deployment?
CLI itself shouldn't require a test package, but maybe the controller API does.
Without the tests folder, this is what I get:
> vespa prod submit
Warning: We recommend doing this only from a CD job
Hint: See https://cloud.vespa.ai/en/getting-to-production
Error: could not submit application for deployment: '' should be an application package zip or dir, but does not exist
After I added a tests/system-test and a test file:
Warning: We recommend doing this only from a CD job
Hint: See https://cloud.vespa.ai/en/getting-to-production
Success: Submitted . for deployment
See https://console.vespa-cloud.com/tenant/dummycorp/application/myapp/prod/deployment for deployment progress
I created https://github.com/vespa-engine/vespa/issues/24907 to track this issue wrt. to Vespa CLI.
This is now available (though still experimental.) https://pyvespa.readthedocs.io/en/latest/reference-api.html#vespa.deployment.VespaCloud.deploy_to_prod