Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions on deploying to Vespa Cloud Prod #395

Open
neo-anderson opened this issue Nov 10, 2022 · 11 comments
Open

Instructions on deploying to Vespa Cloud Prod #395

neo-anderson opened this issue Nov 10, 2022 · 11 comments
Assignees

Comments

@neo-anderson
Copy link

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.

@thigm85
Copy link
Contributor

thigm85 commented Nov 11, 2022

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.

@neo-anderson
Copy link
Author

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 ?

@thigm85
Copy link
Contributor

thigm85 commented Nov 11, 2022

@jobergum @bratseth ☝️

@kkraune
Copy link
Member

kkraune commented Nov 11, 2022

Hi, I'll get back to you shortly on this

@kkraune
Copy link
Member

kkraune commented Nov 11, 2022

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

@kkraune kkraune self-assigned this Nov 11, 2022
@neo-anderson
Copy link
Author

Thanks for looking into this.

  1. It's not just the console. vespa prod submit CLI command didn't work until I added a test package.
  2. What would test files in a pyvespa project look like?
  3. 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"
                }
            }
        }
    ]
}

@kkraune
Copy link
Member

kkraune commented Nov 14, 2022

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.

@kkraune
Copy link
Member

kkraune commented Nov 15, 2022

@mpolden does the vespa CLI require a test package for prod deployment?

@mpolden
Copy link
Member

mpolden commented Nov 15, 2022

CLI itself shouldn't require a test package, but maybe the controller API does.

@neo-anderson
Copy link
Author

neo-anderson commented Nov 16, 2022

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

@mpolden
Copy link
Member

mpolden commented Nov 17, 2022

I created vespa-engine/vespa#24907 to track this issue wrt. to Vespa CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants